org.apache.openjpa.persistence.ArgumentException:

时间:2016-08-19 06:44:36

标签: java

如何解决此错误

<openjpa-2.4.1-r422266:1730418 fatal user error> org.apache.openjpa.persistence.ArgumentException: The persistence provider is attempting to use properties in the persistence.xml file to res olve the data source. A Java Database Connectivity (JDBC) driver or data source class name must be specified in the openjpa.ConnectionDriverName or javax.persistence.jdbc.driver property. Th e following properties are available in the configuration: "org.apache.openjpa.jdbc.conf.JDBCConfigurationImpl@442ce698".
  • 未读取persistence.xml。

我的persitence.xml如下

http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd“&GT;

<persistence-unit name="llyEda_PU1" transaction-type="RESOURCE_LOCAL">
    <provider>org.apache.openjpa.persistence.PersistenceProviderImpl</provider>

    <class>com.virtusa.audit.eda.entity.LoadAuditEntity</class>

    <properties>
    <property name="openjpa.ConnectionURL" value="jdbc:oracle:thin:@10.5.112.106:1521:XE" />
        <property name="openjpa.ConnectionDriverName" value="oracle.jdbc.driver.OracleDriver" />
        <property name="openjpa.ConnectionUserName" value="LLY_EDA" />
        <property name="openjpa.ConnectionPassword" value="LLY_EDA" />
        <property name="openjpa.jdbc.SynchronizeMappings" value="buildSchema" />
        <property name="openjpa.Log" value="DefaultLevel=WARN, Tool=INFO" />
        <property name="javax.persistence.jdbc.driver" value="oracle.jdbc.driver.OracleDriver" />

    </properties>
</persistence-unit>

0 个答案:

没有答案