javax.xml.transform.TransformerException

There are no available Samebug tips for this exception. Do you have an idea how to solve this issue? A short tip would help users who saw this issue last week.

  • 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.
    via by daniel.gagnon,
    • javax.xml.transform.TransformerException: java.lang.NullPointerException at org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2341) at org.apache.xalan.templates.ElemLiteralResult.execute(ElemLiteralResult.java:682) at org.apache.xalan.templates.ElemApplyTemplates.transformSelectedNodes(ElemApplyTemplates.java:395) at org.apache.xalan.templates.ElemApplyTemplates.execute(ElemApplyTemplates.java:177) at org.apache.xalan.templates.ElemApplyTemplates.transformSelectedNodes(ElemApplyTemplates.java:395) at org.apache.xalan.templates.ElemApplyTemplates.execute(ElemApplyTemplates.java:177) at org.apache.xalan.templates.ElemApplyTemplates.transformSelectedNodes(ElemApplyTemplates.java:395) at org.apache.xalan.templates.ElemApplyTemplates.execute(ElemApplyTemplates.java:177) at org.apache.xalan.templates.ElemApplyTemplates.transformSelectedNodes(ElemApplyTemplates.java:395) at org.apache.xalan.templates.ElemApplyTemplates.execute(ElemApplyTemplates.java:177) at org.apache.xalan.templates.ElemApplyTemplates.transformSelectedNodes(ElemApplyTemplates.java:395) at org.apache.xalan.templates.ElemApplyTemplates.execute(ElemApplyTemplates.java:177) at org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2336) at org.apache.xalan.transformer.TransformerImpl.applyTemplateToNode(TransformerImpl.java:2202) at org.apache.xalan.transformer.TransformerImpl.transformNode(TransformerImpl.java:1276) at org.apache.xalan.transformer.TransformerImpl.transform(TransformerImpl.java:673) at org.apache.xalan.transformer.TransformerImpl.transform(TransformerImpl.java:1192) at org.apache.xalan.transformer.TransformerImpl.transform(TransformerImpl.java:1170) at com.atosorigin.cacc.ir.webapp.exporter.PDFGenerator.generatePDF(PDFGenerator.java:105) at com.atosorigin.cacc.ir.webapp.pages.transaction.TransactionList.exportSelectionPDF(TransactionList.java:199) at com.atosorigin.cacc.ir.webapp.pages.transaction.TransactionList.onSubmitFromTransactionGridForm(TransactionList.java:169) at com.atosorigin.cacc.ir.webapp.pages.transaction.TransactionList.dispatchComponentEvent(TransactionList.java) at org.apache.tapestry5.internal.structure.ComponentPageElementImpl.dispatchEvent(ComponentPageElementImpl.java:902) at org.apache.tapestry5.internal.structure.ComponentPageElementImpl.triggerContextEvent(ComponentPageElementImpl.java:1081) at org.apache.tapestry5.internal.structure.InternalComponentResourcesImpl.triggerContextEvent(InternalComponentResourcesImpl.java:263) at org.apache.tapestry5.corelib.components.Form._$advised$onAction(Form.java:405) at org.apache.tapestry5.corelib.components.Form$onAction$invocation_1316ffc57d1.invokeAdvisedMethod(Form$onAction$invocation_1316ffc57d1.java) at org.apache.tapestry5.internal.services.AbstractComponentMethodInvocation.proceed(AbstractComponentMethodInvocation.java:71) at org.apache.tapestry5.ioc.internal.services.LoggingAdvice.advise(LoggingAdvice.java:37) at org.apache.tapestry5.internal.transform.LogWorker$1.advise(LogWorker.java:54) at org.apache.tapestry5.internal.services.AbstractComponentMethodInvocation.proceed(AbstractComponentMethodInvocation.java:80) at org.apache.tapestry5.corelib.components.Form.onAction(Form.java) at org.apache.tapestry5.corelib.components.Form.dispatchComponentEvent(Form.java) at org.apache.tapestry5.internal.structure.ComponentPageElementImpl.dispatchEvent(ComponentPageElementImpl.java:910) at org.apache.tapestry5.internal.structure.ComponentPageElementImpl.triggerContextEvent(ComponentPageElementImpl.java:1081) at org.apache.tapestry5.internal.services.ComponentEventRequestHandlerImpl.handle(ComponentEventRequestHandlerImpl.java:75) at org.apache.tapestry5.internal.services.ImmediateActionRenderResponseFilter.handle(ImmediateActionRenderResponseFilter.java:42) at $ComponentEventRequestHandler_1316ffc2a03.handle($ComponentEventRequestHandler_1316ffc2a03.java) at org.apache.tapestry5.internal.services.AjaxFilter.handle(AjaxFilter.java:42) at $ComponentEventRequestHandler_1316ffc2a03.handle($ComponentEventRequestHandler_1316ffc2a03.java) at org.apache.tapestry5.services.TapestryModule$36.handle(TapestryModule.java:2164) at $ComponentEventRequestHandler_1316ffc2a03.handle($ComponentEventRequestHandler_1316ffc2a03.java) at $ComponentEventRequestHandler_1316ffc2a00.handle($ComponentEventRequestHandler_1316ffc2a00.java) at org.apache.tapestry5.internal.services.ComponentRequestHandlerTerminator.handleComponentEvent(ComponentRequestHandlerTerminator.java:43) at $ComponentRequestHandler_1316ffc2988.handleComponentEvent($ComponentRequestHandler_1316ffc2988.java) at org.apache.tapestry5.internal.services.ComponentEventDispatcher.dispatch(ComponentEventDispatcher.java:46) at $Dispatcher_1316ffc298a.dispatch($Dispatcher_1316ffc298a.java) at $Dispatcher_1316ffc2981.dispatch($Dispatcher_1316ffc2981.java) at org.apache.tapestry5.services.TapestryModule$RequestHandlerTerminator.service(TapestryModule.java:245) at org.apache.tapestry5.internal.services.RequestErrorFilter.service(RequestErrorFilter.java:26) at $RequestHandler_1316ffc2982.service($RequestHandler_1316ffc2982.java) at org.apache.tapestry5.services.TapestryModule$4.service(TapestryModule.java:778) at $RequestHandler_1316ffc2982.service($RequestHandler_1316ffc2982.java) at org.apache.tapestry5.services.TapestryModule$3.service(TapestryModule.java:767) at $RequestHandler_1316ffc2982.service($RequestHandler_1316ffc2982.java) at org.apache.tapestry5.internal.services.StaticFilesFilter.service(StaticFilesFilter.java:85) at $RequestHandler_1316ffc2982.service($RequestHandler_1316ffc2982.java) at org.apache.tapestry5.internal.services.CheckForUpdatesFilter$2.invoke(CheckForUpdatesFilter.java:90) at org.apache.tapestry5.internal.services.CheckForUpdatesFilter$2.invoke(CheckForUpdatesFilter.java:81) at org.apache.tapestry5.ioc.internal.util.ConcurrentBarrier.withRead(ConcurrentBarrier.java:85) at org.apache.tapestry5.internal.services.CheckForUpdatesFilter.service(CheckForUpdatesFilter.java:103) at $RequestHandler_1316ffc2982.service($RequestHandler_1316ffc2982.java) at $RequestHandler_1316ffc2978.service($RequestHandler_1316ffc2978.java) at org.apache.tapestry5.services.TapestryModule$HttpServletRequestHandlerTerminator.service(TapestryModule.java:197) at org.apache.tapestry5.internal.gzip.GZipFilter.service(GZipFilter.java:53) at $HttpServletRequestHandler_1316ffc297a.service($HttpServletRequestHandler_1316ffc297a.java) at org.apache.tapestry5.internal.services.IgnoredPathsFilter.service(IgnoredPathsFilter.java:62) at $HttpServletRequestFilter_1316ffc2977.service($HttpServletRequestFilter_1316ffc2977.java) at $HttpServletRequestHandler_1316ffc297a.service($HttpServletRequestHandler_1316ffc297a.java) at org.apache.tapestry5.services.TapestryModule$2.service(TapestryModule.java:726) at $HttpServletRequestHandler_1316ffc297a.service($HttpServletRequestHandler_1316ffc297a.java) at $HttpServletRequestHandler_1316ffc2975.service($HttpServletRequestHandler_1316ffc2975.java) at org.apache.tapestry5.TapestryFilter.doFilter(TapestryFilter.java:127) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:172) at org.apache.openejb.tomcat.catalina.OpenEJBValve.invoke(OpenEJBValve.java:45) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:174) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:875) at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665) at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528) at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:689) at java.lang.Thread.run(Thread.java:619) Caused by: java.lang.NullPointerException at org.apache.fop.fo.FOTreeBuilder$MainFOHandler.startElement(FOTreeBuilder.java:265) at org.apache.fop.fo.FOTreeBuilder.startElement(FOTreeBuilder.java:171) at org.apache.xml.serializer.ToXMLSAXHandler.closeStartTag(ToXMLSAXHandler.java:205) at org.apache.xml.serializer.ToSAXHandler.flushPending(ToSAXHandler.java:291) at org.apache.xml.serializer.ToXMLSAXHandler.startPrefixMapping(ToXMLSAXHandler.java:349) at org.apache.xml.serializer.ToXMLSAXHandler.startPrefixMapping(ToXMLSAXHandler.java:319) at org.apache.xalan.templates.ElemLiteralResult.execute(ElemLiteralResult.java:623) at org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2336) ... 87 more

    Users with the same issue

    Unknown visitor1 times, last one,