Hi!
I'm working on a project that is using EclipseLink 2.1.1 for OR- and OX-mapping. When I try to deploy on JBoss 4.2.3.GA I get the following error:
java.lang.LinkageError: loader constraint violation: loader (instance of org/jboss/web/tomcat/service/WebCtxLoader$ENCLoader) previously initiated loading for a different type with name "javax/persistence/LockModeType"
Turns out the EclipseLink jar, which is included in the project war file, has an enum javax.persistence.LockModeType, and another enum with the same name can be found in ejb3-persistence.jar in the JBoss' server lib. This is the jboss-web.xml:
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE jboss-web PUBLIC -//JBoss//DTD Web Application 4.2//EN http://www.jboss.org/j2ee/dtd/jboss-web_4_2.dtd><jboss-web> <context-root>my-project</context-root> <class-loading java2ClassLoadingCompliance="false"> <loader-repository> my-project:archive=my-project <loader-repository-config>java2ParentDelegation=false</loader-repository-config> </loader-repository> </class-loading></jboss-web>
But it doesn't seem to do much good. Please help!
/Matti