Hello,
I'm using the basic marshal call to marshal a considerably large
serializable object.  
Code:
try {
        // Create a File to marshal to
        writer = new FileWriter(fileName);
                
        // Marshal the entire hash.
        Marshaller marshaller = new Marshaller(writer);
        marshaller.marshal(cust);
        getLog().debug("Customer XML Saved as "+fileName);
} catch (Exception e) {
        getLog().debug("Unable to marshal customer data.", e);
} finally {
        try {writer.close();} catch (Exception e) {}
}

Exception written is:
Unable to marshal customer data.
The character ' .' is an invalid XML character
        at
org.exolab.castor.xml.Marshaller.marshal(Marshaller.java:1534)
        at
org.exolab.castor.xml.Marshaller.marshal(Marshaller.java:1854)
        at
org.exolab.castor.xml.Marshaller.marshal(Marshaller.java:1854)
        at
org.exolab.castor.xml.Marshaller.marshal(Marshaller.java:1860)
        at
org.exolab.castor.xml.Marshaller.marshal(Marshaller.java:1860)
        at org.exolab.castor.xml.Marshaller.marshal(Marshaller.java:842)
        ...
Not sure what the character above is, when I cut and paste it acts like
a carriage return..., so I think it's a non-printable character.  My
object is too large to dig in and find it myself.

What are my options?  Can I add some sort of custom handler to the
marshalling process so I can replace these chars and continue?  Or is
there a way for castor to tell me where in the object hierarchy the
problem is occurring?

Thanks in advance,
        Dan C.

-------------------------------------------------
If you wish to unsubscribe from this list, please
send an empty message to the following address:

[EMAIL PROTECTED]
-------------------------------------------------

Reply via email to