-
1. Re: Jboss EAP 6.4.4 Class Loading problem
med.amd Sep 29, 2017 5:45 AM (in response to med.amd)The jar jboss-jaxb-api_2.2_spec-1.0.4.Final-redhat-3.jar is included within the module "javax.xml.bind.api".
1- I tried in the begining by excluding this module in the jboss-deployment-structure.xml file.
<exclusions>
<module name="javax.xml.bind.api"/>
</exclusions>
The module was not excluded even with this explicit exclusion.
This module was loaded implicitly by the javaee module.
2- So I tried to exclude the javaee module and put its module.xml content within the jboss-deployment-structure.xml without the javax.xml.bind.api module
<exclusions>
<module name="javaee.api"/>
</exclusions>
<dependencies>
<module name="javax.activation.api" export="true"/>
<module name="javax.annotation.api" export="true"/>
<module name="javax.ejb.api" export="true"/>
<module name="javax.el.api" export="true"/>
<module name="javax.enterprise.api" export="true"/>
<module name="javax.enterprise.deploy.api" export="true"/>
<module name="javax.inject.api" export="true"/>
<module name="javax.interceptor.api" export="true"/>
<module name="javax.jms.api" export="true"/>
<module name="javax.jws.api" export="true"/>
<module name="javax.mail.api" export="true"/>
<module name="javax.management.j2ee.api" export="true"/>
<module name="javax.persistence.api" export="true"/>
<module name="javax.resource.api" export="true"/>
<module name="javax.rmi.api" export="true"/>
<module name="javax.security.auth.message.api" export="true"/>
<module name="javax.security.jacc.api" export="true"/>
<module name="javax.servlet.api" export="true"/>
<module name="javax.servlet.jsp.api" export="true"/>
<module name="javax.transaction.api" export="true"/>
<module name="javax.validation.api" export="true"/>
<module name="javax.ws.rs.api" export="true" services="export"/>
<!-- <module name="javax.xml.bind.api" export="true"/> -->
<module name="javax.xml.registry.api" export="true"/>
<module name="javax.xml.soap.api" export="true"/>
<module name="javax.xml.ws.api" export="true"/>
<!-- This one always goes last. -->
<module name="javax.api" export="true"/>
<dependencies>
This method exclude the javax.xml.bind.api.
But I encoutered this error :
Caused by: java.lang.NoClassDefFoundError: org/apache/cxf/frontend/ClientProxy
I resolved this error by adding cxf in the dependencies:
<module name="org.jboss.ws.cxf.jbossws-cxf-client" services="import" />
<module name="org.apache.cxf.impl">
<imports>
<include path="META-INF"/>
<include path="META-INF/cxf"/>
</imports>
</module>
The jboss-deployment-structure.xml become very verbose...