Hibernate EntityManager 4 ClassNotFound Exception

I updated my application from hibernateentitymanager-3.6.10.Final to hibernateentitymanager-4.1.6.Final using maven. At the application initialization stage, the following error occurred:

java.lang.NoClassDefFoundError: org / hibernate / util / xml / Origin at org.hibernate.ejb.HibernatePersistence.createEntityManagerFactory (HibernatePersistence.java:55) in javax.persistence.Persistence.create.av persistence.Persistence.createEntityManagerFactory (Persistence.java:47) after calling Persistence.createEntityManagerFactory ("OLAHA")

I looked at all the banks with the distribution distribution. The only Origin.java/Origin.class I could find was in org.hibernate.INTERNAL.util.xml.Origin. What happened to the release?

+4
source share
1 answer

The reason in the class org/hibernate/util/xml/Origin was removed in Hibernate 4.x, so you need to downgrade it to version v.3.6.10 or update all other dependencies.

+3
source

All Articles