8 Replies Latest reply on Dec 18, 2015 8:23 AM by Joseph Fouts

    jboss-modules LinkageError / Translet class loaded, but unable to create translet instance.

    Stephen Flynn Newbie

      I am attempting to upgrade from Wildfly 8.0.0.Final to 8.1.0.Final and have encountered the following exception when creating an instance of javax.xml.transform.Transformer from an instance of javax.xml.transform.Templates.

       

      The stack trace is as follows...

       

      Caused by: 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:369) [rt.jar:1.7.0_45]

      at com.sun.org.apache.xalan.internal.xsltc.trax.TemplatesImpl.getTransletInstance(TemplatesImpl.java:383) [rt.jar:1.7.0_45]

      at com.sun.org.apache.xalan.internal.xsltc.trax.TemplatesImpl.newTransformer(TemplatesImpl.java:418) [rt.jar:1.7.0_45]

       

      This is a trapped Linkage error. The stack trace doesn't help much as the root cause of this seems to be that the redirected TransformerFactory produced by jboss-modules (of type __redirected.__TransformerFactory) behaves differently between 8.0.0 (containing jboss-module 1.3.1) and 8.1.0 (containing jboss-module 1.3.3).

       

      When calling TransformerFactory.newTemplates() from  __redirected.__TransformerFactory class in jboss-module 1.3.1 the factory produces an instance of type org.apache.xalan.xsltc.trax.TemplatesImpl.

       

      When calling TransformerFactory.newTemplates() from  __redirected.__TransformerFactory class in jboss-module 1.3.3 the factory produces an instance of type com.sun.org.apache.xalan.internal.xsltc.trax.TemplatesImpl. This appears to be wrong (or at the very least a significant change in behaviour) and leads to a Linkage error when the Templates instance is subsequently used to produce a Transfomer.