org.jboss.weld.exceptions.IllegalArgumentException: WELD-001456: Argument resolvedBean must not be null

JBoss Issue Tracker | Emond Papegaaij | 3 years ago
  1. 0

    When trying to use CDI injection in JPA entity listeners, deployment fails with the following exception: {code} 16:16:37,448 ERROR [org.jboss.msc.service.fail] (ServerService Thread Pool -- 15) MSC000001: Failed to start service jboss.persistenceunit."inject-ear.ear#primary": org.jboss.msc.service.StartException in service jboss.persistenceunit."inject-ear.ear#primary": java.lang.IllegalStateException: JBAS016071: Singleton not set for org.hibernate.boot.registry.classloading.internal.ClassLoaderServiceImpl$AggregatedClassLoader@4eeb95dc. This means that you are trying to access a weld deployment with a Thread Context ClassLoader that is not associated with the deployment. at org.jboss.as.jpa.service.PersistenceUnitServiceImpl$1$1.run(PersistenceUnitServiceImpl.java:169) at org.jboss.as.jpa.service.PersistenceUnitServiceImpl$1$1.run(PersistenceUnitServiceImpl.java:117) at java.security.AccessController.doPrivileged(Native Method) [rt.jar:1.7.0_25] at org.wildfly.security.manager.WildFlySecurityManager.doChecked(WildFlySecurityManager.java:463) [wildfly-security-manager-1.0.0.Beta3.jar:1.0.0.Beta3] at org.jboss.as.jpa.service.PersistenceUnitServiceImpl$1.run(PersistenceUnitServiceImpl.java:178) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [rt.jar:1.7.0_25] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_25] at java.lang.Thread.run(Thread.java:724) [rt.jar:1.7.0_25] at org.jboss.threads.JBossThread.run(JBossThread.java:122) [jboss-threads-2.1.1.Final.jar:2.1.1.Final] Caused by: java.lang.IllegalStateException: JBAS016071: Singleton not set for org.hibernate.boot.registry.classloading.internal.ClassLoaderServiceImpl$AggregatedClassLoader@4eeb95dc. This means that you are trying to access a weld deployment with a Thread Context ClassLoader that is not associated with the deployment. at org.jboss.as.weld.services.ModuleGroupSingletonProvider$TCCLSingleton.get(ModuleGroupSingletonProvider.java:75) at org.jboss.as.weld.services.ModuleGroupSingletonProvider$TCCLSingleton.get(ModuleGroupSingletonProvider.java:128) at org.jboss.weld.Container.instance(Container.java:65) at org.jboss.weld.manager.BeanManagerImpl.getBeans(BeanManagerImpl.java:563) at org.jboss.weld.injection.FieldInjectionPoint.inject(FieldInjectionPoint.java:90) at org.jboss.weld.util.Beans.injectBoundFields(Beans.java:358) at org.jboss.weld.util.Beans.injectFieldsAndInitializers(Beans.java:369) at org.jboss.weld.injection.producer.DefaultInjector.inject(DefaultInjector.java:72) at org.jboss.weld.injection.producer.ResourceInjector.inject(ResourceInjector.java:60) at org.jboss.weld.injection.producer.DefaultInjector$1.proceed(DefaultInjector.java:66) at org.jboss.weld.injection.InjectionContextImpl.run(InjectionContextImpl.java:48) at org.jboss.weld.injection.producer.DefaultInjector.inject(DefaultInjector.java:64) at org.jboss.weld.injection.producer.BasicInjectionTarget.inject(BasicInjectionTarget.java:90) at org.hibernate.jpa.event.internal.jpa.BeanManagerListenerFactory$BeanMetaData.<init>(BeanManagerListenerFactory.java:82) at org.hibernate.jpa.event.internal.jpa.BeanManagerListenerFactory$BeanMetaData.<init>(BeanManagerListenerFactory.java:71) at org.hibernate.jpa.event.internal.jpa.BeanManagerListenerFactory.buildListener(BeanManagerListenerFactory.java:57) at org.hibernate.jpa.event.internal.jpa.LegacyCallbackProcessor.resolveCallbacks(LegacyCallbackProcessor.java:168) at org.hibernate.jpa.event.internal.jpa.LegacyCallbackProcessor.processCallbacksForEntity(LegacyCallbackProcessor.java:71) at org.hibernate.jpa.event.spi.JpaIntegrator.integrate(JpaIntegrator.java:150) at org.hibernate.internal.SessionFactoryImpl.<init>(SessionFactoryImpl.java:310) at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1837) at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl$4.perform(EntityManagerFactoryBuilderImpl.java:854) at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl$4.perform(EntityManagerFactoryBuilderImpl.java:847) at org.hibernate.boot.registry.classloading.internal.ClassLoaderServiceImpl.withTccl(ClassLoaderServiceImpl.java:396) at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.build(EntityManagerFactoryBuilderImpl.java:846) at org.jboss.as.jpa.hibernate4.TwoPhaseBootstrapImpl.build(TwoPhaseBootstrapImpl.java:44) at org.jboss.as.jpa.service.PersistenceUnitServiceImpl$1$1.run(PersistenceUnitServiceImpl.java:151) ... 8 more {code} I've created a small showcase of the problem: https://github.com/papegaaij/listener-injection

    JBoss Issue Tracker | 3 years ago | Emond Papegaaij
    org.jboss.weld.exceptions.IllegalArgumentException: WELD-001456: Argument resolvedBean must not be null
  2. 0

    When trying to use CDI injection in JPA entity listeners, deployment fails with the following exception: {code} 16:16:37,448 ERROR [org.jboss.msc.service.fail] (ServerService Thread Pool -- 15) MSC000001: Failed to start service jboss.persistenceunit."inject-ear.ear#primary": org.jboss.msc.service.StartException in service jboss.persistenceunit."inject-ear.ear#primary": java.lang.IllegalStateException: JBAS016071: Singleton not set for org.hibernate.boot.registry.classloading.internal.ClassLoaderServiceImpl$AggregatedClassLoader@4eeb95dc. This means that you are trying to access a weld deployment with a Thread Context ClassLoader that is not associated with the deployment. at org.jboss.as.jpa.service.PersistenceUnitServiceImpl$1$1.run(PersistenceUnitServiceImpl.java:169) at org.jboss.as.jpa.service.PersistenceUnitServiceImpl$1$1.run(PersistenceUnitServiceImpl.java:117) at java.security.AccessController.doPrivileged(Native Method) [rt.jar:1.7.0_25] at org.wildfly.security.manager.WildFlySecurityManager.doChecked(WildFlySecurityManager.java:463) [wildfly-security-manager-1.0.0.Beta3.jar:1.0.0.Beta3] at org.jboss.as.jpa.service.PersistenceUnitServiceImpl$1.run(PersistenceUnitServiceImpl.java:178) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [rt.jar:1.7.0_25] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_25] at java.lang.Thread.run(Thread.java:724) [rt.jar:1.7.0_25] at org.jboss.threads.JBossThread.run(JBossThread.java:122) [jboss-threads-2.1.1.Final.jar:2.1.1.Final] Caused by: java.lang.IllegalStateException: JBAS016071: Singleton not set for org.hibernate.boot.registry.classloading.internal.ClassLoaderServiceImpl$AggregatedClassLoader@4eeb95dc. This means that you are trying to access a weld deployment with a Thread Context ClassLoader that is not associated with the deployment. at org.jboss.as.weld.services.ModuleGroupSingletonProvider$TCCLSingleton.get(ModuleGroupSingletonProvider.java:75) at org.jboss.as.weld.services.ModuleGroupSingletonProvider$TCCLSingleton.get(ModuleGroupSingletonProvider.java:128) at org.jboss.weld.Container.instance(Container.java:65) at org.jboss.weld.manager.BeanManagerImpl.getBeans(BeanManagerImpl.java:563) at org.jboss.weld.injection.FieldInjectionPoint.inject(FieldInjectionPoint.java:90) at org.jboss.weld.util.Beans.injectBoundFields(Beans.java:358) at org.jboss.weld.util.Beans.injectFieldsAndInitializers(Beans.java:369) at org.jboss.weld.injection.producer.DefaultInjector.inject(DefaultInjector.java:72) at org.jboss.weld.injection.producer.ResourceInjector.inject(ResourceInjector.java:60) at org.jboss.weld.injection.producer.DefaultInjector$1.proceed(DefaultInjector.java:66) at org.jboss.weld.injection.InjectionContextImpl.run(InjectionContextImpl.java:48) at org.jboss.weld.injection.producer.DefaultInjector.inject(DefaultInjector.java:64) at org.jboss.weld.injection.producer.BasicInjectionTarget.inject(BasicInjectionTarget.java:90) at org.hibernate.jpa.event.internal.jpa.BeanManagerListenerFactory$BeanMetaData.<init>(BeanManagerListenerFactory.java:82) at org.hibernate.jpa.event.internal.jpa.BeanManagerListenerFactory$BeanMetaData.<init>(BeanManagerListenerFactory.java:71) at org.hibernate.jpa.event.internal.jpa.BeanManagerListenerFactory.buildListener(BeanManagerListenerFactory.java:57) at org.hibernate.jpa.event.internal.jpa.LegacyCallbackProcessor.resolveCallbacks(LegacyCallbackProcessor.java:168) at org.hibernate.jpa.event.internal.jpa.LegacyCallbackProcessor.processCallbacksForEntity(LegacyCallbackProcessor.java:71) at org.hibernate.jpa.event.spi.JpaIntegrator.integrate(JpaIntegrator.java:150) at org.hibernate.internal.SessionFactoryImpl.<init>(SessionFactoryImpl.java:310) at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1837) at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl$4.perform(EntityManagerFactoryBuilderImpl.java:854) at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl$4.perform(EntityManagerFactoryBuilderImpl.java:847) at org.hibernate.boot.registry.classloading.internal.ClassLoaderServiceImpl.withTccl(ClassLoaderServiceImpl.java:396) at org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.build(EntityManagerFactoryBuilderImpl.java:846) at org.jboss.as.jpa.hibernate4.TwoPhaseBootstrapImpl.build(TwoPhaseBootstrapImpl.java:44) at org.jboss.as.jpa.service.PersistenceUnitServiceImpl$1$1.run(PersistenceUnitServiceImpl.java:151) ... 8 more {code} I've created a small showcase of the problem: https://github.com/papegaaij/listener-injection

    JBoss Issue Tracker | 3 years ago | Emond Papegaaij
    org.jboss.weld.exceptions.IllegalArgumentException: WELD-001456: Argument resolvedBean must not be null
  3. 0

    [WFLY-2387] CDI injection in entity listeners failing - JBoss Issue Tracker

    jboss.org | 7 months ago
    org.jboss.weld.exceptions.IllegalArgumentException: WELD-001456: Argument resolvedBean must not be null
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    org.jboss.weld.exceptions.IllegalArgumentException: WELD-001456: Argument resolvedBean must not be null

    Stack Overflow | 1 year ago | Tiny
    javax.persistence.PersistenceException: [PersistenceUnit: Test-ejbPU] Unable to build Hibernate SessionFactory
  6. 0

    org.jboss.weld.exceptions.IllegalArgumentException: WELD-001456 : Argument resolvedBean must not be null

    Stack Overflow | 10 months ago | Tiny
    javax.persistence.PersistenceException: [PersistenceUnit: Test-ejbPU] Unable to build Hibernate SessionFactory

    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. org.jboss.weld.exceptions.IllegalArgumentException

      WELD-001456: Argument resolvedBean must not be null

      at org.jboss.weld.util.Preconditions.checkArgumentNotNull()
    2. Weld Implementation
      BasicInjectionTarget.inject
      1. org.jboss.weld.util.Preconditions.checkArgumentNotNull(Preconditions.java:40)
      2. org.jboss.weld.manager.BeanManagerImpl.getInjectableReference(BeanManagerImpl.java:797)
      3. org.jboss.weld.injection.FieldInjectionPoint.inject(FieldInjectionPoint.java:92)
      4. org.jboss.weld.util.Beans.injectBoundFields(Beans.java:371)
      5. org.jboss.weld.util.Beans.injectFieldsAndInitializers(Beans.java:382)
      6. org.jboss.weld.injection.producer.ResourceInjector$1.proceed(ResourceInjector.java:70)
      7. org.jboss.weld.injection.InjectionContextImpl.run(InjectionContextImpl.java:48)
      8. org.jboss.weld.injection.producer.ResourceInjector.inject(ResourceInjector.java:72)
      9. org.jboss.weld.injection.producer.BasicInjectionTarget.inject(BasicInjectionTarget.java:121)
      9 frames
    3. org.hibernate.jpa
      JpaIntegrator.integrate
      1. org.hibernate.jpa.event.internal.jpa.BeanManagerListenerFactory$BeanMetaData.<init>(BeanManagerListenerFactory.java:82)
      2. org.hibernate.jpa.event.internal.jpa.BeanManagerListenerFactory$BeanMetaData.<init>(BeanManagerListenerFactory.java:71)
      3. org.hibernate.jpa.event.internal.jpa.BeanManagerListenerFactory.buildListener(BeanManagerListenerFactory.java:57)
      4. org.hibernate.jpa.event.internal.jpa.LegacyCallbackProcessor.resolveCallbacks(LegacyCallbackProcessor.java:167)
      5. org.hibernate.jpa.event.internal.jpa.LegacyCallbackProcessor.processCallbacksForEntity(LegacyCallbackProcessor.java:70)
      6. org.hibernate.jpa.event.spi.JpaIntegrator.integrate(JpaIntegrator.java:150)
      6 frames
    4. Hibernate
      Configuration.buildSessionFactory
      1. org.hibernate.internal.SessionFactoryImpl.<init>(SessionFactoryImpl.java:312)
      2. org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1859)
      2 frames
    5. org.hibernate.jpa
      EntityManagerFactoryBuilderImpl$4.perform
      1. org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl$4.perform(EntityManagerFactoryBuilderImpl.java:852)
      2. org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl$4.perform(EntityManagerFactoryBuilderImpl.java:845)
      2 frames
    6. org.hibernate.boot
      ClassLoaderServiceImpl.withTccl
      1. org.hibernate.boot.registry.classloading.internal.ClassLoaderServiceImpl.withTccl(ClassLoaderServiceImpl.java:398)
      1 frame
    7. org.hibernate.jpa
      EntityManagerFactoryBuilderImpl.build
      1. org.hibernate.jpa.boot.internal.EntityManagerFactoryBuilderImpl.build(EntityManagerFactoryBuilderImpl.java:844)
      1 frame
    8. WildFly Hibernate
      TwoPhaseBootstrapImpl.build
      1. org.jboss.as.jpa.hibernate4.TwoPhaseBootstrapImpl.build(TwoPhaseBootstrapImpl.java:44)
      1 frame
    9. JPA
      PersistenceUnitServiceImpl$1$1.run
      1. org.jboss.as.jpa.service.PersistenceUnitServiceImpl$1$1.run(PersistenceUnitServiceImpl.java:154)
      2. org.jboss.as.jpa.service.PersistenceUnitServiceImpl$1$1.run(PersistenceUnitServiceImpl.java:117)
      2 frames
    10. WildFly Security Manager
      WildFlySecurityManager.doChecked
      1. org.wildfly.security.manager.WildFlySecurityManager.doChecked(WildFlySecurityManager.java:665)
      1 frame
    11. JPA
      PersistenceUnitServiceImpl$1.run
      1. org.jboss.as.jpa.service.PersistenceUnitServiceImpl$1.run(PersistenceUnitServiceImpl.java:182)
      1 frame
    12. Java RT
      Thread.run
      1. java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
      2. java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
      3. java.lang.Thread.run(Thread.java:745)
      3 frames
    13. JBoss Threads
      JBossThread.run
      1. org.jboss.threads.JBossThread.run(JBossThread.java:320)
      1 frame