users@jaxb.java.net

marshalling/unmarshalling an ArrayList

From: mnsh <manish.tc.rvce_at_gmail.com>
Date: Mon, 3 Mar 2008 01:57:38 -0800 (PST)

Hello,

I am new to JAXB. So I would like somebody to help me solve this problem.

I have a class say Test which contains only a List which has some 6 to 7
user defined objects. I am able to marshal the Test object to an xml file.
But while unmarshalling back to the java object, I am getting a
NullPointerException and a part of the trace is pasted below

java.lang.NullPointerException
at
com.sun.xml.bind.v2.runtime.reflect.Accessor$GetterSetterReflection.set(Accessor.java:283)
at com.sun.xml.bind.v2.runtime.reflect.TransducedAcce
ssor$CompositeTransducedAccessorImpl.parse(TransducedAccessor.java:196)
at
com.sun.xml.bind.v2.runtime.unmarshaller.LeafPropertyLoader.text(LeafPropertyLoader.java:25)
at
com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallingContext.text(UnmarshallingContext.java:380)
at
com.sun.xml.bind.v2.runtime.unmarshaller.SAXConnector.processText(SAXConnector.java:148)

Additional information:
If I edit the xml file such that the list contains only one object then
unmarshalling works fine.
Also I am using jaxb-xjc2.0EA3.jar,jaxb-impl2.0EA3.jar and
jaxb-api2.0EA3.jar

I would like to know if anything else is to be done to unmarshal the List
object or if i have to use any other jars to make unmarshalling work.Thanks
in advance.

Best Regards
Manish
-- 
View this message in context: http://www.nabble.com/marshalling-unmarshalling-an-ArrayList-tp15799925p15799925.html
Sent from the java.net - jaxb users mailing list archive at Nabble.com.