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$Gette rSetterReflection.set(Accessor.java:283)
at com.sun.xml.bind.v2.runtime.reflect.TransducedAcce ssor$CompositeTransducedAccessorImpl.parse(Transdu cedAccessor.java:196)
at com.sun.xml.bind.v2.runtime.unmarshaller.LeafPrope rtyLoader.text(LeafPropertyLoader.java:25)
at com.sun.xml.bind.v2.runtime.unmarshaller.Unmarshal lingContext.text(UnmarshallingContext.java:380)
at com.sun.xml.bind.v2.runtime.unmarshaller.SAXConnec tor.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