]
Fabien KOCIK commented on WFLY-3335:
------------------------------------
Hello,
Encountering the same issues applying some XSL templates on provided XML files in EJB bean
startup context.
My EAR works fine in JBoss AS 7.
Regards.
JAXB transformer initiation
---------------------------
Key: WFLY-3335
URL:
https://issues.jboss.org/browse/WFLY-3335
Project: WildFly
Issue Type: Bug
Security Level: Public(Everyone can see)
Components: Class Loading
Affects Versions: 8.0.0.Final, 8.1.0.CR1
Environment: Ubuntu 14.04 with java 7 openjdk
Reporter: Ghet Ghetolay
Assignee: David Lloyd
Priority: Blocker
I'm not directly using JAXB and SaxTransformer, it's part of a the [dcm4chee-arc
project|https://github.com/dcm4che/dcm4chee-arc] which I tried to use on Wildfly. It's
a rather big and complicated project so I've create a test application to illustrate
the bug. I've used a JAR-RS application to illustrate the bug (like the original case)
but this should not be related to it.
{code:title=TestRS.java}
@Path("test")
public class TestRS {
private static SAXTransformerFactory factory =
(SAXTransformerFactory) TransformerFactory.newInstance();
@GET
public Response test(){
try {
Templates template = factory.newTemplates(new StreamSource(
TestRS.class.getResource("json_compact.xsl").toString()));
factory.newTransformerHandler(template);
} catch (TransformerConfigurationException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
return Response.ok().build();
}
}
{code}
{code:title=json_compact.xsl}
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0">
<xsl:output method="text"/>
<xsl:template match="/">
<xsl:text>Test</xsl:text>
</xsl:template>
</xsl:stylesheet>
{code}
{quote}
15:24:48,564 ERROR [stderr] (default task-1)
javax.xml.transform.TransformerConfigurationException: Translet class loaded, but unable
to create translet instance.
15:24:48,564 ERROR [stderr] (default task-1) at
com.sun.org.apache.xalan.internal.xsltc.trax.TemplatesImpl.defineTransletClasses(TemplatesImpl.java:369)
15:24:48,565 ERROR [stderr] (default task-1) at
com.sun.org.apache.xalan.internal.xsltc.trax.TemplatesImpl.getTransletInstance(TemplatesImpl.java:383)
15:24:48,565 ERROR [stderr] (default task-1) at
com.sun.org.apache.xalan.internal.xsltc.trax.TemplatesImpl.newTransformer(TemplatesImpl.java:418)
15:24:48,565 ERROR [stderr] (default task-1) at
com.sun.org.apache.xalan.internal.xsltc.trax.TransformerFactoryImpl.newTransformerHandler(TransformerFactoryImpl.java:1062)
15:24:48,565 ERROR [stderr] (default task-1) at
__redirected.__TransformerFactory.newTransformerHandler(__TransformerFactory.java:193)
15:24:48,566 ERROR [stderr] (default task-1) at test.TestRS.test(TestRS.java:25)
{quote}
I've discovered that the initial exception is :
{quote}
java.lang.NoClassDefFoundError:
com/sun/org/apache/xalan/internal/xsltc/runtime/AbstractTranslet
{quote}
Both my test case and dcm4che-arc project works fine on JBoss 7.1.1.Final.