Hello there,
after a long time we are finally upgrading from FOP 0.20 to FOP 0.93 in our
java web application. I still have not managed to do this upgrade though! We
are generating a pdf file from a FO file. I have done all necessary changes
in xml Glyphs, code (API), jars, configuration.xml file and fo file.
Our application dumps the xsl-fo file on the disk for debugging purposes.
Although when converting this fo file to pdf from the fop standalone command
prompt everything works fine, when fop runs inside the application, I get
the following exception, which is not very descriptive

XML-22900: (Fatal Error) An internal error condition occurred.
javax.xml.transform.TransformerException: XML-22900: (Fatal Error) An
internal error condition occurred.
       at oracle.xml.jaxp.JXTransformer.reportException(JXTransformer.java
:881)
       at oracle.xml.jaxp.JXTransformer.transform(JXTransformer.java:477)

Caused by: java.lang.NullPointerExceptionCaused by:
java.lang.NullPointerException
       at org.apache.fop.fo.FOTreeBuilder.characters(FOTreeBuilder.java
:138)
       at oracle.xml.xslt.XSLEventHandler.characters(XSLEventHandler.java
:899)
       at oracle.xml.xslt.XSLTContext.reportNode(XSLTContext.java:404)
       at oracle.xml.xslt.XSLTContext.reportNode(XSLTContext.java:368)
       at oracle.xml.xslt.XSLTContext.reportNode(XSLTContext.java:368)
       at oracle.xml.xslt.XSLTContext.reportNode(XSLTContext.java:368)
       at oracle.xml.xslt.XSLTContext.reportNode(XSLTContext.java:1303)
       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:333)
       at oracle.xml.jaxp.JXTransformer.transform(JXTransformer.java:437)


I even disabled referencing fop configuration to see if the following piece
of code works.

           byte[] xslFoBytes; // initialized before
           FopFactory fopFactory = FopFactory.newInstance();
           Fop fop = fopFactory.newFop(MimeConstants.MIME_PDF, out);
           TransformerFactory factory = TransformerFactory.newInstance();
           Transformer transformer = factory.newTransformer();
           ByteArrayInputStream xslFoStream = new
ByteArrayInputStream(xslFoBytes);
           Source src = new StreamSource(xslFoStream);
           Result res = new SAXResult(fop.getDefaultHandler());
           transformer.transform(src, res);
           byte[] result = out.toByteArray();


Could anyonce give me a hint about this?I could provide  more details if
required.

Thank you
Rigas

Reply via email to