Open GoogleCodeExporter opened 9 years ago
I have reproduced the same exception.
And you can find the class related to this at:
https://code.google.com/p/javamelody/source/browse/trunk/javamelody-core/src/mai
n/java/net/bull/javamelody/JpaPersistence.java#31
First, in your META-INF/persistence.xml file, you have written the following
line to monitor JPA:
<provider>net.bull.javamelody.JpaPersistence</provider>
At the moment, a simple and working workaround to the issue is to not try to
monitor JPA when using WildFly 8.2. That is, keep JavaMelody monitoring but
remove "<provider>net.bull.javamelody.JpaPersistence</provider>" from your
META-INF/persistence.xml file.
Then, this issue happens because the context class loader in the webapp does
not find the org.hibernate.jpa.HibernatePersistenceProvider /
org.hibernate.ejb.HibernatePersistence classes.
So, another workaround is to configure the class loading for WildFly: add a
META-INF/MANIFEST.MF file in the resources of your webapp, with the following
content:
Manifest-Version: 1.0
Dependencies: org.hibernate
That will workaround the issue and will probably make the JPA monitoring work.
References:
https://docs.jboss.org/author/display/WFLY8/JPA+Reference+Guide
https://docs.jboss.org/author/display/WFLY8/Class+Loading+in+WildFly
Meanwhile, I have posted an asynchronous question to Sirona and JavaMelody
mailing lists to ask if that could be simplified for a later release:
https://groups.google.com/forum/#!topic/javamelody/u4iDM4lHxsQ
Original comment by evernat@free.fr
on 21 Mar 2015 at 11:37
Original issue reported on code.google.com by
javafx....@gmail.com
on 26 Feb 2015 at 12:12Attachments: