2

I'm migrating an application from Glassfish 2.1 to Jboss eap 6.0.1. Now I deploy my app in Jboss correctly but it doesn't work. I have made debug and I saw the problem. When the code arrives to this line:

OutputFormat format = OutputFormat(doc);

It fails. I made a new watch of "OutputFormat(doc)" and in the value appears this: Unknown type "org.apache.xml.serialize.OutputFormat"<

This class is inside xerces library. This library is installed as a module in my jboss. I have tried many things:

1.- Exclude jboss library and included the library in my war. Not deploy.

2.- Include my library (no JBoss' library) as a new module and, in the manifest, add this line: Dependencies: myModuleName. It deploys, but it doesn't work.

3.- The before "solution", and exclude jboss library. Not deploy.

This ocurred when the code arrives at the following line, and I have tried the same solutions:

XPathAPI.selectSingleNode( xmlTempDoc,"//a" )

The error at this time is: Unknown type "org.apache.xpath.XPathAPI"

This packages are in xercesImpl-2.9.1 and xalan-2.7.1 libraries respectively.

Can you help me, please?

Thanks, Regards.

danylum
  • 21
  • 1
  • 4

1 Answers1

1

Try to exclude the default xalan and xerces libraries that come packaged witn JBoss EAP by adding jboss-deployment-structure.xml under /WEB-INF with below content:

<jboss-deployment-structure xmlns="urn:jboss:deployment-structure:1.2">
    <deployment>            
        <exclusions>            
            <module name="org.apache.xalan" />
            <module name="org.apache.xerces" /> 
        </exclusions>
    </deployment>
</jboss-deployment-structure>

Then include yours in some path such as /lib folder.

Victor
  • 2,450
  • 2
  • 23
  • 54
tmarwen
  • 15,750
  • 5
  • 43
  • 62
  • Thanks to response, I understand that you want say jboss-deployment-structure.xml, no? If you want say this, I have tried it already and it doesn't work. – danylum Mar 12 '14 at 13:34
  • Yes that's what I mean, sorry for any mismatch! Have you included your custom libraries after doing so? Could you paste what exception you have exactly when you try it? – tmarwen Mar 12 '14 at 14:26