Uploaded image for project: 'Hibernate ORM'
  1. HHH-8322

Issue with ...EnversPostCollectionRecreateEventListenerImpl configuration from the Hibernate Envers 4.2.2.Final

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Rejected
    • Affects Version/s: 4.2.2
    • Fix Version/s: None
    • Component/s: None
    • Environment:
      hibernate-envers 4.2.2.Final
    • Bug Testcase Reminder (view):

      Bug reports should generally be accompanied by a test case!

    • Last commented by a user?:
      true
    • Sprint:

      Description

      I am trying to configure hibernate-envers-4.2.2 in my application. I added this jar in my pom file

      <dependency>
      <groupId>org.hibernate</groupId>
      <artifactId>hibernate-envers</artifactId>
      <version>4.2.2.Final</version>
      </dependency>

      After this I updated my Persistence.xml

      <property name="hibernate.ejb.event.post-insert" value="org.hibernate.ejb.event.EJB3PostInsertEventListener,org.hibernate.envers.event.EnversPostInsertEventListenerImpl"/>
      <property name="hibernate.ejb.event.post-update" value="org.hibernate.ejb.event.EJB3PostUpdateEventListener,org.hibernate.envers.event.EnversPostUpdateEventListenerImpl"/>
      <property name="hibernate.ejb.event.post-delete" value="org.hibernate.ejb.event.EJB3PostDeleteEventListener,org.hibernate.envers.event.EnversPostDeleteEventListenerImpl"/> <property name="hibernate.ejb.event.pre-collection-update" value="org.hibernate.envers.event.EnversPreCollectionUpdateEventListenerImpl" />
      <property name="hibernate.ejb.event.post-collection-recreate" value="org.hibernate.envers.event.EnversPostCollectionRecreateEventListenerImpl" />
      <property name="hibernate.ejb.event.pre-collection-remove" value="org.hibernate.envers.event.EnversPreCollectionRemoveEventListenerImpl" />

      But after doing this change .. The EnversPreCollectionUpdateEventListenerImpl is not getting Instantiated .. and I am getting below exception while starting my server ( WL 10.3.5)

      Caused By: java.lang.InstantiationException: org.hibernate.envers.event.EnversPostCollectionRecreateEventListenerImpl
      at java.lang.Class.newInstance0(Class.java:340)
      at java.lang.Class.newInstance(Class.java:308)
      at org.hibernate.ejb.event.JpaIntegrator.instantiate(JpaIntegrator.java:257)
      at org.hibernate.ejb.event.JpaIntegrator.integrate(JpaIntegrator.java:137)
      at org.hibernate.internal.SessionFactoryImpl.<init>(SessionFactoryImpl.java:303)
      at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1769)
      at org.hibernate.ejb.EntityManagerFactoryImpl.<init>(EntityManagerFactoryImpl.java:96)
      at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:914)
      at org.hibernate.ejb.Ejb3Configuration.buildEntityManagerFactory(Ejb3Configuration.java:899)
      at org.hibernate.ejb.HibernatePersistence.createContainerEntityManagerFactory(HibernatePersistence.java:76)
      at weblogic.deployment.BasePersistenceUnitInfoImpl.initializeEntityManagerFactory(BasePersistenceUnitInfoImpl.java:393)
      at weblogic.deployment.BasePersistenceUnitInfoImpl.initializeEntityManagerFactory(BasePersistenceUnitInfoImpl.java:386)
      at weblogic.deployment.BasePersistenceUnitInfoImpl.<init>(BasePersistenceUnitInfoImpl.java:158)
      at weblogic.deployment.PersistenceUnitInfoImpl.<init>(PersistenceUnitInfoImpl.java:46)
      at weblogic.deployment.AbstractPersistenceUnitRegistry.storeDescriptors(AbstractPersistenceUnitRegistry.java:349)
      at weblogic.deployment.AbstractPersistenceUnitRegistry.loadPersistenceDescriptor(AbstractPersistenceUnitRegistry.java:263)
      at weblogic.deployment.ModulePersistenceUnitRegistry.<init>(ModulePersistenceUnitRegistry.java:69)
      at weblogic.ejb.container.deployer.EJBModule.setupPersistenceUnitRegistry(EJBModule.java:223)
      at weblogic.ejb.container.deployer.EJBModule$1.execute(EJBModule.java:324)
      at weblogic.deployment.PersistenceUnitRegistryInitializer.setupPersistenceUnitRegistries(PersistenceUnitRegistryInitializer.java:62)
      at weblogic.servlet.internal.WebAppModule.initPersistenceUnitRegistry(WebAppModule.java:411)
      at weblogic.servlet.internal.WebAppModule.prepare(WebAppModule.java:365)
      at weblogic.application.internal.flow.ScopedModuleDriver.prepare(ScopedModuleDriver.java:176)
      at weblogic.application.internal.flow.ModuleListenerInvoker.prepare(ModuleListenerInvoker.java:199)
      at weblogic.application.internal.flow.DeploymentCallbackFlow$1.next(DeploymentCallbackFlow.java:517)
      at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:52)
      at weblogic.application.internal.flow.DeploymentCallbackFlow.prepare(DeploymentCallbackFlow.java:159)
      at weblogic.application.internal.flow.DeploymentCallbackFlow.prepare(DeploymentCallbackFlow.java:45)
      at weblogic.application.internal.BaseDeployment$1.next(BaseDeployment.java:613)
      at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:52)
      at weblogic.application.internal.BaseDeployment.prepare(BaseDeployment.java:184)
      at weblogic.application.internal.EarDeployment.prepare(EarDeployment.java:58)
      at weblogic.application.internal.DeploymentStateChecker.prepare(DeploymentStateChecker.java:154)
      at weblogic.deploy.internal.targetserver.AppContainerInvoker.prepare(AppContainerInvoker.java:60)
      at weblogic.deploy.internal.targetserver.AppDeployment.prepare(AppDeployment.java:141)
      at weblogic.management.deploy.internal.DeploymentAdapter$1.doPrepare(DeploymentAdapter.java:39)
      at weblogic.management.deploy.internal.DeploymentAdapter.prepare(DeploymentAdapter.java:191)
      at weblogic.management.deploy.internal.AppTransition$1.transitionApp(AppTransition.java:21)
      at weblogic.management.deploy.internal.ConfiguredDeployments.transitionApps(ConfiguredDeployments.java:240)
      at weblogic.management.deploy.internal.ConfiguredDeployments.prepare(ConfiguredDeployments.java:165)
      at weblogic.management.deploy.internal.ConfiguredDeployments.deploy(ConfiguredDeployments.java:122)
      at weblogic.management.deploy.internal.DeploymentServerService.resume(DeploymentServerService.java:180)
      at weblogic.management.deploy.internal.DeploymentServerService.start(DeploymentServerService.java:96)
      at weblogic.t3.srvr.SubsystemRequest.run(SubsystemRequest.java:64)
      at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)
      at weblogic.work.ExecuteThread.run(ExecuteThread.java:178)

        Attachments

          Activity

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: