users@jersey.java.net

Re: [Jersey] Exception during execution of POST query

From: Paul Sandoz <Paul.Sandoz_at_Sun.COM>
Date: Fri, 19 Feb 2010 15:59:19 +0100

Hi Philip,

Can you send me the output of:

   mvn -v

?

What errors are you getting when you build?

There is no tutorial on how to build it. Here are the instructions:

- use maven version 2.0.9 or greater.

- to build Jersey use SE 5 or SE 6 and do:

   mvn clean install

- to build the OSGi stuff (which is currently not connected to
building Jersey) use SE 6 and do:

   cd osgi
   mvn clean install

Paul.

On Feb 19, 2010, at 11:33 AM, Philip Yankov wrote:

> Hi Paul,
> I have problems building with maven, because I don't know which is
> the repository in which there are all needed dependencies to build
> osgi jersey sub-project. May be this is because I am new to project
> jersey and missed some tutorial where it is described how to build
> it. Is there any information on wiki or other page to see how it
> should be done?
> Best regards,
> Philip Yankov
>
> //Hi Philip,
> //
> //OSGI is not currently supported in 1.1.5. But it is planned for 1.2.
> //
> //If you like you can check out the Jersey trunk:
> //
> // svn checkout https://jersey.dev.java.net/svn/jersey/trunk/jersey
> //jersey --username <username>
> //
> //then go into the directory:
>
> // osgi
>
> //and build using SE 6 and maven >= 2.0.9. Then use those artifacts
> //produces. (Note that the next step in our OSGi development process
> is
> //to avoid a duplication of artifacts.)
>
> //We would greatly appreciate if you could try this out as we want to
> //know if it works for a number of scenarios and we have correctly
> //tested things before we release.
>
> //Thanks,
> //Paul.
>
> //On Feb 17, 2010, at 3:06 PM, Philip Yankov wrote:
>
> > Hi list,
> >
> > I have one very strange problem when trying to execute one simple
> > example using Categories and Books in them. I am trying to run
> > Jersey in OSGI environment and I don't know where to find all
> > bundles needed to run version 1.1.5, that's why I downloaded jars
> > and try to convert them to be bundles. When try to execute GET
> > queries (from my example) they are working, but when I try POST
> > query the exception is thrown.
> >
> > Here is the stacktrace :
> >
> > java.lang.NullPointerException
> > at
> > com
> > .sun
> > .jersey
> > .core
> > .impl
> > .provider
> > .entity.XMLRootElementProvider.readFrom(XMLRootElementProvider.java:
> > 110)
> > at
> > com
> > .sun
> > .jersey
> > .core
> > .provider
> > .jaxb
> > .AbstractRootElementProvider
> > .readFrom(AbstractRootElementProvider.java:105)
> > at
> > com
> > .sun
> > .jersey
> > .spi.container.ContainerRequest.getEntity(ContainerRequest.java:444)
> > at
> > com
> > .sun
> >
> .jersey.server.impl.model.method.dispatch.EntityParamDispatchProvider
> > $EntityInjectable.getValue(EntityParamDispatchProvider.java:137)
> > at
> > com
> > .sun
> > .jersey
> > .server
> > .impl
> > .inject
> > .InjectableValuesProvider
> > .getInjectableValues(InjectableValuesProvider.java:43)
> > at
> > com
> > .sun
> > .jersey
> > .server
> > .impl.model.method.dispatch.AbstractResourceMethodDispatchProvider
> > $
> > EntityParamInInvoker
> > .getParams(AbstractResourceMethodDispatchProvider.java:119)
> > at
> > com
> > .sun
> > .jersey
> > .server
> > .impl.model.method.dispatch.AbstractResourceMethodDispatchProvider
> > $
> > ResponseOutInvoker
> > ._dispatch(AbstractResourceMethodDispatchProvider.java:166)
> > at
> > com
> > .sun
> > .jersey
> > .server
> > .impl
> > .model
> > .method
> > .dispatch
> > .ResourceJavaMethodDispatcher
> > .dispatch(ResourceJavaMethodDispatcher.java:67)
> > at
> > com
> > .sun
> > .jersey
> > .server.impl.uri.rules.HttpMethodRule.accept(HttpMethodRule.java:
> 259)
> > at
> > com
> > .sun
> > .jersey
> > .server
> > .impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:133)
> > at
> > com
> > .sun
> > .jersey
> > .server
> > .impl.uri.rules.ResourceClassRule.accept(ResourceClassRule.java:83)
> > at
> > com
> > .sun
> > .jersey
> > .server
> > .impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:133)
> > at
> > com
> > .sun
> > .jersey
> > .server
> > .impl
> > .uri
> > .rules.RootResourceClassesRule.accept(RootResourceClassesRule.java:
> 71)
> > at
> > com
> > .sun
> > .jersey
> > .server
> > .impl
> > .application
> > .WebApplicationImpl._handleRequest(WebApplicationImpl.java:990)
> > at
> > com
> > .sun
> > .jersey
> > .server
> > .impl
> > .application
> > .WebApplicationImpl.handleRequest(WebApplicationImpl.java:941)
> > at
> > com
> > .sun
> > .jersey
> > .server
> > .impl
> > .application
> > .WebApplicationImpl.handleRequest(WebApplicationImpl.java:932)
> > at
> > com
> > .sun
> >
> .jersey.spi.container.servlet.WebComponent.service(WebComponent.java:
> > 384)
> > at
> > com
> > .sun
> > .jersey
> > .spi
> > .container.servlet.ServletContainer.service(ServletContainer.java:
> 451)
> > at
> > com
> > .sun
> > .jersey
> > .spi
> > .container.servlet.ServletContainer.service(ServletContainer.java:
> 632)
> > at javax.servlet.http.HttpServlet.service(HttpServlet.java:847)
> >
> > Does anyone know where the problem might be ?
> >
> > Best regards,
> > Philip Yankov