nested exception is java.lang.NoClassDefFoundError: org/hibernate/ejb/HibernatePersistence

前端 未结 3 1862
忘了有多久
忘了有多久 2021-01-12 18:54

I\'m trying to configure Spring 3.2, JPA 2.0 with Hibernate 4 as the persistence provider. When I try to deploy the application in Weblogic 10.3.5, I get the following erro

3条回答
  •  独厮守ぢ
    2021-01-12 19:25

    Since you get a java.lang.NoClassDefFoundError (and not a ClassNotFoundException), it's probably some sort of classloading issue.

    It's often caused by importing in the webapp librairies (WEB-INF/lib), JARs that are already available in the application server.

    In your case, I suspect hibernate-jpa-2.0-api.jar.

    Here's two things to try :

    • Exclude hibernate-jpa-2.0-api.jar from your dependencies.

      OR

    • Add in the weblogic.xml file.

提交回复
热议问题