1

在将我的 EAR 应用程序重新部署到 JBoss EAP 5 时,我遇到了这个异常。在服务器启动期间部署应用程序时,一切正常。

Caused by: javax.jdo.JDOFatalInternalException: The PersistenceManagerFactory class must define a static method 
PersistenceManagerFactory getPersistenceManagerFactory(Map props). 
The class "com.force.sdk.jdo.ForceJDOPersistenceManagerFactory"
has the wrong return type for the getPersistenceManagerFactory(Map props) method.
NestedThrowables:
java.lang.ClassCastException: com.force.sdk.jdo.ForceJDOPersistenceManagerFactory cannot be cast to javax.jdo.PersistenceManagerFactory
    at javax.jdo.JDOHelper.invokeGetPersistenceManagerFactoryOnImplementation(JDOHelper.java:1180)
    at javax.jdo.JDOHelper.getPersistenceManagerFactory(JDOHelper.java:803)
    at javax.jdo.JDOHelper.getPersistenceManagerFactory(JDOHelper.java:698)
    at org.datanucleus.jpa.EntityManagerFactoryImpl.initialisePMF(EntityManagerFactoryImpl.java:572)
    at org.datanucleus.jpa.EntityManagerFactoryImpl.<init>(EntityManagerFactoryImpl.java:375)
    at com.force.sdk.jpa.ForceEntityManagerFactory.<init>(ForceEntityManagerFactory.java:63)
    at com.force.sdk.jpa.PersistenceProviderImpl.createEntityManagerFactory(PersistenceProviderImpl.java:79)
    at javax.persistence.Persistence.createEntityManagerFactory(Persistence.java:52)
    at org.springframework.orm.jpa.LocalEntityManagerFactoryBean.createNativeEntityManagerFactory(LocalEntityManagerFactoryBean.java:92)
    at org.springframework.orm.jpa.AbstractEntityManagerFactoryBean.afterPropertiesSet(AbstractEntityManagerFactoryBean.java:308)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1477)
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1417)
    ... 53 more
Caused by: java.lang.ClassCastException: com.force.sdk.jdo.ForceJDOPersistenceManagerFactory cannot be cast to javax.jdo.PersistenceManagerFactory
    at javax.jdo.JDOHelper.invokeGetPersistenceManagerFactoryOnImplementation(JDOHelper.java:1159)
    ... 64 more

我的 /lib 目录内容:

asm-3.3.1.jar               datanucleus-enhancer-2.1.3.jar   force-jpa-22.0.8-BETA.jar      force-wsc-22.0.0.jar           gss-force-proxy-jpa-1.0-SNAPSHOT.jar  js-1.7R2.jar
cglib-2.2.jar               datanucleus-jpa-2.1.3.jar        force-metadata-api-22.0.0.jar  geronimo-jpa_2.0_spec-1.0.jar  javax.inject-1.jar                    transaction-api-1.1.jar
datanucleus-core-2.2.3.jar  force-connector-22.0.8-BETA.jar  force-partner-api-22.0.0.jar   gson-1.7.1.jar                 jdo2-api-2.3-eb.jar

有什么想法/线索吗?谢谢

4

0 回答 0