1 2 Previous Next 18 Replies Latest reply: May 21, 2012 5:48 AM by Rob JJ RSS

Provider org.hibernate.envers.event.EnversIntegrator not found

Eduardo Gómez Newbie

Hello, i'm trying develop a web application with RichFaces 4, JPA 2 and Hibernate on a server Tomcat 7, but when I run the application I get the following error:

 

GRAVE: Servlet.service() for servlet in context with path threw exception [org.hibernate.integrator.spi.Integrator:

Provider org.hibernate.envers.event.EnversIntegrator not found] with root cause

java.util.ServiceConfigurationError: org.hibernate.integrator.spi.Integrator: Provider org.hibernate.envers.event.EnversIntegrator not found

 

 

Please, help me

  • 1. Re: Provider org.hibernate.envers.event.EnversIntegrator not found
    Adam Warski Master

    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 Newbie

    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
    Eduardo Gómez Newbie

    Okay Adam, I'll be waiting for an answer, thanks!

  • 5. Re: Provider org.hibernate.envers.event.EnversIntegrator not found
    Andrig Miller Novice

    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
    Scott Marlow Master

    Andy,

     

    Please post the exception call stack or a link to it.

     

    Thanks,

    Scott

  • 7. Re: Provider org.hibernate.envers.event.EnversIntegrator not found
    Andrig Miller Novice

    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
    Andrig Miller Novice

    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
    Scott Marlow Master

    Thanks for the good news Andy! 

  • 10. Re: Provider org.hibernate.envers.event.EnversIntegrator not found
    David Polo Newbie

    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
    Scott Marlow Master

    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
    Strong Liu Newbie

    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
    Adam Warski Master

    I was just wondering the same thing. Maybe it's on some branch?

     

    Adam

  • 14. Re: Provider org.hibernate.envers.event.EnversIntegrator not found
    Andrig Miller Novice

    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.

1 2 Previous Next