So I ran into the aforementioned ClassNotFoundException
. Apparently in the newer versions of hibernate org.hibernate.cfg.AnnotationBinder
is dependent on javax.persistence.NamedStoredProcedureQuery
. This is correct behaviour if you are using JPA 2.1. However this is not the case when you need JPA 2.0.
<dependency>
<groupId>org.hibernate.javax.persistence</groupId>
<artifactId>hibernate-jpa-2.0-api</artifactId>
<version>1.0.1.Final</version>
</dependency>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-core</artifactId>
<version>5.2.10.Final</version>
<exclusions>
<exclusion>
<groupId>org.hibernate.javax.persistence</groupId>
<artifactId>hibernate-jpa-2.1-api</artifactId>
</exclusion>
</exclusions>
</dependency>