在部署我的应用程序时,我在服务器上收到以下异常在Weblogic 10.3.6中。有什么想法吗?
weblogic.management.DeploymentException:
at weblogic.application.internal.BaseDeployment.throwAppException(BaseDeployment.java:82)
at weblogic.application.internal.BaseDeployment.prepare(BaseDeployment.java:193)
at weblogic.application.internal.EarDeployment.prepare(EarDeployment.java:59)
at weblogic.application.internal.DeploymentStateChecker.prepare(DeploymentStateChecker.java:154)
at weblogic.deploy.internal.targetserver.AppContainerInvoker.prepare(AppContainerInvoker.java:60)
Truncated. see log file for complete stacktrace
Caused By: java.lang.AbstractMethodError: weblogic.deployment.PersistenceUnitInfoImpl.getSharedCacheMode()Ljavax/persistence/SharedCacheMode;
at org.hibernate.ejb.util.LogHelper.logPersistenceUnitInfo(LogHelper.java:38)
at org.hibernate.ejb.Ejb3Configuration.configure(Ejb3Configuration.java:526)
at org.hibernate.ejb.HibernatePersistence.createContainerEntityManagerFactory(HibernatePersistence.java:73)
at weblogic.deployment.BasePersistenceUnitInfoImpl.initializeEntityManagerFactory(BasePersistenceUnitInfoImpl.java:393)
at weblogic.deployment.BasePersistenceUnitInfoImpl.initializeEntityManagerFactory(BasePersistenceUnitInfoImpl.java:386)
Truncated. see log file for complete stacktrace
>
使用spring 3.1.2.RELEASE和hibernate jpa 4.1.7.Final和maven
答案 0 :(得分:2)
确保将以下依赖项添加到项目中:
<dependency>
<groupId>org.hibernate.javax.persistence</groupId>
<artifactId>hibernate-jpa-2.0-api</artifactId>
<version>1.0.0.Final</version>
</dependency>
AbstractMethodError
通常表示类加载问题,就像您的代码是针对JPA 2.0构建的那样,但在运行时,您只能使用JPA 1.0 jar。