Java Mailing List Archive

http://www.junlu.com/

Home » user.castor »

[castor-user] Problem invoking XMLSerializer.asDocumentHandler()null

Papendieck, Thomas

2012-08-14


Author LoginPost Reply
Hello,

I have my castror running in an Oracle 11.2 database (which provides java 1.5 compatible JVM)

I loaded this jars into the database (so their content is available):

\maven\repository\stax\stax-api\1.0.1\stax-api-1.0.1.jar
\maven\repository\stax\stax\1.2.0\stax-1.2.0.jar
\maven\repository\org\codehaus\castor\castor-core\1.3.2\castor-core-1.3.2.jar
\maven\repository\org\codehaus\castor\castor-xml\1.3.2\castor-xml-1.3.2.jar
\maven\repository\commons-logging\commons-logging\1.1.1\commons-logging-1.1.1.jar
\maven\repository\commons-lang\commons-lang\2.1\commons-lang-2.1.jar
\maven\repository\xerces\xercesImpl\2.10.0\xercesImpl-2.10.0.jar

when running my applcation I get this Exception:
Problem invoking XMLSerializer.asDocumentHandler()null
[org.exolab.castor.xml.BaseXercesJDK5Serializer.asDocumentHandler(BaseXercesJDK5Serializer.java:97)
  org.exolab.castor.xml.Marshaller.configureSerializer (Marshaller.java:401)
  org.exolab.castor.xml.Marshaller.setWriter (Marshaller.java:385)
  org.exolab.castor.xml.Marshaller.<init>(Marshaller.java:370)
  my.app.XMLHandler.getContentAsString(XMLHandler.java:82)

Code in my.app.XMLHandler is:
StringWriter sWriter = new StringWriter();
    try {
       Marshaller lMarshaller = new Marshaller(sWriter); // line 82
       lMarshaller.setEncoding("iso-8859-1");
       lMarshaller.setMarshalAsDocument(true);
       lMarshaller.setValidation(_isValidate);
       lMarshaller.marshal(xmlRootElement);
    } catch (IOException e) { ...

looks like I' missing a lib, but which one?

bye
Thomas


---------------------------------------------------------------------
To unsubscribe from this list, please visit:

  http://xircles.codehaus.org/manage_email


©2008 junlu.com - Jax Systems, LLC, U.S.A.