jboss 错误 loader constraint violation

jboss报错

 

java.lang.LinkageError: loader constraint violation: when resolving interface method "org.hibernate.engine.SessionFactoryImplementor.getTransactionManager()Ljavax/transaction/TransactionManager;" the class loader (instance of org/jboss/classloader/spi/base/BaseClassLoader) of the current class, org/springframework/orm/hibernate3/SessionFactoryUtils, and the class loader (instance of org/jboss/classloader/spi/base/BaseClassLoader) for resolved class, org/hibernate/engine/SessionFactoryImplementor, have different Class objects for the type javax/transaction/TransactionManager used in the signature
 

经过确认,现在已修改,修改方法如下:在工程的目录下新建已jboss-web.xml文件,文件内容如下:

<!DOCTYPE jboss-web PUBLIC "-//JBoss//DTD Web Application 5.0//EN"   
"http://www.jboss.org/j2ee/dtd/jboss-web_5_0.dtd">  
<jboss-web>  
<class-loading java2ClassLoadingCompliance='true'>  
       <loader-repository>  
           com.example:archive=unique-archive-name   
           <loader-repository-config>  
               java2ParentDelegaton=true  
           </loader-repository-config>  
       </loader-repository>  
  </class-loading>  
</jboss-web>
 这样就好了

 

你可能感兴趣的:(Web,xml,Hibernate,jboss,orm)