首页 > 代码库 > spring-framework-3.2.4.RELEASE 整合hibernate-release-4.3.5.Final报错Caused by: java.lang.NoClassDefFound

spring-framework-3.2.4.RELEASE 整合hibernate-release-4.3.5.Final报错Caused by: java.lang.NoClassDefFound

LZ今天整合spring-framework-3.2.4.RELEASE 整合hibernate-release-4.3.5.Final报错Caused by: java.lang.NoClassDefFound

Caused by: java.lang.NoClassDefFoundError: org/hibernate/service/jta/platform/spi/JtaPlatform。

最后从国外一篇文章找到解决办法:原文地址如下:点击打开链接


产生原因是:

Hibernate4.3.X中,org.hibernate.service.jta.platform.spi.JtaPlatform类换成了:

org.hibernate.engine.transaction.jta.platform.spi.JtaPlatform;


原文说解决方法是:

Solution

Since Hibernate 4.3.x, the JtaPlatform class is refactored to a new package. To fix it, downgrade Hibernate to 4.2.x or older, or upgrade the Spring framework.

翻译过来即是,解决方案:

Hibernate用4.2.X及以下版本  或 Spring用4.0及以上版本

经过升级,Spring4.0.3,Hibernate4.3.5后,解决!

楼主亲测可用。