Gwt Datanucleus-尝试实例化实例JPAAAdapter时出错
我的项目基于GWT(2.4),我的目标是实现ReqyestFactory(JPA、Datanucleus、Postgresql)。 在编译过程中,我没有任何错误。但当我向服务器发出请求时,我得到了以下错误:Gwt Datanucleus-尝试实例化实例JPAAAdapter时出错,gwt,jpa-2.0,datanucleus,requestfactory,Gwt,Jpa 2.0,Datanucleus,Requestfactory,我的项目基于GWT(2.4),我的目标是实现ReqyestFactory(JPA、Datanucleus、Postgresql)。 在编译过程中,我没有任何错误。但当我向服务器发出请求时,我得到了以下错误: Caused by: org.datanucleus.exceptions.NucleusUserException: Error : An error occurred trying to instantiate an instance of the API adapter "or
Caused by: org.datanucleus.exceptions.NucleusUserException: Error : An error occurred trying to instantiate an instance of the API adapter "org.datanucleus.api.jpa.JPAAdapter" (perha ps you dont have the requisite datanucleus-api-XXX jar in the CLASSPATH, or the api jar for the persistence spec you are using?) : {1}
在我的类路径中,我有:
- datanucleus-api-jpa-3.1.0-release.jar
- datanucleus-core-3.1.0-release.jar
- datanucleus-rdbms-3.1.0-release.jar
- requestfactory-apt.jar
- requestfactory客户端+src.jar
- requestfactory服务器+src.jar
- geronimo-jpa_2.0_spec-1.1.jar
- postgresql-9.2-1002.jdbc4.jar
<?xml version="1.0" encoding="UTF-8" ?>
<persistence xmlns="http://java.sun.com/xml/ns/persistence"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/persistence
http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd" version="2.0">
<persistence-unit name="DBStorage">
<provider>org.datanucleus.api.jpa.PersistenceProviderImpl</provider>
<class>com.test.domain.Myobj</class>
<exclude-unlisted-classes/>
<properties>
<property name="datanucleus.ConnectionDriverName" value="org.postgresql.Driver" />
<property name="datanucleus.ConnectionURL" value="jdbc:postgresql://localhost:5432/test" />
<property name="datanucleus.ConnectionUserName" value="test" />
<property name="datanucleus.ConnectionPassword" value="123" />
</properties>
</persistence-unit>
</persistence>
org.datanucleus.api.jpa.PersistenceProviderImpl
com.test.domain.Myobj
您能帮我解决这个问题吗?我在您的依赖项中没有看到jdo-api.jar。将依赖项本身添加到复制/粘贴中会让每个人都更高兴:)