Uploaded image for project: 'Weld'
  1. Weld
  2. WELD-2602

Report error if undeployed BeanManager used.

    XMLWordPrintable

Details

    • Enhancement
    • Resolution: Unresolved
    • Major
    • None
    • 3.1.2.Final
    • WildFly integration
    • None

    Description

      Debugging an issue recently I was receiving the following error: -

      Caused by: org.jboss.weld.contexts.ContextNotActiveException: WELD-001303: No active contexts for scope type javax.enterprise.context.ApplicationScoped
      	at org.jboss.weld.manager.BeanManagerImpl.getContext(BeanManagerImpl.java:647)
      	at org.jboss.weld.bean.ContextualInstanceStrategy$DefaultContextualInstanceStrategy.getIfExists(ContextualInstanceStrategy.java:89)
      	at org.jboss.weld.bean.ContextualInstanceStrategy$ApplicationScopedContextualInstanceStrategy.getIfExists(ContextualInstanceStrategy.java:123)
      	at org.jboss.weld.bean.ContextualInstance.getIfExists(ContextualInstance.java:63)
      	at org.jboss.weld.bean.proxy.ContextBeanInstance.getInstance(ContextBeanInstance.java:87)
      	at org.jboss.weld.bean.proxy.ProxyMethodHandler.getInstance(ProxyMethodHandler.java:131)
      

      The actual cause of this was an Object was cached to a static in an application server module and re-used by a later deployment.

      The BeanManager associated via the proxy actually had 0 beans registered as the prior deployment had been undeployed.

      Raising this issue to consider if the fact that undeployment has happened can be tracked for a single BeanManager and in turn for an error like this report that it has been undeployed.

      Attachments

        Activity

          People

            Unassigned Unassigned
            darran.lofthouse@redhat.com Darran Lofthouse
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated: