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
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.
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: