this is my pom.xml:
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-entitymanager</artifactId>
<version>3.5.1-Final</version>
</dependency>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-core</artifactId>
<version>3.6.10.Final</version>
</dependency>
When I have these 2 dependencies, I can successfully run my Hello World example. ( Which uses a persistence.xml and a class which is mapped to a table in my DB with @Entity annotation. However when I change my hibernate-core to:
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-core</artifactId>
<version>4.2.1.Final</version>
</dependency>
I get :
Exception in thread "main" java.lang.IllegalAccessError: tried to access method org.hibernate.cfg.Configuration.(Lorg/hibernate/cfg/SettingsFactory;)V from class org.hibernate.ejb.Ejb3Configuration
So how can I use hibernate core 4.2.1 final as a JPA implementation? I guess there is no version 4 for hibernate-entitymanager ?