java.lang.InstantiationException: org.hibernate.envers.event.EnversPostCollectionRecreateEventListenerImpl

Hibernate JIRA | Chaitanya | 3 years ago
  1. 0

    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)

    Hibernate JIRA | 3 years ago | Chaitanya
    java.lang.InstantiationException: org.hibernate.envers.event.EnversPostCollectionRecreateEventListenerImpl
  2. 0

    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)

    Hibernate JIRA | 3 years ago | Chaitanya
    java.lang.InstantiationException: org.hibernate.envers.event.EnversPostCollectionRecreateEventListenerImpl
  3. 0

    Mojarra 2.1.0 - FCS doesn't work with tomcat 7

    Stack Overflow | 5 years ago | MahmoudS
    java.lang.InstantiationException: com.sun.faces.application.ServletContextSensitiveSingletonStore
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    GitHub comment 32#6733959

    GitHub | 4 years ago | marioosh-net
    org.skife.jdbi.v2.exceptions.UnableToCreateStatementException: unable to access mapper
  6. 0

    Non IO Exception in readFields doesn't prevent from retrying when it should.

    GitHub | 3 years ago | samarthjain
    java.lang.RuntimeException: java.lang.InstantiationException: com.salesforce.phoenix.expression.function.FloorDateExpression

  1. tzrlk 1 times, last 3 weeks ago
  2. lribeiro 2 times, last 3 months ago
  3. brunosatriani 40 times, last 5 months ago
  4. Diogo Jaym 2 times, last 5 months ago
  5. Ranjana Dangol 12 times, last 5 months ago
7 more registered users
44 unregistered visitors
Not finding the right solution?
Take a tour to get the most out of Samebug.

Tired of useless tips?

Automated exception search integrated into your IDE

Root Cause Analysis

  1. java.lang.InstantiationException

    org.hibernate.envers.event.EnversPostCollectionRecreateEventListenerImpl

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