Hi ,
        I am trying to read xml data using castor API, I have generated source code using castor API. But when I am trying to read XML using generated code
****************************
com.xyz.LOAN_APPLICATION loanAppli = null;
Mapping map = new Mapping( getClass().getClassLoader() );
map.loadMapping( "C:/Projects/Castor/src/examples/SourceGenerator2/Temp.xml" );
org.exolab.castor.xml.Unmarshaller temp = new org.exolab.castor.xml.Unmarshaller(Class.forName("com.xyz.LOAN_APPLICATION"));
temp.setMapping(map);
temp.unmarshal(new java.io.FileReader("C:/Projects/Castor/src/examples/SourceGenerator2/1003-1.xml"));

*****************************

I am getting following error

org.xml.sax.SAXException: unable to instantiate com.xyz.LOAN_APPLICATION; org.xml.sax.SAXException: Class not found: com.xyz.LOAN_APPLICATION
       at org.exolab.castor.xml.UnmarshalHandler.startElement(UnmarshalHandler.java:717)
       at org.apache.xerces.parsers.AbstractSAXParser.startElement(Unknown Source)
       at org.apache.xerces.impl.dtd.XMLDTDValidator.startElement(Unknown Source)
       at org.apache.xerces.impl.XMLDocu mentFragmentScannerImpl.scanStartElement(Unknown Source)
       at org.apache.xerces.impl.XMLDocumentScannerImpl$ContentDispatcher.scanRootElementHook(Unknown Source)
       at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
       at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
       at org.apache.xerces.parsers.DTDConfiguration.parse(Unknown Source)
       at org.apache.xerces.parsers.DTDConfiguration.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:338)
       at org.exolab.castor.xml.Unmarshaller.unmarshal(Unmarshaller.java:270)
       at org.exolab.castor.xml.Unmarshaller.unmarshal(Unmarshaller.java:391)
       at com.xyz.LOAN_APPLICATION.unmarshal(LOAN_APPLICATION.java:312)
       at customactivityconfig.WriteDataParseActivity.eval(WriteDataParseActivity.java:127)
       at com.hnc.core.server.activity.atomic.AbstractAtomicActivity.privateActivityRun(AbstractAtomicActivity.java:117)
       at com.hnc.core.server.activity.AbstractActivity.privateRun(AbstractActivity.java:531)
       at com.hnc.core.common.job.AbstractJob.runDriver(AbstractJob.java:159)
       at com.hnc.core.common.job.AbstractJob.run(AbstractJob.java:131)
       at java.lang.Thread.run(Thread.java:534)
Can you give me some insight on this?
Thanks and Best Regards
Amit Vishnoi

 

This email and any files transmitted with it are confidential, proprietary and intended solely for the individual
or entity to whom they are addressed. If you have received this email in error please delete it immediately.

Reply via email to