jpa2.0+;SPRING 3.1+;Weblogic 10.3.5
我需要在weblogic容器中创建一个网站,但我不知道如何使用spring将JPA2.0连接到jndi weblogic连接和管理 现在我有一个项目,但有错误,在这种情况下,我的文件设置是: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
<?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>