Guys,
I got it... the issue was on my side.
Pls ignore this
- harjit
________________________________
From: Singh, Harjit [mailto:[EMAIL PROTECTED]
Sent: Thursday, July 12, 2007 3:46 PM
To: [email protected]
Subject: [castor-user] Error while unmarhalling
Hi there,
When I unmarashal my mapping file, I get this error
Caused by: java.lang.IllegalArgumentException
at sun.reflect.UnsafeObjectFieldAccessorImpl.set(Unknown Source)
at java.lang.reflect.Field.set(Unknown Source)
at
org.exolab.castor.mapping.loader.FieldHandlerImpl.setValue(FieldHandlerI
mpl.java:572)
at
org.exolab.castor.xml.UnmarshalHandler.endElement(UnmarshalHandler.java:
1054)
at
org.exolab.castor.xml.UnmarshalHandler.endElement(UnmarshalHandler.java:
1119)
at
org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown Source)
at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanEndElement(Unk
nown Source)
at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDis
patcher.dispatch(Unknown Source)
at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unkno
wn Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown
Source)
at org.apache.xerces.parsers.XML11Configuration.parse(Unknown
Source)
at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown
Source)
at
org.exolab.castor.xml.Unmarshaller.unmarshal(Unmarshaller.java:729)
at
com.nasd.fms.framework.database.hibernate.pojo.test.TestmyeclipseIde.mai
n(TestmyeclipseIde.java:64)
Here is the code
InputSource inputSource = new InputSource("C:/Documents and
Settings/SinghH/My Documents/FUSS/dmytros Files/MrdtNmaMapping.xml");
Mapping mapping = new Mapping();
mapping.loadMapping(inputSource);
// 2. Unmarshal the data
Unmarshaller unmar = new Unmarshaller(mapping);
unmar.setIgnoreExtraElements(true);
ApplicantProfileRpt Pojo =
(ApplicantProfileRpt)unmar.unmarshal(new InputSource("C:/Documents and
Settings/SinghH/My Documents/FUSS/dmytros Files/NMAOutput.XML"));
System.out.println("Loaded");
Part of the mapping file where I'm using the set is
<field cst:name="aplctIndvls" type="java.lang.Object"
collection="set">
<bind-xml name="aplct-indvls" node="element"/>
</field>
<field cst:name="netCaps" type="java.lang.Object"
collection="set">
<bind-xml name="net-caps" node="element"/>
</field>
any clues why I'm getting this error ?
Thanks
- Harjit
This email, including attachments, may include confidential
and/or
proprietary information, and may be used only by the person or
entity
to which it is addressed. If the reader of this email is not
the
intended recipient or his or her authorized agent, the reader is
hereby notified that any dissemination, distribution or copying
of this
email is prohibited. If you have received this email in error,
please notify the sender by replying to this message and delete
this
email immediately.
This email, including attachments, may include confidential and/or
proprietary information, and may be used only by the person or entity
to which it is addressed. If the reader of this email is not the
intended recipient or his or her authorized agent, the reader is
hereby notified that any dissemination, distribution or copying of this
email is prohibited. If you have received this email in error,
please notify the sender by replying to this message and delete this
email immediately.