[jboss-user] [Beginner's Corner] - Classloading trouble with EJB3 and EclipseLink

Matti Hansson do-not-reply at jboss.com
Thu Sep 23 11:45:13 EDT 2010


Matti Hansson [http://community.jboss.org/people/aznan] created the discussion

"Classloading trouble with EJB3 and EclipseLink"

To view the discussion, visit: http://community.jboss.org/message/563351#563351

--------------------------------------------------------------
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
--------------------------------------------------------------

Reply to this message by going to Community
[http://community.jboss.org/message/563351#563351]

Start a new discussion in Beginner's Corner at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2075]

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-user/attachments/20100923/f6362f33/attachment.html 


More information about the jboss-user mailing list