1

在 WebShere 应用程序服务器上运行我的 Web 应用程序时出现以下错误。 Provider error. Provider: com.ibm.websphere.persistence.PersistenceProviderImpl

请找到下面的persistence.xml。请指导我。

<persistence version="1.0" 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_1_0.xsd">
<persistence-unit name="ResourceCommon">
<!--    <jta-data-source>jdbc/RESOURCE</jta-data-source>
    <non-jta-data-source>jdbc/RESOURCE</non-jta-data-source> -->
    <class>com.ibm.session.entity.User</class>
    <properties>
        <!-- use OpenJPA's built-in DataSource for unmanaged connections -->

       <property name="javax.persistence.jdbc.url" value="jdbc:oracle:thin:@localhost:1521:xe" />   
       <property name="javax.persistence.jdbc.driver" value="oracle.jdbc.driver.OracleDriver" />   
       <property name="javax.persistence.jdbc.user" value="lnhk" />   
       <property name="javax.persistence.jdbc.password" value="admin" />
       <!--         
        <property name="openjpa.Connection2UserName" value="lnhk"/>
        <property name="openjpa.Connection2Password" value="admin"/>
        <property name="openjpa.Connection2URL" value="jdbc:oracle:thin:@localhost:1521:xe"/>
        <property name="openjpa.Connection2DriverName" value="oracle.jdbc.driver.OracleDriver"/>
        -->
        <property name="openjpa.RuntimeUnenhancedClasses" value="supported"/>
        <property name="openjpa.Log" value="SQL=DEBUG"/>
        <property name="openjpa.RemoteCommitProvider" value="sjvm"/>
        <property name="openjpa.ConnectionFactoryMode" value="managed"/>
         <property name="openjpa.Compatibility" value="StrictIdentityValues=false"/>
        <property name="openjpa.jdbc.DBDictionary" value="oracle"/>
    </properties>
</persistence-unit>

4

0 回答 0