Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-5008888

XSLTC fails mysteriously (NPE) inside LoadDocument.documentF.

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P3 P3
    • jwsdp-1.4
    • jwsdp-2.0
    • xml

      The JAXB RI build process includes a XSLT transformation on its documents,
      but it fails with the following error:

           [java] javax.xml.transform.TransformerException: com.sun.org.apache.xalan.internal.xsltc.TransletException: java.lang.NullPointerException
           [java] at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.transform(TransformerImpl.java:601)
           [java] at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.transform(TransformerImpl.java:277)
           [java] at com.sun.tools.tocproc.TocProcessor.transform(TocProcessor.java:84)
           [java] at com.sun.tools.tocproc.TocProcessor.run(TocProcessor.java:110)
           [java] at com.sun.tools.tocproc.TocProcessor.main(TocProcessor.java:125)
           [java] Caused by: com.sun.org.apache.xalan.internal.xsltc.TransletException: java.lang.NullPointerException
           [java] at com.sun.org.apache.xalan.internal.xsltc.dom.LoadDocument.documentF(LoadDocument.java:139)
           [java] at GregorSamsa.template$dot$0()
           [java] at GregorSamsa.applyTemplates()
           [java] at GregorSamsa.template$dot$3()
           [java] at GregorSamsa.applyTemplates()
           [java] at GregorSamsa.template$dot$3()
           [java] at GregorSamsa.applyTemplates()
           [java] at GregorSamsa.template$dot$3()
           [java] at GregorSamsa.applyTemplates()
           [java] at GregorSamsa.applyTemplates()
           [java] at GregorSamsa.transform()
           [java] at com.sun.org.apache.xalan.internal.xsltc.runtime.AbstractTranslet.transform(AbstractTranslet.java:580)
           [java] at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.transform(TransformerImpl.java:597)
           [java] ... 4 more


      Looking at the source code of XSLT, there must be something wrong inside the documentF method,
      but because the exception is wrapped and the original stack trace is lost, we can't quite see
      what's the root exception.

      [TransletException should probably be modified to retain the nested exception and print its
      stack trace too to make future debugging easier.]

      The same stylesheet has been working fine before we switch to the renamed jar.
      (Previously we were using Apache Xalan, not XSLTC)

      We tried to make a smaller test case that reproduces this problem, but we couldn't do that.
      So to reproduce the problem, we have to ask you to build the JAXB RI. See the comments section
      for the instruction.

      Alternatively, the JAXP team could fix the TransletException so that it keeps the original exception
      and print its stack trace (much like how java.lang.Throwable in J2SE 1.4 can retain the nested exception.) and give the JAXB team those new jar files.

      Then we can take it from there and hopefully pin-point the error for the JAXP team.
      ###@###.### 2004-03-05
      ###@###.### 2004-03-05

            bhamehta Bhakti Mehta (Inactive)
            kkawagucsunw Kohsuke Kawaguchi (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: