users@jersey.java.net

Re: [Jersey] NPE on ServletContainer startup: 0.9-ea

From: Ryan Heaton <ryan_at_webcohesion.com>
Date: Tue, 5 Aug 2008 09:30:42 -0600

Nice. Using the jersey-server module seems to have fixed the problem.

I really like the modularization. I tried to follow the user group
thread on this, but didn't get a full explanation of each of the
modules. Some are self-explanatory, but what are the following
modules?

jersey-contribs
jersey-bundle
jersey-project
jersey-tests

I can guess that "jersey-project" is the NetBeans/Eclipse/IDEA
support. And assuming the "tests" module is for unit tests, why would
it be packaged in a module?

-Ryan



On Tue, Aug 5, 2008 at 3:16 AM, Paul Sandoz <Paul.Sandoz_at_sun.com> wrote:
> Hi Ryan,
>
> Are you using:
> http://download.java.net/maven/2/com/sun/jersey/jersey/0.9-ea-SNAPSHOT/
>
> Rather than:
>
> http://download.java.net/maven/2/com/sun/jersey/jersey-server/0.9-ea-SNAPSHOT/
>
> I presume the former, which is not being updated and is being retained until
> we stabilize the building of the modularized version.
>
> This area has recently changed since additional support was added for JAXB
> with WADL. So this may have fixed your problem or not.
>
> Could you send me some sample code so i can investigate further. I suspect
> it is an error related to some JAXB beans.
>
> Paul.
>
> Ryan Heaton wrote:
>>
>> Hi all.
>>
>> I'm using the latest 0.9 ea release with the ServletContainer.
>> Getting an NPE on startup. Looks like it might be JAXB, and it's just
>> the WADL resource. The resources appear to be responding correctly.
>>
>> Ideas?
>>
>> -Ryan
>>
>> java.lang.NullPointerException
>> at
>> com.sun.xml.bind.v2.model.impl.PropertyInfoImpl.calcXmlName(PropertyInfoImpl.java:287)
>> at
>> com.sun.xml.bind.v2.model.impl.PropertyInfoImpl.calcXmlName(PropertyInfoImpl.java:262)
>> at
>> com.sun.xml.bind.v2.model.impl.ElementPropertyInfoImpl.getTypes(ElementPropertyInfoImpl.java:96)
>> at
>> com.sun.xml.bind.v2.model.impl.RuntimeElementPropertyInfoImpl.getTypes(RuntimeElementPropertyInfoImpl.java:50)
>> at
>> com.sun.xml.bind.v2.model.impl.ElementPropertyInfoImpl$1.size(ElementPropertyInfoImpl.java:42)
>> at java.util.AbstractList$Itr.hasNext(AbstractList.java:339)
>> at
>> com.sun.xml.bind.v2.model.impl.ModelBuilder.getClassInfo(ModelBuilder.java:139)
>> at
>> com.sun.xml.bind.v2.model.impl.RuntimeModelBuilder.getClassInfo(RuntimeModelBuilder.java:49)
>> at
>> com.sun.xml.bind.v2.model.impl.RuntimeModelBuilder.getClassInfo(RuntimeModelBuilder.java:41)
>> at
>> com.sun.xml.bind.v2.model.impl.ModelBuilder.getTypeInfo(ModelBuilder.java:189)
>> at
>> com.sun.xml.bind.v2.model.impl.RegistryInfoImpl.<init>(RegistryInfoImpl.java:63)
>> at
>> com.sun.xml.bind.v2.model.impl.ModelBuilder.addRegistry(ModelBuilder.java:232)
>> at
>> com.sun.xml.bind.v2.model.impl.ModelBuilder.getTypeInfo(ModelBuilder.java:201)
>> at
>> com.sun.xml.bind.v2.runtime.JAXBContextImpl$3.run(JAXBContextImpl.java:352)
>> at
>> com.sun.xml.bind.v2.runtime.JAXBContextImpl$3.run(JAXBContextImpl.java:350)
>> at java.security.AccessController.doPrivileged(Native Method)
>> at
>> com.sun.xml.bind.v2.runtime.JAXBContextImpl.getTypeInfoSet(JAXBContextImpl.java:349)
>> at
>> com.sun.xml.bind.v2.runtime.JAXBContextImpl.<init>(JAXBContextImpl.java:215)
>> at
>> com.sun.xml.bind.v2.ContextFactory.createContext(ContextFactory.java:76)
>> at
>> com.sun.xml.bind.v2.ContextFactory.createContext(ContextFactory.java:55)
>> at
>> com.sun.xml.bind.v2.ContextFactory.createContext(ContextFactory.java:124)
>> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>> at
>> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
>> at
>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>> at java.lang.reflect.Method.invoke(Method.java:597)
>> at javax.xml.bind.ContextFinder.newInstance(ContextFinder.java:133)
>> at javax.xml.bind.ContextFinder.find(ContextFinder.java:286)
>> at javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:372)
>> at javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:337)
>> at
>> com.sun.jersey.impl.wadl.WadlResource.<init>(WadlResource.java:105)
>> at
>> com.sun.jersey.impl.wadl.WadlFactory.createWadlResource(WadlFactory.java:76)
>> at
>> com.sun.jersey.impl.application.WebApplicationImpl.createWadlResource(WebApplicationImpl.java:781)
>> at
>> com.sun.jersey.impl.application.WebApplicationImpl.processRootResources(WebApplicationImpl.java:772)
>> at
>> com.sun.jersey.impl.application.WebApplicationImpl.initiate(WebApplicationImpl.java:628)
>> at
>> com.sun.jersey.impl.application.WebApplicationImpl.initiate(WebApplicationImpl.java:478)
>> at
>> com.sun.jersey.spi.container.servlet.ServletContainer.initiate(ServletContainer.java:559)
>> at
>> com.sun.jersey.spi.container.servlet.ServletContainer.load(ServletContainer.java:483)
>> at
>> com.sun.jersey.spi.container.servlet.ServletContainer.init(ServletContainer.java:165)
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe_at_jersey.dev.java.net
>> For additional commands, e-mail: users-help_at_jersey.dev.java.net
>>
>
> --
> | ? + ? = To question
> ----------------\
> Paul Sandoz
> x38109
> +33-4-76188109
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_jersey.dev.java.net
> For additional commands, e-mail: users-help_at_jersey.dev.java.net
>
>