我有一個web應用程序,它可以很好地部署爲ear文件。但是,當我試圖把它分解形式部署失敗是這樣的:JBoss 5上的分解部署失敗
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 '[email protected][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>
任何想法?謝謝!
嗯,真 - 我修改了persistence.xml,使其具有 app.ear/lib/persistence-jpa.jar ,現在它工作。我認爲查找會在爆炸耳朵目錄內發生。 –
2009-11-18 10:17:00