-
1. Re: Provider org.hibernate.envers.event.EnversIntegrator not found
adamw Oct 3, 2011 5:06 AM (in response to eddie_wtf)I had another user report the same problem. I've posted a question on hibernate-dev, as it seems to be a problem with the Integrator discovery mechanism, so I'll let you know once I know something.
Adam
-
2. Re: Provider org.hibernate.envers.event.EnversIntegrator not found
kirill.frolov Oct 3, 2011 5:34 AM (in response to adamw)Yeap, I have exactly the same issue on Tomcat 7. The previous envers version was working fine and after the update to 4.0.0.CR3 I have exactly the same exception. After investigating this a bit I thought that this might be related to classloaders, but not sure. Stacktrace is available here - http://pastie.org/2612279.
May be the following discussion will give a clue to somebody. http://www.mail-archive.com/hibernate-dev@lists.jboss.org/msg06212.html//www.mail-archive.com/hibernate-dev@lists.jboss.org/msg06212.html
-
3. Re: Provider org.hibernate.envers.event.EnversIntegrator not found
eddie_wtf Oct 3, 2011 6:56 PM (in response to adamw)Okay Adam, I'll be waiting for an answer, thanks!
-
4. Re: Provider org.hibernate.envers.event.EnversIntegrator not found
eddie_wtf Oct 3, 2011 6:59 PM (in response to kirill.frolov)Kirill, the link (http://www.mail-archive.com/hibernate-dev@lists.jboss.org/msg06212.html) not working :S
-
5. Re: Provider org.hibernate.envers.event.EnversIntegrator not found
andy.miller Oct 5, 2011 5:42 PM (in response to adamw)Adam Warski wrote:
I had another user report the same problem. I've posted a question on hibernate-dev, as it seems to be a problem with the Integrator discovery mechanism, so I'll let you know once I know something.
Adam
I'm getting the same problem when building AS 7.1.0 from source using my own build of Hibernate 4 CR4 from source integrated into the AS 7.1.0 build. This problem is causing me some major delays in getting some profiling/tuning work done. Any word on what the problem is, and how we can workaround it, or if a fix is available that I could apply?
-
6. Re: Provider org.hibernate.envers.event.EnversIntegrator not found
smarlow Oct 6, 2011 11:19 AM (in response to andy.miller)Andy,
Please post the exception call stack or a link to it.
Thanks,
Scott
-
7. Re: Provider org.hibernate.envers.event.EnversIntegrator not found
andy.miller Oct 6, 2011 11:36 AM (in response to smarlow)Scott Marlow wrote:
Andy,
Please post the exception call stack or a link to it.
Thanks,
Scott
I get the error on deployment of the persistence units, and here is the log information:
15:35:07,726 INFO [org.jboss.jpa] (MSC service thread 1-4) starting Persistence Unit Service 'OrderManagerApp.ear/OrderManagerEJB.jar#batch-services'
15:35:07,849 INFO [org.hibernate.annotations.common.Version] (MSC service thread 1-4) HCANN000001: Hibernate Commons Annotations {4.0.0.CR2}
15:35:07,854 INFO [org.hibernate.Version] (MSC service thread 1-4) HHH000412: Hibernate Core {4.0.0-SNAPSHOT}
15:35:07,856 INFO [org.hibernate.cfg.Environment] (MSC service thread 1-4) HHH000206: hibernate.properties not found
15:35:07,857 INFO [org.hibernate.cfg.Environment] (MSC service thread 1-4) HHH000021: Bytecode provider name : javassist
15:35:07,876 INFO [org.hibernate.ejb.Ejb3Configuration] (MSC service thread 1-4) HHH000204: Processing PersistenceUnitInfo [
name: batch-services
...]
15:35:07,897 INFO [org.jboss.jpa] (MSC service thread 1-26) starting Persistence Unit Service 'OrderManagerApp.ear/OrderManagerEJB.jar#services'
15:35:07,898 INFO [org.hibernate.ejb.Ejb3Configuration] (MSC service thread 1-26) HHH000204: Processing PersistenceUnitInfo [
name: services
...]
15:35:07,901 WARN [org.infinispan.config.ConfigurationValidatingVisitor] (MSC service thread 1-9) ISPN000152: Passivation configured without a valid eviction policy. This could mean that the cache store will never get used unless code calls Cache.evict() manually.
15:35:07,926 ERROR [org.jboss.msc.service.fail] (MSC service thread 1-26) MSC00001: Failed to start service jboss.persistenceunit."OrderManagerApp.ear/OrderManagerEJB.jar#services": org.jboss.msc.service.StartException in service jboss.persistenceunit."OrderManagerApp.ear/OrderManagerEJB.jar#services": Failed to start service
at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1780) [jboss-msc-1.0.1.GA.jar:1.0.1.GA]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110) [:1.6.0_22]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603) [:1.6.0_22]
at java.lang.Thread.run(Thread.java:679) [:1.6.0_22]
Caused by: java.util.ServiceConfigurationError: org.hibernate.integrator.spi.Integrator: Provider org.hibernate.envers.event.EnversIntegrator not found
at java.util.ServiceLoader.fail(ServiceLoader.java:231) [:1.6.0_22]
at java.util.ServiceLoader.access$400(ServiceLoader.java:181) [:1.6.0_22]
at java.util.ServiceLoader$LazyIterator.next(ServiceLoader.java:367) [:1.6.0_22]
at java.util.ServiceLoader$1.next(ServiceLoader.java:438) [:1.6.0_22]
at org.hibernate.service.classloading.internal.ClassLoaderServiceImpl.loadJavaServices(ClassLoaderServiceImpl.java:251)
at org.hibernate.integrator.internal.IntegratorServiceImpl.<init>(IntegratorServiceImpl.java:51)
at org.hibernate.service.BootstrapServiceRegistryBuilder.build(BootstrapServiceRegistryBuilder.java:120)
at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:901)
at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:887)
at org.hibernate.ejb.HibernatePersistence.createContainerEntityManagerFactory(HibernatePersistence.java:73)
at org.jboss.as.jpa.service.PersistenceUnitService.createContainerEntityManagerFactory(PersistenceUnitService.java:143)
at org.jboss.as.jpa.service.PersistenceUnitService.start(PersistenceUnitService.java:77)
at org.jboss.msc.service.ServiceControllerImpl$StartTask.startService(ServiceControllerImpl.java:1824) [jboss-msc-1.0.1.GA.jar:1.0.1.GA]
at org.jboss.msc.service.ServiceControllerImpl$StartTask.run(ServiceControllerImpl.java:1759) [jboss-msc-1.0.1.GA.jar:1.0.1.GA]
... 3 more
-
8. Re: Provider org.hibernate.envers.event.EnversIntegrator not found
andy.miller Oct 6, 2011 2:00 PM (in response to smarlow)Scott Marlow wrote:
Andy,
Please post the exception call stack or a link to it.
Thanks,
Scott
Scott, Steve Ebersole pinged me via IRC, and he found the issue, and I built from source, both Hibernate and AS 7.1 and the issue is gone. I can now deploy and run the application again. The JIRA is:
https://hibernate.onjira.com/browse/HHH-6715
Steve is pushing the change up.
-
9. Re: Provider org.hibernate.envers.event.EnversIntegrator not found
smarlow Oct 6, 2011 2:11 PM (in response to andy.miller)Thanks for the good news Andy!
-
10. Re: Provider org.hibernate.envers.event.EnversIntegrator not found
davidpolo Oct 7, 2011 9:42 AM (in response to andy.miller)Where can I find the workaround?
On Jira I can't see the source code.
Thanks.
-
11. Re: Provider org.hibernate.envers.event.EnversIntegrator not found
smarlow Oct 7, 2011 9:49 AM (in response to davidpolo)Hibernate source is at https://github.com/hibernate/hibernate-core. That will give you a snapshot build of Hibernate.
AS7 source is at https://github.com/jbossas/jboss-as (guide is at community.jboss.org/wiki/HackingOnAS7). You could hack the AS7 pom.xml to reference the snapshot build of Hibernate or simply copy the Hibernate jar into your current AS7/modules/org/hibernate/main/ folder (replacing the current one) and update the module.xml (also in AS7/modules/org/hibernate/main) to use the updated Hibernate jar name.
-
12. Re: Provider org.hibernate.envers.event.EnversIntegrator not found
stliu Oct 8, 2011 2:01 AM (in response to andy.miller)why I don't see the fix from hibernate source .... (i already updated my checkout to the latest)
-
13. Re: Provider org.hibernate.envers.event.EnversIntegrator not found
adamw Oct 10, 2011 6:36 AM (in response to stliu)I was just wondering the same thing. Maybe it's on some branch?
Adam
-
14. Re: Provider org.hibernate.envers.event.EnversIntegrator not found
andy.miller Oct 10, 2011 11:34 AM (in response to stliu)If you want to apply the fix yourself, and build from source, the source file that changed is:
org/hibernate/service/classloading/internal/ClassLoaderServiceImpl.java
The method findClass has a missing return. Without the fix it looks like:
@Override
protected Class<?> findClass(String name) throws ClassNotFoundException {
for ( ClassLoader classLoader : classLoaderArray ) {
try {
classLoader.loadClass( name );
}
catch (Exception ignore) {
}
}
With the fix it is as follows:
@Override
protected Class<?> findClass(String name) throws ClassNotFoundException {
for ( ClassLoader classLoader : classLoaderArray ) {
try {
return classLoader.loadClass( name );
}
catch (Exception ignore) {
}
}
It's as simple as that.