2013-02-13 2 views
0

weblogic 컨테이너에서 웹 사이트를 생성해야하지만 jpa 2.0을 jndi weblogic 연결 및 스프링 관리에 연결하는 방법을 모르겠습니다.JPA 2.0 + SPRING 3.1 + Weblogic 10.3.5

지금은 하나 개의 프로젝트를 가지고 있지만, 오류,이 경우 내 파일 설정은 다음과 같습니다

<?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> 

과 오류는 다음과 같습니다

weblogic.deployment.EnvironmentException: Error processing persistence unit unitPU of module web: Error instantiating the Persistence Provider class org.eclipse.persistence.jpa.PersistenceProvider of the PersistenceUnit factory-web-copyPU: java.lang.ClassNotFoundException: org.eclipse.persistence.jpa.PersistenceProvider 

어떤 샘플 또는 해결하는 데 도움이 어떤 생각 이 오류는 프로젝트 jpa + spring + weblogic을 만듭니다. 나는 위대 할 것입니다.

답변

0

클래스 패스에 org.eclipse.persistence.jpa.PersistenceProvider이 없습니다. 그것이 예외의 원인입니다. 그래서 클래스 패스에이 클래스를 포함하는 .jar 파일을 추가하거나 사용하는 경우 Maven은이 종속성 추가 :

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

을 그리고 적절한 artifactId를 지정합니다.

참조 :

관련 문제