Uploaded image for project: 'DeltaSpike'
  1. DeltaSpike
  2. DELTASPIKE-1380

Concurrently initialization causes "Argument bean must not be null"

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 1.9.0
    • 1.9.1
    • Proxy-Module
    • None
    • Patch

    Description

      lazyInit() is called concurrently, the first thread should be the only one to initialize it; however, deltaSpikeProxyInvocationHandler has been assigned before all initialization jobs are completed, which sometimes causes issue.

      Caused by: org.jboss.weld.exceptions.IllegalArgumentException: WELD-001456: Argument bean must not be null
      at org.jboss.weld.core@3.1.0.Final//org.jboss.weld.util.Preconditions.checkArgumentNotNull(Preconditions.java:40)
      at org.jboss.weld.core@3.1.0.Final//org.jboss.weld.manager.BeanManagerImpl.getReference(BeanManagerImpl.java:708)
      at org.jboss.weld.core@3.1.0.Final//org.jboss.weld.util.ForwardingBeanManager.getReference(ForwardingBeanManager.java:64)
      at org.jboss.weld.core@3.1.0.Final//org.jboss.weld.bean.builtin.BeanManagerProxy.getReference(BeanManagerProxy.java:87)
      at deployment.nyx.war//org.apache.deltaspike.proxy.api.DeltaSpikeProxyContextualLifecycle.instantiateDelegateInvocationHandler(DeltaSpikeProxyContextualLifecycle.java:177)
      at deployment.nyx.war//org.apache.deltaspike.proxy.api.DeltaSpikeProxyContextualLifecycle.create(DeltaSpikeProxyContextualLifecycle.java:94)
      at deployment.nyx.war//org.apache.deltaspike.core.util.bean.ImmutableBean.create(ImmutableBean.java:72)
      at org.jboss.weld.core@3.1.0.Final//org.jboss.weld.contexts.unbound.DependentContextImpl.get(DependentContextImpl.java:70)
      at org.jboss.weld.core@3.1.0.Final//org.jboss.weld.bean.ContextualInstanceStrategy$DefaultContextualInstanceStrategy.get(ContextualInstanceStrategy.java:100)
      at org.jboss.weld.core@3.1.0.Final//org.jboss.weld.bean.ContextualInstance.get(ContextualInstance.java:50)
      at org.jboss.weld.core@3.1.0.Final//org.jboss.weld.manager.BeanManagerImpl.getReference(BeanManagerImpl.java:694)
      at org.jboss.weld.core@3.1.0.Final//org.jboss.weld.manager.BeanManagerImpl.getInjectableReference(BeanManagerImpl.java:794)
      at org.jboss.weld.core@3.1.0.Final//org.jboss.weld.injection.FieldInjectionPoint.inject(FieldInjectionPoint.java:92)
      at org.jboss.weld.core@3.1.0.Final//org.jboss.weld.util.Beans.injectBoundFields(Beans.java:336)
      at org.jboss.weld.core@3.1.0.Final//org.jboss.weld.util.Beans.injectFieldsAndInitializers(Beans.java:347)
      at org.jboss.weld.core@3.1.0.Final//org.jboss.weld.injection.producer.DefaultInjector$1.proceed(DefaultInjector.java:71)
      at org.jboss.weld.core@3.1.0.Final//org.jboss.weld.injection.InjectionContextImpl.run(InjectionContextImpl.java:48)
      at org.jboss.weld.core@3.1.0.Final//org.jboss.weld.injection.producer.DefaultInjector.inject(DefaultInjector.java:73)
      at org.jboss.weld.core@3.1.0.Final//org.jboss.weld.module.ejb.DynamicInjectionPointInjector.inject(DynamicInjectionPointInjector.java:61)
      at org.jboss.weld.core@3.1.0.Final//org.jboss.weld.module.ejb.SessionBeanInjectionTarget.inject(SessionBeanInjectionTarget.java:138)
      at org.jboss.as.weld@16.0.0.Final//org.jboss.as.weld.injection.WeldInjectionContext.inject(WeldInjectionContext.java:39)
      at org.jboss.as.weld@16.0.0.Final//org.jboss.as.weld.injection.WeldInjectionInterceptor.processInvocation(WeldInjectionInterceptor.java:51)
      at org.jboss.invocation@1.5.2.Final//org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422)
      at org.jboss.as.ee@16.0.0.Final//org.jboss.as.ee.component.AroundConstructInterceptorFactory$1.processInvocation(AroundConstructInterceptorFactory.java:28)
      at org.jboss.invocation@1.5.2.Final//org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422)
      at org.jboss.as.weld@16.0.0.Final//org.jboss.as.weld.injection.WeldInterceptorInjectionInterceptor.processInvocation(WeldInterceptorInjectionInterceptor.java:56)
      at org.jboss.invocation@1.5.2.Final//org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422)
      at org.jboss.as.ee@16.0.0.Final//org.jboss.as.ee.component.ComponentInstantiatorInterceptor.processInvocation(ComponentInstantiatorInterceptor.java:74)
      at org.jboss.invocation@1.5.2.Final//org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422)
      at org.jboss.as.weld@16.0.0.Final//org.jboss.as.weld.interceptors.Jsr299BindingsCreateInterceptor.processInvocation(Jsr299BindingsCreateInterceptor.java:111)
      at org.jboss.invocation@1.5.2.Final//org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422)
      at org.jboss.as.ee@16.0.0.Final//org.jboss.as.ee.component.NamespaceContextInterceptor.processInvocation(NamespaceContextInterceptor.java:50)
      at org.jboss.invocation@1.5.2.Final//org.jboss.invocation.InterceptorContext.proceed(InterceptorContext.java:422)
      at org.jboss.as.ejb3@16.0.0.Final//org.jboss.as.ejb3.tx.CMTTxInterceptor.invokeInOurTx(CMTTxInterceptor.java:237)
      ... 69 more

       

      A suggested fix:

      https://github.com/apache/deltaspike/pull/90

      Attachments

        Activity

          People

            tandraschko Thomas Andraschko
            jw941 Jixing Wang
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: