Hi Martin,
Thanks for your help. Here are some new findings...
When I switched to using jaxb-api/impl version 2.2.1, on GF 3.1 and
JDK6, all was well in my Swing Client and server.
When I switched using jaxb-api/impl version 2.2.4 (the JDK 7 version),
on GF 3.1 and JDK6, my server deployed in GF 3.1 worked fine but my
Swing Client (started in NetBeans) shows the same error trace. I tried
this both with bundling the jaxb-api/impl 2.2.4 within WEB-INF/lib of
webapp and not.
Any other advice I could try?
com.sun.xml.bind.v2.runtime.ClassBeanInfoImpl.checkOverrideProperties(ClassBeanInfoImpl.java:205)
com.sun.xml.bind.v2.runtime.ClassBeanInfoImpl.<init>(ClassBeanInfoImpl.java:186)
com.sun.xml.bind.v2.runtime.JAXBContextImpl.getOrCreate(JAXBContextImpl.java:509)
com.sun.xml.bind.v2.runtime.JAXBContextImpl.getOrCreate(JAXBContextImpl.java:528)
com.sun.xml.bind.v2.runtime.property.ArrayElementProperty.<init>(ArrayElementProperty.java:112)
com.sun.xml.bind.v2.runtime.property.ArrayElementNodeProperty.<init>(ArrayElementNodeProperty.java:62)
sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
java.lang.reflect.Constructor.newInstance(Constructor.java:513)
com.sun.xml.bind.v2.runtime.property.PropertyFactory.create(PropertyFactory.java:128)
com.sun.xml.bind.v2.runtime.ClassBeanInfoImpl.<init>(ClassBeanInfoImpl.java:181)
com.sun.xml.bind.v2.runtime.JAXBContextImpl.getOrCreate(JAXBContextImpl.java:509)
com.sun.xml.bind.v2.runtime.ClassBeanInfoImpl.<init>(ClassBeanInfoImpl.java:168)
com.sun.xml.bind.v2.runtime.JAXBContextImpl.getOrCreate(JAXBContextImpl.java:509)
com.sun.xml.bind.v2.runtime.JAXBContextImpl.getOrCreate(JAXBContextImpl.java:528)
com.sun.xml.bind.v2.runtime.property.ArrayElementProperty.<init>(ArrayElementProperty.java:112)
com.sun.xml.bind.v2.runtime.property.ArrayElementNodeProperty.<init>(ArrayElementNodeProperty.java:62)
sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
java.lang.reflect.Constructor.newInstance(Constructor.java:513)
com.sun.xml.bind.v2.runtime.property.PropertyFactory.create(PropertyFactory.java:128)
com.sun.xml.bind.v2.runtime.ClassBeanInfoImpl.<init>(ClassBeanInfoImpl.java:181)
com.sun.xml.bind.v2.runtime.JAXBContextImpl.getOrCreate(JAXBContextImpl.java:509)
com.sun.xml.bind.v2.runtime.JAXBContextImpl.getOrCreate(JAXBContextImpl.java:528)
com.sun.xml.bind.v2.runtime.property.SingleElementNodeProperty.<init>(SingleElementNodeProperty.java:105)
sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
java.lang.reflect.Constructor.newInstance(Constructor.java:513)
com.sun.xml.bind.v2.runtime.property.PropertyFactory.create(PropertyFactory.java:128)
com.sun.xml.bind.v2.runtime.ClassBeanInfoImpl.<init>(ClassBeanInfoImpl.java:181)
com.sun.xml.bind.v2.runtime.JAXBContextImpl.getOrCreate(JAXBContextImpl.java:509)
com.sun.xml.bind.v2.runtime.JAXBContextImpl.<init>(JAXBContextImpl.java:326)
com.sun.xml.bind.v2.runtime.JAXBContextImpl.<init>(JAXBContextImpl.java:141)
com.sun.xml.bind.v2.runtime.JAXBContextImpl$JAXBContextBuilder.build(JAXBContextImpl.java:1157)
com.sun.xml.bind.v2.ContextFactory.createContext(ContextFactory.java:145)
com.sun.xml.bind.v2.ContextFactory.createContext(ContextFactory.java:236)
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
java.lang.reflect.Method.invoke(Method.java:597)
javax.xml.bind.ContextFinder.newInstance(ContextFinder.java:128)
javax.xml.bind.ContextFinder.find(ContextFinder.java:277)
javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:372)
javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:337)
org.springframework.oxm.jaxb.Jaxb2Marshaller.createJaxbContextFromContextPath(Jaxb2Marshaller.java:355)
On 09/07/2011 04:50 AM, Martin Grebac wrote:
> Hi Farrukh,
>
> javax.xml.bind:jaxb-api:jar:2.2.1:compile
> com.sun.xml.bind:jaxb-impl:jar:2.1.13:compile
>
> you seem to mix 2.2.x api with 2.1.x implementation.
>
> MartiNG
>
> On 09/06/2011 07:59 PM, Farrukh Najmi wrote:
>>
>> While migrating my webapp from Glassfish 3.1 to Glassfish 3.1.1 I am
>> running into NPE shown in stack trace below:
>>
>> Caused by: java.lang.NullPointerException
>> at
>> com.sun.xml.bind.v2.runtime.ClassBeanInfoImpl.checkOverrideProperties(ClassBeanInfoImpl.java:205)
>> at
>> com.sun.xml.bind.v2.runtime.ClassBeanInfoImpl.<init>(ClassBeanInfoImpl.java:186)
>> at
>> com.sun.xml.bind.v2.runtime.JAXBContextImpl.getOrCreate(JAXBContextImpl.java:509)
>> at
>> com.sun.xml.bind.v2.runtime.JAXBContextImpl.getOrCreate(JAXBContextImpl.java:528)
>> at
>> com.sun.xml.bind.v2.runtime.property.ArrayElementProperty.<init>(ArrayElementProperty.java:112)
>> at
>> com.sun.xml.bind.v2.runtime.property.ArrayElementNodeProperty.<init>(ArrayElementNodeProperty.java:62)
>> at
>> sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
>> at
>> sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
>> at
>> sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
>> at
>> java.lang.reflect.Constructor.newInstance(Constructor.java:513)
>> at
>> com.sun.xml.bind.v2.runtime.property.PropertyFactory.create(PropertyFactory.java:128)
>> at
>> com.sun.xml.bind.v2.runtime.ClassBeanInfoImpl.<init>(ClassBeanInfoImpl.java:181)
>> at
>> com.sun.xml.bind.v2.runtime.JAXBContextImpl.getOrCreate(JAXBContextImpl.java:509)
>> at
>> com.sun.xml.bind.v2.runtime.ClassBeanInfoImpl.<init>(ClassBeanInfoImpl.java:168)
>> at
>> com.sun.xml.bind.v2.runtime.JAXBContextImpl.getOrCreate(JAXBContextImpl.java:509)
>> at
>> com.sun.xml.bind.v2.runtime.ClassBeanInfoImpl.<init>(ClassBeanInfoImpl.java:168)
>> at
>> com.sun.xml.bind.v2.runtime.JAXBContextImpl.getOrCreate(JAXBContextImpl.java:509)
>> at
>> com.sun.xml.bind.v2.runtime.JAXBContextImpl.<init>(JAXBContextImpl.java:326)
>> at
>> com.sun.xml.bind.v2.runtime.JAXBContextImpl.<init>(JAXBContextImpl.java:141)
>> at
>> com.sun.xml.bind.v2.runtime.JAXBContextImpl$JAXBContextBuilder.build(JAXBContextImpl.java:1157)
>> at
>> com.sun.xml.bind.v2.ContextFactory.createContext(ContextFactory.java:145)
>> at
>> com.sun.xml.bind.v2.ContextFactory.createContext(ContextFactory.java:236)
>> 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:187)
>> at javax.xml.bind.ContextFinder.find(ContextFinder.java:333)
>> at javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:446)
>> at javax.xml.bind.JAXBContext.newInstance(JAXBContext.java:409)
>>
>> Searching suggests
>> <http://fusesource.com/forums/thread.jspa?threadID=3010> that it has
>> something to do with version collision in JAXB jars bundled by
>> Glassfisg 3.1.1 and those in in my war file's WEB-INF/lib directory.
>>
>> My war currently uses the following versioned jars as dependencies
>> bundled within my webapp's WEB-INF/lib directory and my Glassfish
>> 3.1.1 runs under JDK 6.
>>
>> javax.xml.bind:jaxb-api:jar:2.2.1:compile
>> com.sun.xml.bind:jaxb-impl:jar:2.1.13:compile
>>
>> Can any one tell me what is causing this problem and what do I need
>> to do to fix this problem?
>>
--
Regards,
Farrukh Najmi
Web: http://www.wellfleetsoftware.com