le déploiement explosée échoue sur JBoss 5
-
20-09-2019 - |
Question
J'ai une application web qui se déploie bien en tant que fichier de l'oreille. Mais lorsque je tente de le déployer sous une forme éclatée, il échoue comme ceci:
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)
Le persistence.xml ressemble à ceci:
<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>
Toutes les idées? Merci!
La solution
Quelle est votre structure de répertoire du serveur. Vous devriez avoir deploy / lib / persistence-jpa.jar / pour que cela fonctionne.
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/]'
dit que ce fichier / répertoire ne se trouve pas ..
Autres conseils
La structure des répertoires doit être:
OREILLE
- warfile.WAR
- lib
- la persistance jpa.jar
- L'autre fichier jar qui contiennent persistence.xml
- enterpricejavabean.ejb
élément de pot de fichier persistace.xml doit être
Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow