1 Reply Latest reply on Nov 8, 2006 2:19 AM by norsay

    XML transformer classloader issue

    norsay

      I'm doing some XSL transformation. As it seems each child node of the XML I'm trying to render is beeing duplicated and copied to the upper level.

      example:

      <a>
       <b name="..."/>
      </a>
      
      after transformation:
      output of a
       output of b
      output of b
      
      expected output:
      output of a
       output of b
      


      If the transformation is done as standalone application, everything works as expected. If the transformation is done within JBoss, the transformation failes...

      I read about a classloader issue for javax.xml.transform.TransformerFactory and I tried to fix it as discussed there (removing javax.xml from xml-apis.jar, setting XML stuff with -Djavax... property). However this didn't solve the problem.

      I'm pretty sure this is a problem of classloaders. But I don't know which class is really responsible for the mess :-(

      Any ideas?

      BTW: I'm using JDK 1.5.0_06B05 with JBoss 3.2.8SP1

      Thanks for your help!

        • 1. Re: XML transformer classloader issue
          norsay

          solved the problem myself. Instead of rendering the XSLT on server side (EJB - located in a JAR within the EAR) I'm doing the transformation in my struts action (located in the WAR within the EAR). Ok, it is more a hack than a solution, however it's working now :-)