4

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?

hjunior
  • 91
  • 2
  • 6
  • 3
    org.hibernate.util.xml.Origin was removed in Hibernate 4. I'm afraid your project has some kind od stale reference to version 3.6.10. Try to clean an build again your project. – danny.lesnik Aug 14 '12 at 12:12

1 Answers1

5

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.

Hunter Zhao
  • 4,589
  • 2
  • 25
  • 39