Differences between revisions 2 and 3
Revision 2 as of 2008-08-19 12:20:44
Size: 6901
Editor: cod3r
Comment:
Revision 3 as of 2009-09-20 23:52:22
Size: 6901
Editor: localhost
Comment: converted to 1.6 markup
No differences found!

This page shows how you get Apache FOP 0.95 running under Oracle Containers for J2EE 10g (10.1.3.3.0). This solution was original from the fop-users mailing list.

http://www.nabble.com/Re%3A-FOP-Transformer-Exception-(oracle)-td10638966.html#a10638966

Problem:

avax.xml.transform.TransformerException: XML-22900: (Abbruchfehler) Eine interne Fehlerbedingung ist aufgetreten.
        at oracle.xml.jaxp.JXTransformer.reportException(JXTransformer.java:881)
        at oracle.xml.jaxp.JXTransformer.transform(JXTransformer.java:477)
        at de.idv.report.servlet.printReport.doGet(printReport.java:41)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:743)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
        at com.evermind[Oracle Containers for J2EE 10g (10.1.3.3.0) ].server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:713)
        at com.evermind[Oracle Containers for J2EE 10g (10.1.3.3.0) ].server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:370)
        at com.evermind[Oracle Containers for J2EE 10g (10.1.3.3.0) ].server.http.HttpRequestHandler.doProcessRequest(HttpRequestHandler.java:871)
        at com.evermind[Oracle Containers for J2EE 10g (10.1.3.3.0) ].server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:453)
        at com.evermind[Oracle Containers for J2EE 10g (10.1.3.3.0) ].server.http.HttpRequestHandler.serveOneRequest(HttpRequestHandler.java:221)
        at com.evermind[Oracle Containers for J2EE 10g (10.1.3.3.0) ].server.http.HttpRequestHandler.run(HttpRequestHandler.java:122)
        at com.evermind[Oracle Containers for J2EE 10g (10.1.3.3.0) ].server.http.HttpRequestHandler.run(HttpRequestHandler.java:111)
        at oracle.oc4j.network.ServerSocketReadHandler$SafeRunnable.run(ServerSocketReadHandler.java:260)
        at oracle.oc4j.network.ServerSocketAcceptHandler.procClientSocket(ServerSocketAcceptHandler.java:239)
        at oracle.oc4j.network.ServerSocketAcceptHandler.access$700(ServerSocketAcceptHandler.java:34)
        at oracle.oc4j.network.ServerSocketAcceptHandler$AcceptHandlerHorse.run(ServerSocketAcceptHandler.java:880)
        at com.evermind[Oracle Containers for J2EE 10g (10.1.3.3.0) ].util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:298)
        at java.lang.Thread.run(Thread.java:595)
Caused by: java.lang.NullPointerException
        at org.apache.fop.fo.FOTreeBuilder.characters(FOTreeBuilder.java:124)
        at oracle.xml.xslt.XSLEventHandler.characters(XSLEventHandler.java:899)
        at oracle.xml.xslt.XSLTContext.reportNode(XSLTContext.java:426)
        at oracle.xml.xslt.XSLTContext.reportNode(XSLTContext.java:390)
        at oracle.xml.xslt.XSLTContext.reportNode(XSLTContext.java:1325)
        at oracle.xml.xslt.XSLCopyOf.processAction(XSLCopyOf.java:141)
        at oracle.xml.xslt.XSLNode.processChildren(XSLNode.java:480)
        at oracle.xml.xslt.XSLTemplate.processAction(XSLTemplate.java:205)
        at oracle.xml.xslt.XSLApplyTemplates.processAction(XSLApplyTemplates.java:242)
        at oracle.xml.xslt.XSLApplyTemplates.processAction(XSLApplyTemplates.java:142)
        at oracle.xml.xslt.XSLNode.processChildren(XSLNode.java:480)
        at oracle.xml.xslt.XSLTemplate.processAction(XSLTemplate.java:205)
        at oracle.xml.xslt.XSLStylesheet.execute(XSLStylesheet.java:581)
        at oracle.xml.xslt.XSLStylesheet.execute(XSLStylesheet.java:548)
        at oracle.xml.xslt.XSLProcessor.processXSL(XSLProcessor.java:337)
        at oracle.xml.jaxp.JXTransformer.transform(JXTransformer.java:437)
        ... 16 more
