فشل نشر انفجرت على جبوس 5
-
20-09-2019 - |
سؤال
ولدي تطبيقات الويب التي تنشر غرامة كملف الأذن. ولكن عندما أحاول نشرها في شكل انفجرت فشل مثل هذا:
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>
وأي أفكار؟ شكرا!
المحلول
ما هي بنية الدليل الخادم الخاص بك. يجب أن يكون نشر / ليب / بيرسيستانسي-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/]'
ويقول ان لم يتم العثور على هذا الملف / الدليل ..
نصائح أخرى
ويجب أن تكون بنية الدليل:
وEAR
- warfile.WAR
- ليب
- استمرار-jpa.jar
- ملف جرة آخرين والتي تحتوي على persistence.xml
- enterpricejavabean.ejb
و
وينبغي أن يكون persistace.xml عنصر ملف جرة <جرة ملف> ../ ليب / استمرار-jpa.jar جرة ملف>
لا تنتمي إلى StackOverflow