W
Wili.Firulais
Gast
Hallo,
Ich bekomme die Fehlermeldung:
"No Persistence provider for EntityManager named ..."
Hab schon das Internet zu dem Thema dursucht aber nichts hat geholfen.
Würde mich (nach zwei Tagen herumprobieren) über weitere Ideen, Links, Anregungen, Referenzen und natürlich Lösungen freuen.
* Situation
Axis2 WebService Implementierung mit JPA/Hibernate Zugriff (ohne Java EE) auf eine Oracle 10g Datenbank.
- JBoss 4.0.3SP1
- AXIS 2 (axis2.war)
- Hibernate 3 (antlr-2.7.6.jar, asm.jar, cglib-2.1.3.jar, commons-collections-2.1.1.jar, commons-collections-2.1.1.jar, dom4j-1.6.1.jar, ehcache-1.2.3.jar, ejb3-persistence.jar, hibernate3.jar, hibernate-annotations.jar, hibernate-commons-annotations.jar, hibernate-entitymanager.jar, javassist.jar, jboss-archive-browsing.jar, jta.jar)
- Oracle 10 (dms.jar, ojdbc5dms.jar, ojdl.jar, orai18n.jar)
Wenn jemand Tipps und Erfahrugswerte mit diesem Setup hat wo die .jar Dateien am besten zu plazieren sind wäre echt toll. Als "standalone" funktioniert das POJO (main) welches als WebService für Axis2 definiert wurde. Nach deployment als .aar auf JBoss erhalte ich nach testen (soapUI) nur die Meldung "No Persistence provider for EntityManager named ..."
Vielen dank für alle Rückmeldungen,
Willi
* Vorschläge die mir leider nicht weitergeholfen haben:
Hibernate JPA problem:
“No Persistence provider for EntityManager named …” http://forum.java.sun.com/thread.jspa?threadID=5169272&messageID=9649764
S: There may be a mismatch in your source and configuration. Just make sure you keep those two in sync if you change them. The generated persistence.xml file has the following entry
<persistence-unit name="jee5PU" transaction-type="RESOURCE_LOCAL">
But the generated EntityManagerHelper.java file has this entry
emf = Persistence.createEntityManagerFactory("jee5 pu");
S:
http://www.myeclipseide.com/PNphpBB2-viewtopic-t-19323-sid-298793bf1aea4950e21af1f405f7d14a.html
http://forum.java.sun.com/thread.jspa?threadID=5169272
S: add ejb3-persistence.jar to classpath, as it is Hibernate's wrapper class for the Java persistence API. Note that the above error message also may occurs if hibernate-entitymanager.jar is missing from the classpath.
http://dewarim.de/wms/error/no_persistence_provider_for_entitymanager
S: Check the provider you are using. The problem is your persistence provide is invalid... it should be something like:
<provider>mysql.toplink.essentials.PersistenceProvider</provider>
<provider> oracle.toplink.essentials.PersistenceProvider </provider>
http://www.myeclipseide.com/PNphpBB2-viewtopic-t-17323-sid-08e82e38591eab877e20737ad0e1fc5a.html
S: The META-INF dir under the /src dir is where it needs to be, the classloader doesn't have any access to the META-INF dir under the web project, that is for deployment descriptors for the app server, not for the persistence.xml file (?)
http://www.myeclipseide.com/PNphpBB2-viewtopic-t-17323-sid-08e82e38591eab877e20737ad0e1fc5a.html
S: Your persistence file has to be in META-INF and not directly in the class path. Are you trying to run your code outside of a web container by chance?
The META-INF dir under the /src dir is where it needs to be, the classloader doesn't have any access to the META-INF dir under the web project, that is for deployment descriptors for the app server, not for the persistence.xml file.
S: if this works on your development environment but non the server then check if all needed hibernate libraries are available on the server. If not deploy them to the server/lib or to your service/lib.
Ich bekomme die Fehlermeldung:
"No Persistence provider for EntityManager named ..."
Hab schon das Internet zu dem Thema dursucht aber nichts hat geholfen.
Würde mich (nach zwei Tagen herumprobieren) über weitere Ideen, Links, Anregungen, Referenzen und natürlich Lösungen freuen.
* Situation
Axis2 WebService Implementierung mit JPA/Hibernate Zugriff (ohne Java EE) auf eine Oracle 10g Datenbank.
- JBoss 4.0.3SP1
- AXIS 2 (axis2.war)
- Hibernate 3 (antlr-2.7.6.jar, asm.jar, cglib-2.1.3.jar, commons-collections-2.1.1.jar, commons-collections-2.1.1.jar, dom4j-1.6.1.jar, ehcache-1.2.3.jar, ejb3-persistence.jar, hibernate3.jar, hibernate-annotations.jar, hibernate-commons-annotations.jar, hibernate-entitymanager.jar, javassist.jar, jboss-archive-browsing.jar, jta.jar)
- Oracle 10 (dms.jar, ojdbc5dms.jar, ojdl.jar, orai18n.jar)
Wenn jemand Tipps und Erfahrugswerte mit diesem Setup hat wo die .jar Dateien am besten zu plazieren sind wäre echt toll. Als "standalone" funktioniert das POJO (main) welches als WebService für Axis2 definiert wurde. Nach deployment als .aar auf JBoss erhalte ich nach testen (soapUI) nur die Meldung "No Persistence provider for EntityManager named ..."
Vielen dank für alle Rückmeldungen,
Willi
* Vorschläge die mir leider nicht weitergeholfen haben:
Hibernate JPA problem:
“No Persistence provider for EntityManager named …” http://forum.java.sun.com/thread.jspa?threadID=5169272&messageID=9649764
S: There may be a mismatch in your source and configuration. Just make sure you keep those two in sync if you change them. The generated persistence.xml file has the following entry
<persistence-unit name="jee5PU" transaction-type="RESOURCE_LOCAL">
But the generated EntityManagerHelper.java file has this entry
emf = Persistence.createEntityManagerFactory("jee5 pu");
S:
http://www.myeclipseide.com/PNphpBB2-viewtopic-t-19323-sid-298793bf1aea4950e21af1f405f7d14a.html
http://forum.java.sun.com/thread.jspa?threadID=5169272
S: add ejb3-persistence.jar to classpath, as it is Hibernate's wrapper class for the Java persistence API. Note that the above error message also may occurs if hibernate-entitymanager.jar is missing from the classpath.
http://dewarim.de/wms/error/no_persistence_provider_for_entitymanager
S: Check the provider you are using. The problem is your persistence provide is invalid... it should be something like:
<provider>mysql.toplink.essentials.PersistenceProvider</provider>
<provider> oracle.toplink.essentials.PersistenceProvider </provider>
http://www.myeclipseide.com/PNphpBB2-viewtopic-t-17323-sid-08e82e38591eab877e20737ad0e1fc5a.html
S: The META-INF dir under the /src dir is where it needs to be, the classloader doesn't have any access to the META-INF dir under the web project, that is for deployment descriptors for the app server, not for the persistence.xml file (?)
http://www.myeclipseide.com/PNphpBB2-viewtopic-t-17323-sid-08e82e38591eab877e20737ad0e1fc5a.html
S: Your persistence file has to be in META-INF and not directly in the class path. Are you trying to run your code outside of a web container by chance?
The META-INF dir under the /src dir is where it needs to be, the classloader doesn't have any access to the META-INF dir under the web project, that is for deployment descriptors for the app server, not for the persistence.xml file.
S: if this works on your development environment but non the server then check if all needed hibernate libraries are available on the server. If not deploy them to the server/lib or to your service/lib.