Hello, I was trying to understand how FOP is working and I downloaded the latest stable version and created a new project in JDeveloper 10g. I'm using the binary release 1.0 . I could do run succesfully the examples using the command line. But when I'm trying to call it from any application, I always stumble on the same error which is the following (It's almost the same with all the example I tried) : 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:775) at oracle.xml.jaxp.JXTransformer.transform(JXTransformer.java:374) at mypackage3.ExampleXML2PDF.main(ExampleXML2PDF.java:80) Caused by: java.lang.NullPointerException at org.apache.fop.fo.FOTreeBuilder.startElement(FOTreeBuilder.java:171) at oracle.xml.parser.v2.XSLEventHandler.reportStartElement(XSLEventHandler.java:230) at oracle.xml.parser.v2.XSLEventHandler.startElement(XSLEventHandler.java:296) at oracle.xml.parser.v2.XSLResultElement.processAction(XSLResultElement.java:142) at oracle.xml.parser.v2.XSLNode.processChildren(XSLNode.java:417) at oracle.xml.parser.v2.XSLResultElement.processAction(XSLResultElement.java:180) at oracle.xml.parser.v2.XSLNode.processChildren(XSLNode.java:417) at oracle.xml.parser.v2.XSLTemplate.processAction(XSLTemplate.java:191) at oracle.xml.parser.v2.XSLApplyTemplates.processAction(XSLApplyTemplates.java:210) at oracle.xml.parser.v2.XSLApplyTemplates.processAction(XSLApplyTemplates.java:123) at oracle.xml.parser.v2.XSLNode.processChildren(XSLNode.java:417) at oracle.xml.parser.v2.XSLTemplate.processAction(XSLTemplate.java:191) at oracle.xml.parser.v2.XSLStylesheet.execute(XSLStylesheet.java:509) at oracle.xml.parser.v2.XSLProcessor.processXSL(XSLProcessor.java:265) at oracle.xml.jaxp.JXTransformer.transform(JXTransformer.java:358) ... 1 more --------- java.lang.NullPointerException at org.apache.fop.fo.FOTreeBuilder.startElement(FOTreeBuilder.java:171) at oracle.xml.parser.v2.XSLEventHandler.reportStartElement(XSLEventHandler.java:230) at oracle.xml.parser.v2.XSLEventHandler.startElement(XSLEventHandler.java:296) at oracle.xml.parser.v2.XSLResultElement.processAction(XSLResultElement.java:142) at oracle.xml.parser.v2.XSLNode.processChildren(XSLNode.java:417) at oracle.xml.parser.v2.XSLResultElement.processAction(XSLResultElement.java:180) at oracle.xml.parser.v2.XSLNode.processChildren(XSLNode.java:417) at oracle.xml.parser.v2.XSLTemplate.processAction(XSLTemplate.java:191) at oracle.xml.parser.v2.XSLApplyTemplates.processAction(XSLApplyTemplates.java:210) at oracle.xml.parser.v2.XSLApplyTemplates.processAction(XSLApplyTemplates.java:123) at oracle.xml.parser.v2.XSLNode.processChildren(XSLNode.java:417) at oracle.xml.parser.v2.XSLTemplate.processAction(XSLTemplate.java:191) at oracle.xml.parser.v2.XSLStylesheet.execute(XSLStylesheet.java:509) at oracle.xml.parser.v2.XSLProcessor.processXSL(XSLProcessor.java:265) at oracle.xml.jaxp.JXTransformer.transform(JXTransformer.java:358) at mypackage3.ExampleXML2PDF.main(ExampleXML2PDF.java:80) Debugger disconnected from local process. Process exited. After analysing the error, I found that the attribute "delegate" is always null after running : transformer.transform(src, res); Since those are your examples, they should work and have no errors. Just for fun I did edited the FOTreeBuilder class in the FOP.jar, adding if (delegate == null) {this.startDocument()} So it began to work without errors, thought it's not correct since the PDF file is unreadable. I've tried the following examples : ExampleFO2.java ExampleXML2PDF.java and the example in the user guide. The only difference between your files and mine is that I created my own package in JDev, but I did copy/paste all the rest of your code. I'll continue to search a way to correct the error.
resetting P2 open bugs to P3 pending further review
lowering priority as this does not affect features or performance
unable to reproduce in 1.1dev (trunk); see console.log.txt attachment; see also http://svn.apache.org/viewvc?rev=1326166&view=rev for minor change to add 'run' target, etc. n.b. from the backtrace in comment 0, i can see that your JDev environment is making use of a different implementation of javax.xml.transform.Transformer than is normally used by FOP: you used: oracle.xml.jaxp.JXTransformer while FOP normally uses: org.apache.xalan.transformer.Transform so I think the problem is that you aren't using xalan-2.7.0.jar as found in $FOP_HOME/lib
Created attachment 28608 [details] console output
batch transition resolved+worksforme to closed+worksforme; if you believe this remains a bug and can demonstrate it with appropriate input FO file and output PDF file (as applicable), then you may reopen