I have an ear with the following structure :
The jpaModule.jar contains an META-INF/orm.xml
The problem is, hibernate use dom4j to load the orm.xml
The org.eclipse.birt.runtime-4.2.0.jar unfortunatly contains org.dom4j classes.
So I have a class cast exception :
Caused by: org.dom4j.DocumentException: org.dom4j.DocumentFactory cannot be cast to org.dom4j.DocumentFactory Nested exception: org.dom4j.DocumentFactory cannot be cast to org.dom4j.DocumentFactory
I'm trying to tune classloading by adding in ear/META-INF/jboss-deployment-structure.xml with this :
<?xml version="1.0" encoding="UTF-8"?>
<exclude path="org.dom4j.*" />
It doesn't work, the wiki (https://docs.jboss.org/author/display/AS71/Class+Loading+in+AS7) and xsd (https://github.com/jbossas/jboss-as/blob/master/build/src/main/resources/docs/schema/jboss-deployment-structure-1_2.xsd) doesn't talk much about ear/lib folder and I don't find the correct way to exclude birt's dom4j from classpath.