Uploaded image for project: 'Thorntail'
  1. Thorntail
  2. THORN-1224

Cannot use XSLT: TransformerFactory.newTemplates(...) fails with "Translet class loaded, but unable to create translet instance."

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Done
    • Affects Version/s: 2017.3.3
    • Fix Version/s: 2017.8.1
    • Component/s: None
    • Labels:
      None
    • Steps to Reproduce:
      Hide
      Show
      git clone https://github.com/famod/wildfly-swarm-bugs.git cd SWARM-xalan mvn clean wildfly-swarm:run (with or without -Dwildfly-swarm.useUberJar=true ) Open in browser: http://localhost:8080/test Instead of Transformer.toString() and the transformation result you will see the exception mentioned in the description

      Description

      In our current project we are unable to perform basic XSL transformation via

      TransformerFactory.newInstance().newTemplates(new StreamSource(xslStream))
      

      This yields the following exception:

      javax.xml.transform.TransformerConfigurationException: Translet class loaded, but unable to create translet instance.
      	at com.sun.org.apache.xalan.internal.xsltc.trax.TemplatesImpl.defineTransletClasses(TemplatesImpl.java:437)
      	at com.sun.org.apache.xalan.internal.xsltc.trax.TemplatesImpl.getTransletInstance(TemplatesImpl.java:451)
      	at com.sun.org.apache.xalan.internal.xsltc.trax.TemplatesImpl.newTransformer(TemplatesImpl.java:486)
      	[...]
      

      I extracted a very simple reproducer (just a servlet which performs transformation). This fails on Swarm but the very same WAR just runs fine on vanilla WildFly 10.1.

      The only solution I found so far is to bundle xalan myself which is a hefty 3.3 megabytes.

      There have been similar problems in WildFly Core but these were fixed long ago:

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  heiko.braun Heiko Braun
                  Reporter:
                  famod Falko Modler
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  3 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: