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

后端 未结 2 2010
太阳男子
太阳男子 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-21 23:59

    It's complaining about this code line in org.hibernate.ejb.QueryImpl:

    private javax.persistence.LockModeType jpaLockMode
       = javax.persistence.LockModeType.NONE;
    

    Since javax.persistence.LockModeType.NONE is new in JPA2, I suspect you also have JPA1 on your classpath somewhere. Find and remove it.

提交回复
热议问题