“java.lang.NoSuchFieldError: NONE” in hibernate with Spring 3, maven, JPA, c3p0

后端 未结 2 2009
太阳男子
太阳男子 2020-12-21 23:19

Problem:

Hibernate is not executing queries correctly. It errors with a problem that appears to be related to slf4j but using any recommended fixes don\'t seem to wo

2条回答
  •  执笔经年
    2020-12-22 00:18

    You included old version of hibernate-commons-annotations, which transitively included JPA 1.0, which conflicts with JPA 2.0 required by Hibernate 3.5.

    Moreover, since Hibernate 3.5 you don't need to include multiple Hibernate artifacts anymore. You only need to declare hibernate-entitymanager in pom.xml, it should be enough for your setup.

    See also:

    • Hibernate Compatibility Matrix

提交回复
热议问题