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

XALAN: ERROR: 'No more DTM IDs are available' when transforming with lots of temporary result trees

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P3
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 9
    • Component/s: xml
    • Labels:
      None
    • Subcomponent:
    • Resolved In Build:
      b110
    • CPU:
      generic
    • OS:
      generic

      Backports

        Description

        When XSL transformation with Xalan involves too many temporary result trees, the transformation can run out of DTM IDs, resulting in an exception like:
        ERROR: 'No more DTM IDs are available'
        javax.xml.transform.TransformerException: com.sun.org.apache.xml.internal.dtm.DTMException: No more DTM IDs are available
                at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.transform(TransformerImpl.java:746)
                at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.transform(TransformerImpl.java:351)
                at Transform.main(Transform.java:14)

        I'm attaching an example to reproduce.

        Expected output:
        "Looks like no exception. Bye."

        Actual output:
        ERROR: 'No more DTM IDs are available'
        javax.xml.transform.TransformerException: com.sun.org.apache.xml.internal.dtm.DTMException: No more DTM IDs are available
                at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.transform(TransformerImpl.java:746)
                at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.transform(TransformerImpl.java:351)
                at Transform.main(Transform.java:14)
        Caused by: com.sun.org.apache.xml.internal.dtm.DTMException: No more DTM IDs are available
                at com.sun.org.apache.xml.internal.dtm.ref.DTMManagerDefault.addDTM(DTMManagerDefault.java:151)
                at com.sun.org.apache.xalan.internal.xsltc.dom.XSLTCDTMManager.getDTM(XSLTCDTMManager.java:397)
                at com.sun.org.apache.xalan.internal.xsltc.dom.XSLTCDTMManager.getDTM(XSLTCDTMManager.java:215)
                at com.sun.org.apache.xalan.internal.xsltc.dom.SAXImpl.getResultTreeFrag(SAXImpl.java:1831)
                at com.sun.org.apache.xalan.internal.xsltc.dom.DOMAdapter.getResultTreeFrag(DOMAdapter.java:437)
                at template.dodot()
                at template.recursefinal()
                at template.recursefinal()
                at template.recurse2()
                at template.recurse2()
                at template.recurse2()
                at template.recurse2()
                at template.recurse2()
                at template.recurse2()
                at template.recurse2()
                at template.recurse2()
                at template.recurse2()
                at template.recurse2()
                at template.recurse2()
                at template.recurse2()
                at template.recurse2()
                at template.recurse2()
                at template.recurse2()
                at template.recurse2()
                at template.recurse2()
                at template.recurse2()
                at template.recurse1()
                at template.recurse1()
                at template.recurse1()
                at template.recurse1()
                at template.recurse1()
                at template.recurse1()
                at template.recurse1()
                at template.recurse1()
                at template.recurse1()
                at template.recurse1()
                at template.recurse1()
                at template.recurse1()
                at template.recurse1()
                at template.recurse1()
                at template.recurse1()
                at template.recurse1()
                at template.recurse1()
                at template.recurse1()
                at template.recurse1()
                at template.recurse1()
                at template.template$dot$0()
                at template.applyTemplates()
                at template.transform()
                at com.sun.org.apache.xalan.internal.xsltc.runtime.AbstractTranslet.transform(AbstractTranslet.java:620)
                at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.transform(TransformerImpl.java:739)
                ... 2 more
        ---------
        com.sun.org.apache.xml.internal.dtm.DTMException: No more DTM IDs are available
                at com.sun.org.apache.xml.internal.dtm.ref.DTMManagerDefault.addDTM(DTMManagerDefault.java:151)
                at com.sun.org.apache.xalan.internal.xsltc.dom.XSLTCDTMManager.getDTM(XSLTCDTMManager.java:397)
                at com.sun.org.apache.xalan.internal.xsltc.dom.XSLTCDTMManager.getDTM(XSLTCDTMManager.java:215)
                at com.sun.org.apache.xalan.internal.xsltc.dom.SAXImpl.getResultTreeFrag(SAXImpl.java:1831)
                at com.sun.org.apache.xalan.internal.xsltc.dom.DOMAdapter.getResultTreeFrag(DOMAdapter.java:437)
                at template.dodot()
                at template.recursefinal()
                at template.recursefinal()
                at template.recurse2()
                at template.recurse2()
                at template.recurse2()
                at template.recurse2()
                at template.recurse2()
                at template.recurse2()
                at template.recurse2()
                at template.recurse2()
                at template.recurse2()
                at template.recurse2()
                at template.recurse2()
                at template.recurse2()
                at template.recurse2()
                at template.recurse2()
                at template.recurse2()
                at template.recurse2()
                at template.recurse2()
                at template.recurse2()
                at template.recurse1()
                at template.recurse1()
                at template.recurse1()
                at template.recurse1()
                at template.recurse1()
                at template.recurse1()
                at template.recurse1()
                at template.recurse1()
                at template.recurse1()
                at template.recurse1()
                at template.recurse1()
                at template.recurse1()
                at template.recurse1()
                at template.recurse1()
                at template.recurse1()
                at template.recurse1()
                at template.recurse1()
                at template.recurse1()
                at template.recurse1()
                at template.recurse1()
                at template.template$dot$0()
                at template.applyTemplates()
                at template.transform()
                at com.sun.org.apache.xalan.internal.xsltc.runtime.AbstractTranslet.transform(AbstractTranslet.java:620)
                at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.transform(TransformerImpl.java:739)
                at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.transform(TransformerImpl.java:351)
                at Transform.main(Transform.java:14)
        1. input.xml
          0.1 kB
          Christoph Langer
        2. template.xsl
          3 kB
          Christoph Langer
        3. template.xsl
          3 kB
          Christoph Langer
        4. Transform.java
          0.8 kB
          Christoph Langer

          Issue Links

            Activity

            Hide
            hgupdate HG Updates added a comment -
            URL: http://hg.openjdk.java.net/jdk9/dev/jaxp/rev/0fe7231b64a6
            User: joehw
            Date: 2016-03-10 00:10:04 +0000
            Show
            hgupdate HG Updates added a comment - URL: http://hg.openjdk.java.net/jdk9/dev/jaxp/rev/0fe7231b64a6 User: joehw Date: 2016-03-10 00:10:04 +0000
            Hide
            hgupdate HG Updates added a comment -
            URL: http://hg.openjdk.java.net/jdk9/jdk9/jaxp/rev/0fe7231b64a6
            User: lana
            Date: 2016-03-14 15:54:41 +0000
            Show
            hgupdate HG Updates added a comment - URL: http://hg.openjdk.java.net/jdk9/jdk9/jaxp/rev/0fe7231b64a6 User: lana Date: 2016-03-14 15:54:41 +0000

              People

              • Assignee:
                clanger Christoph Langer
                Reporter:
                clanger Christoph Langer
              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: