[jdom-interest] JDOMSource and Oracle TRAX implementation
Kevin Roast
kevin.roast at activiti.com
Wed Nov 13 04:18:26 PST 2002
Hi,
I am currently trying to use JDOM with the Oracle XSLT TRAX
implementation. My issue is that I get a weird "class cast" exception
when passing in the JDOMSource adaptor object to the Oracle XSLT
transformer implementation thus:
// get transformer instance
m_transformer = TransformerFactory.newInstance().newTransformer(
strXSL );
// create JDOM result object
JDOMResult result = new JDOMResult();
// create JDOM wrapped DOM source
JDOMSource source = new JDOMSource(doc); // "doc" is my JDOM
Document object
// perform the transformation
m_transformer.transform(source, result);
The error received is:
java.lang.ClassCastException:
org.jdom.transform.JDOMSource$DocumentReader
at
oracle.xml.jaxp.JXTransformer.transform(JXTransformer.java:201)
This works fine if I switch back to the Xalan TRAX implementation
instead of Oracle. It also works fine if I use a simple XML String
stream source object instead of a JDOM wrapper.
Does anyone know why I would receive this error using JDOM?
I really don't want to stop using JDOM because of this as I find it MUCH
nicer than the org.w3c DOM classes but we need the performance of the
Oracle engine (nearly 3 x faster than Xalan in our tests.)
Thanks,
Kevin
More information about the jdom-interest
mailing list