部署java.lang.ClassNotFoundException时出错:org.hibernate.ejb.HibernatePersistence [英] Error while deployment java.lang.ClassNotFoundException: org.hibernate.ejb.HibernatePersistence
问题描述
当我使用Maven 3将应用程序部署到Weblogic 10.3.6时,虽然我拥有以下功能包括 hibernate-entitymanager
in pom
I am Hibernate 4 Final and Spring 3.
When I am deploying an application to Weblogic 10.3.6 using Maven 3 I am getting the following excpetions although I have included hibernate-entitymanager
in pom
pom.xml
pom.xml
推荐答案
为了使JPA 2.0和Hibernate正常工作在 this
中提到的Weblogic 10.3.6中启用JPA 2.0, / a>文档中,我们需要在Weblogic.xml中具有以下内容:
In order to work JPA 2.0 and Hibernate properly apart from enabling JPA 2.0 in Weblogic 10.3.6 as mentioned in this document, we need to have the following in Weblogic.xml
<container-descriptor>
<prefer-web-inf-classes>true</prefer-web-inf-classes>
</container-descriptor>
通过在Weblogic.xml中包含上述内容解决了这个问题。更多详细信息可以从
Oracle支持 - JPA2在使用Hibernate实现的Weblogic 10.3.5.0中找到
Note 1487264.1
By including the above in Weblogic.xml solved the issue. More details can be found from Oracle Support - JPA2 On Weblogic 10.3.5.0 using Hibernate implementation Note 1487264.1
这篇关于部署java.lang.ClassNotFoundException时出错:org.hibernate.ejb.HibernatePersistence的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!