开发者

Spring 3.0.5 and Hibernate 3.5.3 - wrong package reference?

开发者 https://www.devze.com 2023-03-06 03:14 出处:网络
I am trying to use Spring 3.0.5 with Hibernate 3.5.3-Final and when Spring creates the session,开发者_StackOverflow中文版 it throws an exception:

I am trying to use Spring 3.0.5 with Hibernate 3.5.3-Final and when Spring creates the session,开发者_StackOverflow中文版 it throws an exception:

java.lang.NoClassDefFoundError: org/hibernate/annotations/common/AssertionFailure

The issue is that the AssertionFailure class is actually in the org.hibernate package (not org.hibernate.annotations.common). 3.0.5 is the latest stable release of Spring and Hibernate 3.5.3-Final was released about a year ago, so it seems odd that it would not be supported. Is there some workaround for this issue?


The 3.3.0 version of hibernate-commons-annotations was an erroneous edition. Use 3.2.0.Final. See http://forum.springsource.org/showthread.php?89693-AnnotationSessionFactoryBean-needs-MetadataProvider.


You also need the hibernate commons annotations jar (https://repository.jboss.org/nexus/content/groups/public/org/hibernate/hibernate-commons-annotations/3.3.0.ga/)

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号