Exclude org.apache.xalan module
shivanand.mutnale May 9, 2018 6:10 AMWe are getting following exception in wildfly-10.1.0.Final
Caused by: com.coverall.exceptions.ServiceException: org.apache.xml.dtm.ref.DTMManagerDefault cannot be cast to org.apache.xml.dtm.DTMManager .
According to the classloading output using -verbose:class on startup of JBoss the following classes are loaded that way:
[Loaded org.apache.xml.dtm.ref.DTMManagerDefault from jar:file:/E:/Wildfly/wildfly-10.1.0.Final/modules/system/layers/base/org/apache/xalan/main/xalan-2.7.1.jbossorg-2.jar!/]
[Loaded org.apache.xml.dtm.ref.DTMManagerDefault from vfs:/E:/Wildfly/wildfly-10.1.0.Final/bin/content/../WEB-INF/lib/xalan-2.7.1.jar]
[Loaded org.apache.xml.dtm.DTMManager from jar:file:/E:/Wildfly/wildfly-10.1.0.Final/modules/system/layers/base/org/apache/xalan/main/xalan-2.7.1.jbossorg-2.jar!/]
These classes are currently loading form xalan-2.7.1.jbossorg-2.jar and we want these classes to be loaded from xalan-2.7.1.jar provided inside war file.
Tried to exclude org.apache.xalan module by excluding the following widlfly modules in jboss-deployment-structure.xml file.But it is not working.
<?xml version="1.0"?> <jboss-deployment-structure> <deployment> <exclusions> <module name="javax.servlet.jstl.api" /> <module name="org.apache.santuario.xmlsec" /> <module name="org.apache.ws.security" /> <module name="org.jboss.as.appclient" /> <module name="org.jboss.as.cli" /> <module name="org.jboss.as.host-controller" /> <module name="org.jboss.as.jdr" /> <module name="org.jboss.as.server" /> <module name="org.jboss.as.standalone" /> <module name="org.jboss.as.webservices.server.integration" /> <module name="org.apache.xerces" /> <module name="org.apache.xalan" /> </exclusions> <dependencies> <system> <paths> <path name="com/sun/org/apache/xerces/internal/jaxp/datatype"/> <path name="com/sun/jndi/rmi" /> <path name="com/sun/jndi/rmi/registry"/> </paths> </system> </dependencies> </deployment> </jboss-deployment-structure>
Please suggest us some solution by which classes would load only from xalan.2.7.1.jar from WAR.
-
jboss-deployment-structure.xml.zip 669 bytes