XalanJ2
  1. XalanJ2
  2. XALANJ-1549

XSLT Error (javax.xml.transform.TransformerConfigurationException): Could not load the translet class

    Details

      Description

      I am using XSLTC with TraX API. When my XSL size grows bigger, I get an error
      as below while getting new Transformer from the Templates.

      -----------------------------------------------------------------------------
      javax.xml.transform.TransformerConfigurationException: Could not load the
      translet class 'Big'.
      at org.apache.xalan.xsltc.trax.TemplatesImpl.defineTransletClasses
      (TemplatesImpl.java:311)
      at org.apache.xalan.xsltc.trax.TemplatesImpl.getTransletInstance
      (TemplatesImpl.java:329)
      at org.apache.xalan.xsltc.trax.TemplatesImpl.newTransformer
      (TemplatesImpl.java:366)
      at prj_translet.JAXPTransletMultipleTransformations.doTransform
      (JAXPTransletMultipleTransformations.java:28)
      at prj_translet.JAXPTransletMultipleTransformations.main
      (JAXPTransletMultipleTransformations.java:79)
      ---------------------------------------------------------------------------

      I could reproduce this problem with "org.apache.xalan.xslt.Process -XSLTC".

      java -Xss100m -Xms128m -Xmx256m -
      Xbootclasspath/p:.;xalan.jar;xercesImpl.jar;xml-apis.jar;
      org.apache.xalan.xslt.Process -XSLTC -in todo.xml -xsl Big.txt -out
      OutForBig.html

      The XSL that I am using can be found here
      http://www.geocities.com/ial7158/Big.txt

      The java program that I used can be found here:
      http://www.geocities.com/ial7158/JAXPTransletMultipleTransformations.java

      With Regards
      Palanisamy
      Palanisamy_Gounder@stercomm.com

      1. Big.xsl
        100 kB
        Palanisamy Gounder
      2. TestXSLTC.java
        2 kB
        Palanisamy Gounder
      3. input.xml
        9 kB
        Palanisamy Gounder

        Activity

        Hide
        Morris Kwan added a comment -

        This is a ClassFormatError with message "a method is bigger than 65536 bytes".
        The offending method is applyTemplates(). The generated code for the match
        pattern (e.g. match="/order[orderType='3' and productName = 'u2u599']") is in
        applyTemplates rather than in a separate method. The size of this method can
        become very big if you have many templates with complicated match patterns.

        Show
        Morris Kwan added a comment - This is a ClassFormatError with message "a method is bigger than 65536 bytes". The offending method is applyTemplates(). The generated code for the match pattern (e.g. match="/order [orderType='3' and productName = 'u2u599'] ") is in applyTemplates rather than in a separate method. The size of this method can become very big if you have many templates with complicated match patterns.
        Hide
        Henry Zongaro added a comment -
            • Bug 27278 has been marked as a duplicate of this bug. ***
        Show
        Henry Zongaro added a comment - Bug 27278 has been marked as a duplicate of this bug. ***
        Hide
        Brian Minchau added a comment -

        XALANJ-1805 is a duplicate of this issue.

        Show
        Brian Minchau added a comment - XALANJ-1805 is a duplicate of this issue.
        Hide
        Brian Minchau added a comment -

        This issue is a duplicate of XALANJ-1805, which is marked as resolved.

        So I presume that this bug is fixed in the latest 2.7.0 release. If it is not then feel free to re-open this issue with a comment that you still have this problem.

        Regards,
        Brian Minchau

        Show
        Brian Minchau added a comment - This issue is a duplicate of XALANJ-1805 , which is marked as resolved. So I presume that this bug is fixed in the latest 2.7.0 release. If it is not then feel free to re-open this issue with a comment that you still have this problem. Regards, Brian Minchau
        Hide
        Henry Zongaro added a comment -

        I think Brian inadvertently close this as a duplicate of XALANJ-1805, which is in turn marked as a duplicate of this bug report.

        Show
        Henry Zongaro added a comment - I think Brian inadvertently close this as a duplicate of XALANJ-1805 , which is in turn marked as a duplicate of this bug report.
        Hide
        Palanisamy Gounder added a comment -

        These files can be used to re-produce the problem.

        When you run TestXSLTC, you would see an exception like below.
        javax.xml.transform.TransformerConfigurationException: Could not load the translet class 'big'.
        at org.apache.xalan.xsltc.trax.TemplatesImpl.defineTransletClasses(TemplatesImpl.java:311)
        at org.apache.xalan.xsltc.trax.TemplatesImpl.getTransletInstance(TemplatesImpl.java:329)
        at org.apache.xalan.xsltc.trax.TemplatesImpl.newTransformer(TemplatesImpl.java:366)
        at TestXSLTC.doTransform(TestXSLTC.java:22)
        at TestXSLTC.main(TestXSLTC.java:49)

        Show
        Palanisamy Gounder added a comment - These files can be used to re-produce the problem. When you run TestXSLTC, you would see an exception like below. javax.xml.transform.TransformerConfigurationException: Could not load the translet class 'big'. at org.apache.xalan.xsltc.trax.TemplatesImpl.defineTransletClasses(TemplatesImpl.java:311) at org.apache.xalan.xsltc.trax.TemplatesImpl.getTransletInstance(TemplatesImpl.java:329) at org.apache.xalan.xsltc.trax.TemplatesImpl.newTransformer(TemplatesImpl.java:366) at TestXSLTC.doTransform(TestXSLTC.java:22) at TestXSLTC.main(TestXSLTC.java:49)

          People

          • Assignee:
            Unassigned
            Reporter:
            Palanisamy Gounder
          • Votes:
            3 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:

              Development