I've got RESTful web services that I deploy in a .war file in JBoss AS 7.1. So far so good. Now I'm adding a .jar file with JPA 2.0 Entities. When I deploy the .war with the .jar file with the JPA Entities included I get this Exception at deploy time:
org.dom4j.DocumentFactory cannot be cast to org.dom4j.DocumentFactory
This problem is posted numerous times all over the web and there are about half as many suggested solutions but none of them work.
There is no dom4j.jar in my archive. My Hibernate 4.0 dependencies are all <scope>provided</scope>
. None of the .jar files included in my .war file have any dom4j classes in them.
Does anyone know what causes this with JBoss 7.1 and what the solution is?
Thanks.