---------
java.lang.NullPointerException
        at org.apache.fop.fo.FOTreeBuilder.characters(FOTreeBuilder.java:124)
        at oracle.xml.xslt.XSLEventHandler.characters(XSLEventHandler.java:899)
        at oracle.xml.xslt.XSLTContext.reportNode(XSLTContext.java:426)
        at oracle.xml.xslt.XSLTContext.reportNode(XSLTContext.java:390)
        at oracle.xml.xslt.XSLTContext.reportNode(XSLTContext.java:1325)
        at oracle.xml.xslt.XSLCopyOf.processAction(XSLCopyOf.java:141)
        at oracle.xml.xslt.XSLNode.processChildren(XSLNode.java:480)
        at oracle.xml.xslt.XSLTemplate.processAction(XSLTemplate.java:205)
        at oracle.xml.xslt.XSLApplyTemplates.processAction(XSLApplyTemplates.java:242)
        at oracle.xml.xslt.XSLApplyTemplates.processAction(XSLApplyTemplates.java:142)
        at oracle.xml.xslt.XSLNode.processChildren(XSLNode.java:480)
        at oracle.xml.xslt.XSLTemplate.processAction(XSLTemplate.java:205)
        at oracle.xml.xslt.XSLStylesheet.execute(XSLStylesheet.java:581)
        at oracle.xml.xslt.XSLStylesheet.execute(XSLStylesheet.java:548)
        at oracle.xml.xslt.XSLProcessor.processXSL(XSLProcessor.java:337)
        at oracle.xml.jaxp.JXTransformer.transform(JXTransformer.java:437)
        at de.idv.report.servlet.printReport.doGet(printReport.java:41)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:743)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
        at com.evermind[Oracle Containers for J2EE 10g (10.1.3.3.0) ].server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:713)
        at com.evermind[Oracle Containers for J2EE 10g (10.1.3.3.0) ].server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:370)
        at com.evermind[Oracle Containers for J2EE 10g (10.1.3.3.0) ].server.http.HttpRequestHandler.doProcessRequest(HttpRequestHandler.java:871)
        at com.evermind[Oracle Containers for J2EE 10g (10.1.3.3.0) ].server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:453)
        at com.evermind[Oracle Containers for J2EE 10g (10.1.3.3.0) ].server.http.HttpRequestHandler.serveOneRequest(HttpRequestHandler.java:221)
        at com.evermind[Oracle Containers for J2EE 10g (10.1.3.3.0) ].server.http.HttpRequestHandler.run(HttpRequestHandler.java:122)
        at com.evermind[Oracle Containers for J2EE 10g (10.1.3.3.0) ].server.http.HttpRequestHandler.run(HttpRequestHandler.java:111)
        at oracle.oc4j.network.ServerSocketReadHandler$SafeRunnable.run(ServerSocketReadHandler.java:260)
        at oracle.oc4j.network.ServerSocketAcceptHandler.procClientSocket(ServerSocketAcceptHandler.java:239)
        at oracle.oc4j.network.ServerSocketAcceptHandler.access$700(ServerSocketAcceptHandler.java:34)
        at oracle.oc4j.network.ServerSocketAcceptHandler$AcceptHandlerHorse.run(ServerSocketAcceptHandler.java:880)
        at com.evermind[Oracle Containers for J2EE 10g (10.1.3.3.0) ].util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:298)
        at java.lang.Thread.run(Thread.java:595)

Solution:

...
For those that are interested, I did the following change in transformer initialization, changing the default transformer factory to apache one (default oracle was causing a problem) and it worked fine.

import org.apache.xalan.processor.TransformerFactoryImpl ;

TransformerFactory factory = new TransformerFactoryImpl(); // explicitely call apache xalan
//TransformerFactory factory = TransformerFactory.newInstance(); // default oracle problem!
...

HowTo/OracleOC4JProblems (last edited 2009-09-20 23:52:22 by localhost)