I, too, am getting the error:
java.lang.IllegalAccessError: tried to access method org.hibernate.cfg.Configuration.<init>(Lorg/hibernate/cfg/SettingsFactory;)V from class org.hibernate.ejb.Ejb3Configuration
when executing this line:
Code:
emFactory = Persistence.createEntityManagerFactory("practice");
I am following along in the Java Persistence with Hibernate book trying to learn Hibernate. Everything was going very well until they switched from SessionFactory to EntityManagerFactory. I am using:
Code:
hibernate-core-4.1.1.Final.jar
hibernate-commons-annotations-4.0.1.Final.jar
hibernate-jpa-2.0-api-1.0.1.Final.jar
javassist-3.15.0-GA.jar
hibernate-entitymanager-3.3.2.GA.jar
hibernate-c3p0-4.1.1.Final.jar
log4j-1.2.15.jar
...
I don't think it is because of an old hibernate jar. But Hibernate is new to me. Any ideas?
...