문제

귀 파일로 잘 배포하는 웹 응용 프로그램이 있습니다. 그러나 폭발 된 형태로 배포하려고하면 다음과 같이 실패합니다.

17:13:17,305 ERROR [AbstractKernelController] Error installing to Start: name=persistence.unit:unitName=app.ear/#app-persistence state=Create
java.lang.RuntimeException: could not find relative path: lib/persistence-jpa.jar
    at org.jboss.jpa.deployment.PersistenceUnitDeployment.getRelativeURL(PersistenceUnitDeployment.java:208)
    at org.jboss.jpa.deployment.PersistenceUnitDeployment.start(PersistenceUnitDeployment.java:267)
.
.
.
Caused by: java.lang.RuntimeException: could not find child 'lib/persistence-jpa.jar' on 'FileHandler@4348388[path= context=file:/home/petteri/bin/jboss-5.1.0.GA/server/standard/deploy/ real=file:/home/petteri/bin/jboss-5.1.0.GA/server/standard/deploy/]'
    at org.jboss.jpa.deployment.PersistenceUnitDeployment.getRelativeURL(PersistenceUnitDeployment.java:203)

Persistence.xml은 다음과 같습니다.

<persistence
    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"
    version="1.0">

    <persistence-unit name="app-persistence">
        <jta-data-source>java:/app</jta-data-source>
        <jar-file>lib/persistence-jpa.jar</jar-file>
        <properties>

 ... some hibernate stuff ...

        </properties>
    </persistence-unit>
</persistence>

어떤 아이디어? 감사!

도움이 되었습니까?

해결책

서버 디렉토리 구조는 무엇입니까? 이것이 작동하려면 배포/lib/persistance-jpa.jar/를 배포해야합니다.

Caused by: java.lang.RuntimeException: could not find child 'lib/persistence-jpa.jar' on
     'FileHandler@4348388[path= context=file:/home/petteri/bin/jboss-5.1.0.GA/server/standard
    /deploy/ real=file:/home/petteri/bin/jboss-5.1.0.GA/server/standard/deploy/]'  

해당 파일/디렉토리가 찾을 수 없다고 말합니다.

다른 팁

디렉토리 구조는 다음과 같아야합니다.


-Warfile.war
- lib
-Peristence-jpa.jar
-Persistence.xml을 포함하는 다른 JAR 파일
-EnterpriceJavabean.ejb


peristace.xml 파일 JAR 요소가 있어야합니다u003Cjar-file> ../lib/persistence-jpa.jaru003C/jar-file>

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top