I upgraded my application from hibernate-entitymanager-3.6.10.Final to hibernate-entitymanager-4.1.6.Final by using maven. At the application initialization phase it raised the following error;
java.lang.NoClassDefFoundError: org/hibernate/util/xml/Origin at org.hibernate.ejb.HibernatePersistence.createEntityManagerFactory(HibernatePersistence.java:55) at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:63) at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:47) after i call Persistence.createEntityManagerFactory("OLAHA")
I looked all the jars with the release distribution. The only Origin.java/Origin.class that i could found was in org.hibernate.INTERNAL.util.xml.Origin. Whats wrong with the release?
The reason is class org/hibernate/util/xml/Origin
was removed in Hibernate 4.x, so you have to downgrade it to v.3.6.10 or upgrade all other dependencies.