Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/jpa/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
jpa2.0+;SPRING 3.1+;Weblogic 10.3.5_Spring_Jpa_Weblogic - Fatal编程技术网

jpa2.0+;SPRING 3.1+;Weblogic 10.3.5

jpa2.0+;SPRING 3.1+;Weblogic 10.3.5,spring,jpa,weblogic,Spring,Jpa,Weblogic,我需要在weblogic容器中创建一个网站,但我不知道如何使用spring将JPA2.0连接到jndi weblogic连接和管理 现在我有一个项目,但有错误,在这种情况下,我的文件设置是: <?xml version="1.0" encoding="UTF-8"?> <persistence version="2.0" xmlns="http://java.sun.com/xml/ns/persistence" xmlns:xsi="http://www.w3.org

我需要在weblogic容器中创建一个网站,但我不知道如何使用spring将JPA2.0连接到jndi weblogic连接和管理

现在我有一个项目,但有错误,在这种情况下,我的文件设置是:

    <?xml version="1.0" encoding="UTF-8"?>
<persistence version="2.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_2_0.xsd">
  <persistence-unit name="unitPU" transaction-type="JTA">
    <provider>org.eclipse.persistence.jpa.PersistenceProvider</provider>
    <jta-data-source>jdbc/fact</jta-data-source>
    <exclude-unlisted-classes>false</exclude-unlisted-classes>
    <properties>
      <property name="eclipselink.ddl-generation" value="drop-and-create-tables"/>
    </properties>
  </persistence-unit>
</persistence>

任何帮助我解决这个错误的示例或想法创建一个项目jpa+spring+weblogic我都会很好

你的类路径中没有类:
org.eclipse.persistence.jpa.PersistenceProvider
。这就是导致异常的原因。因此,将包含此类的
.jar
文件添加到类路径中,或者如果您使用的是Maven,则添加此依赖项:

<dependency>
   <groupId>org.eclipse.persistence</groupId>
   <artifactId>{artifact}</artifactId>
   <version>{version}</version>
   <scope>compile</scope>
</dependency>

org.eclipse.persistence


<dependency>
   <groupId>org.eclipse.persistence</groupId>
   <artifactId>{artifact}</artifactId>
   <version>{version}</version>
   <scope>compile</scope>
</dependency>