Uploaded image for project: 'XalanJ2'
  1. XalanJ2
  2. XALANJ-2027

transformerexception when transforming large document

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Critical
    • Resolution: Duplicate
    • 2.6
    • 2.7
    • transformation
    • Security Level: No security risk; visible to anyone (Ordinary problems in Xalan projects. Anybody can view the issue.)
    • None
    • window 2000, xalan 2.6, jdk1.4.
    • fp3

    Description

      TransformerException when trying to tranform a large xml document (see stack trace below). If the xml document is small, transformation works fine.

      The problem happens in a Portal environment. I have a portlet which produces xml, and I have an xsl to style the xml produced by the portlet. The generated portlet fragment is then added to the page (response) document, which itself is then transformed using an xsl.
      When the xml produced by the portlet is small (e.g. less then 20000 lines), everything works fine. If the xml is large, then got TransformerException.

      The transformation of the portlet response works (first transformation), but when it comes to building the final response (the second transformation), it failed.

      Since the xsl that we use to create the final response with is the same for all requests, and it works for all other requests (as well as for the same portlet if it produces smaller xml), it looks like the size of the document to style kills the transformer.

      Line#: 90; Column#: 62
      javax.xml.transform.TransformerException: java.lang.ArrayIndexOutOfBoundsException: -2474921
      at org.apache.xalan.templates.ElemValueOf.execute(ElemValueOf.java:292)
      at org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2336)
      at org.apache.xalan.templates.ElemIf.execute(ElemIf.java:161)
      at org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2336)
      at org.apache.xalan.templates.ElemChoose.execute(ElemChoose.java:140)
      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.templates.ElemChoose.execute(ElemChoose.java:140)
      at org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2336)
      at org.apache.xalan.templates.ElemTemplate.execute(ElemTemplate.java:393)
      at org.apache.xalan.templates.ElemCallTemplate.execute(ElemCallTemplate.java:247)
      at org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2336)
      at org.apache.xalan.templates.ElemLiteralResult.execute(ElemLiteralResult.java:682)
      at org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2336)
      at org.apache.xalan.templates.ElemLiteralResult.execute(ElemLiteralResult.java:682)
      at org.apache.xalan.templates.ElemForEach.transformSelectedNodes(ElemForEach.java:420)
      at org.apache.xalan.templates.ElemForEach.execute(ElemForEach.java:259)
      at org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2336)
      at org.apache.xalan.templates.ElemChoose.execute(ElemChoose.java:140)
      at org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2336)
      at org.apache.xalan.templates.ElemLiteralResult.execute(ElemLiteralResult.java:682)
      at org.apache.xalan.templates.ElemForEach.transformSelectedNodes(ElemForEach.java:420)
      at org.apache.xalan.templates.ElemForEach.execute(ElemForEach.java:259)
      at org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2336)
      at org.apache.xalan.templates.ElemLiteralResult.execute(ElemLiteralResult.java:682)
      at org.apache.xalan.templates.ElemForEach.transformSelectedNodes(ElemForEach.java:420)
      at org.apache.xalan.templates.ElemForEach.execute(ElemForEach.java:259)
      at org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2336)
      at org.apache.xalan.templates.ElemLiteralResult.execute(ElemLiteralResult.java:682)
      at org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2336)
      at org.apache.xalan.templates.ElemLiteralResult.execute(ElemLiteralResult.java:682)
      at org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2336)
      at org.apache.xalan.templates.ElemChoose.execute(ElemChoose.java:127)
      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.templates.ElemLiteralResult.execute(ElemLiteralResult.java:682)
      at org.apache.xalan.transformer.TransformerImpl.executeChildTemplates(TransformerImpl.java:2336)
      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.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.novell.afw.util.EboXmlUtil.xslTransform(EboXmlUtil.java:1339)
      at com.novell.afw.portal.aggregation.EboPortalAggregationControllerImpl.stylePortalResponse(EboPortalAggregationController
      Impl.java:1625)
      at com.novell.afw.portal.aggregation.EboPortalAggregationControllerImpl.renderPortalResponse(EboPortalAggregationControlle
      rImpl.java:606)
      at com.novell.afw.portal.aggregation.EboPortalAggregationServlet.handlePortletRequest(EboPortalAggregationServlet.java:586
      )
      at com.novell.afw.portal.aggregation.EboPortalAggregationServlet.callService(EboPortalAggregationServlet.java:203)
      at com.novell.afw.portal.aggregation.EboPortalAggregationServlet.doGet(EboPortalAggregationServlet.java:90)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
      at com.sssw.srv.busobj.AgoFilterChain.doServlet(AgoFilterChain.java:411)
      at com.sssw.srv.busobj.AgoFilterChain.doFilter(AgoFilterChain.java:197)
      at com.sssw.srv.busobj.AgoFilterChain.doFilter(AgoFilterChain.java:89)
      at com.novell.afw.portal.xforms.EboXFormClientDetectionFilter.doFilter(EboXFormClientDetectionFilter.java:97)
      at com.sssw.srv.busobj.AgoFilterChain.doFilter(AgoFilterChain.java:158)
      at com.sssw.srv.resources.AgWarResource.service(AgWarResource.java:633)
      at com.sssw.srv.resources.AgWarURLResource.perform(AgWarURLResource.java:113)
      at com.sssw.srv.http.httpd.perform(httpd.java:5698)
      at com.sssw.srv.http.Client.processRequest(Client.java:905)
      at com.sssw.srv.http.Client.loop(Client.java:1271)
      at com.sssw.srv.http.Client.runConnection(Client.java:1498)
      at com.sssw.srv.http.Client.run(Client.java:1435)
      at java.lang.Thread.run(Thread.java:534)
      Caused by: java.lang.ArrayIndexOutOfBoundsException: -2474921
      at org.apache.xml.serializer.WriterToUTF8Buffered.write(WriterToUTF8Buffered.java:214)
      at org.apache.xml.serializer.WriterToUTF8Buffered.write(WriterToUTF8Buffered.java:195)
      at org.apache.xml.serializer.ToStream.charactersRaw(ToStream.java:1341)
      at org.apache.xml.serializer.ToStream.characters(ToStream.java:1406)
      at org.apache.xml.serializer.ToHTMLStream.characters(ToHTMLStream.java:1433)
      at org.apache.xml.serializer.SerializerBase.characters(SerializerBase.java:958)
      at org.apache.xml.dtm.ref.dom2dtm.DOM2DTM.dispatchNodeData(DOM2DTM.java:1689)
      at org.apache.xml.dtm.ref.dom2dtm.DOM2DTM.dispatchNodeData(DOM2DTM.java:1673)
      at org.apache.xml.dtm.ref.dom2dtm.DOM2DTM.dispatchCharactersEvents(DOM2DTM.java:1623)
      at org.apache.xpath.axes.LocPathIterator.executeCharsToContentHandler(LocPathIterator.java:246)
      at org.apache.xalan.templates.ElemValueOf.execute(ElemValueOf.java:273)
      ... 70 more
      ---------

      Attachments

        Issue Links

          Activity

            People

              zongaro@ca.ibm.com Henry Zongaro
              iyip irene yip
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: