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

[Deltaspike Data] ContextNotActiveException: WELD-001303: No active contexts for scope type javax.enterprise.context.ApplicationScoped

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Critical
    • Resolution: Fixed
    • 1.7.0
    • 1.7.1
    • Proxy-Module
    • None

    Description

      I have two repositories MyRepository and Java8Repository which refer both to the same entity. They represent a service.
      The first test producer.Java8RepoTest passed but the second test producer.ProducerTest failed in container while trying to call the business method on MyRepository. I have no idea why this coincidence happens but standalone tests running always pass but running them together the testset fails.
      Run Maven command

      mvn --pl features/generic-dao-producer/deltaspike-generic-dao test
      

      and this is my project in GitHub
      https://github.com/Tibor17/javaee-samples.git

      StackTrace:

      org.jboss.weld.context.ContextNotActiveException: WELD-001303: No active contexts for scope type javax.enterprise.context.ApplicationScoped
              at org.jboss.weld.manager.BeanManagerImpl.getContext(BeanManagerImpl.java:689)
              at org.jboss.weld.bean.ContextualInstanceStrategy$DefaultContextualInstanceStrategy.getIfExists(ContextualInstanceStrategy.java:90)
              at org.jboss.weld.bean.ContextualInstanceStrategy$ApplicationScopedContextualInstanceStrategy.getIfExists(ContextualInstanceStrategy.java:124)
              at org.jboss.weld.bean.ContextualInstance.getIfExists(ContextualInstance.java:63)
              at org.jboss.weld.bean.proxy.ContextBeanInstance.getInstance(ContextBeanInstance.java:83)
              at org.jboss.weld.bean.proxy.ProxyMethodHandler.getInstance(ProxyMethodHandler.java:125)
              at org.apache.deltaspike.proxy.impl.invocation.InterceptorLookup$Proxy$_$$_WeldClientProxy.lookup(Unknown Source)
              at org.apache.deltaspike.proxy.impl.invocation.AbstractManualInvocationHandler.invoke(AbstractManualInvocationHandler.java:40)
              at org.apache.deltaspike.proxy.impl.invocation.DelegateManualInvocationHandler.staticInvoke(DelegateManualInvocationHandler.java:39)
      

      Attachments

        Activity

          People

            johndament John D. Ament
            tibordigana Tibor Digana
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: