Spring 4.1.0与Hibernate 4.3.5.Final兼容性问题

时间:2014-11-03 22:55:55

标签: java spring hibernate

我尝试在jboss中使用Spring 4.1.0Hibernate 4.3.5.Final但是会​​遇到如下兼容性问题:

Caused by: java.lang.NoClassDefFoundError: org/hibernate/service/classloading/spi/ClassLoaderService
    at org.hibernate.envers.event.EnversIntegrator.integrate(EnversIntegrator.java:64) [hibernate-envers-4.1.7.Final.jar:4.1.7.Final]
    at org.hibernate.internal.SessionFactoryImpl.<init>(SessionFactoryImpl.java:312) [hibernate-core-4.3.5.Final.jar:4.3.5.Final]
    at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1857) [hibernate-core-4.3.5.Final.jar:4.3.5.Final]
    at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl$4.perform(EntityManagerFactoryBuilderImpl.java:850) [hibernate-entitymanager-4.3.5.Final.jar:4.3.5.Final]
    at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl$4.perform(EntityManagerFactoryBuilderImpl.java:843) [hibernate-entitymanager-4.3.5.Final.jar:4.3.5.Final]
    at org.hibernate.boot.registry.classloading.internal.ClassLoaderServiceImpl.withTccl(ClassLoaderServiceImpl.java:397) [hibernate-core-4.3.5.Final.jar:4.3.5.Final]
    at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.build(EntityManagerFactoryBuilderImpl.java:842) [hibernate-entitymanager-4.3.5.Final.jar:4.3.5.Final]
    at org.springframework.orm.jpa.vendor.SpringHibernateJpaPersistenceProvider.createContainerEntityManagerFactory(SpringHibernateJpaPersistenceProvider.java:60) [spring-orm-4.1.0.RELEASE.jar:4.1.0.RELEASE]
    at org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean.createNativeEntityManagerFactory(LocalContainerEntityManagerFactoryBean.java:341) [spring-orm-4.1.0.RELEASE.jar:4.1.0.RELEASE]
    at org.springframework.orm.jpa.AbstractEntityManagerFactoryBean.afterPropertiesSet(AbstractEntityManagerFactoryBean.java:318) [spring-orm-4.1.0.RELEASE.jar:4.1.0.RELEASE]
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1627) [spring-beans-4.1.0.RELEASE.jar:4.1.0.RELEASE]
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1564) [spring-beans-4.1.0.RELEASE.jar:4.1.0.RELEASE]
    ... 20 more
Caused by: java.lang.ClassNotFoundException: org.hibernate.service.classloading.spi.ClassLoaderService from [Module "deployment.springdatajpa-envers.war:main" from Service Module Loader]

我注意到,这个课程已经转移到:

org.hibernate.boot.registry.classloading.spi.ClassLoaderService

所以,问题是,为什么会出现这样的问题?不应该妥善处理??

0 个答案:

没有答案