Fop
  1. Fop
  2. FOP-1955

No embedded examples is working with FOP.jar 1.0 and JDeveloper 10g

    Details

    • Type: Bug Bug
    • Status: Closed
    • Resolution: Cannot Reproduce
    • Affects Version/s: 1.0
    • Fix Version/s: None
    • Component/s: fo/unqualified
    • Labels:
      None
    • Environment:
      Operating System: Windows XP
      Platform: PC
    • External issue ID:
      51617

      Description

      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.

        Activity

        No work has yet been logged on this issue.

          People

          • Assignee:
            fop-dev
            Reporter:
            daniel.gagnon
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development