Never mind, I of am course an idiot, I must've changed the old
cold and broken in before copying it to the new place..."Idocument"
is, as you could guess by the name, an Interface, and can't be
instantiated...
-----Original Message-----
From: Israel, Kirk
Sent: Wednesday, January 28, 2004 12:26 PM
To: [EMAIL PROTECTED]
Subject: [castor-dev] how to diagnose XML->object errors?
I'm trying to get an unmapped xml file -> object unmarshalling working.
I got very similar code to work before, but now this:
java.io.Reader readDoc = new FileReader("C:\\temp\\doc.txt");
IDocument doc = null;
Class documentClass =
Class.forName("com.taxware.api.document.IDocument");
try {
doc = (IDocument)
org.exolab.castor.xml.Unmarshaller.unmarshal(documentClass, readDoc);
} catch(Exception e){
throw new Exception("hey didn't read dangit "+e);
}
prints up this
java.lang.Exception: hey didn't read dangit org.xml.sax.SAXException:
unable to instantiate com.taxware.api.document.IDocument;
java.lang.InstantiationException:
com.taxware.api.document.IDocument{file: [not available]; line: 2;
column: 11}
The file in question I generated by marshalling an existing document
object in Castor...
how can I figure out what the problem is? It seemed to be working fine
before...
-----------------------------------------------------------
If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
unsubscribe castor-dev
-----------------------------------------------------------
If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
unsubscribe castor-dev