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)

          Attachments

          1. input.xml
            0.1 kB
          2. template.xsl
            3 kB
          3. template.xsl
            3 kB
          4. Transform.java
            0.8 kB

            Issue Links

              Activity

                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: