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

Unsatisfied resolution for @Observes(during=TransactionPhase.AFTER_COMPLETION)

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Major
    • 1.1.2.Final
    • None
    • None
    • None
    • Hide

      To reproduce in GlassFish:

      • download latest 3.1.1 promoted build [1]
      • unzip, and start domain
        $INSTALL_ROOT/bin/asadmin start-domain domain1
      • deploy app at [2]
        $INSTALL_ROOT/bin/asadmin
      • hit web application at http://localhost:8080/AsyncWebApp/resources/generic
      • error message "WELD-000401 Failure while notifying an observer of event [package].ExecuteFlowStepEvent" is in $INSTALL_ROOT/domains/domain1/logs/server.log. The above error (WELD-001308) is the root error that you can observe using a debugger.

      [1] http://dlc.sun.com.edgesuite.net/glassfish/3.1.1/promoted/glassfish-3.1.1-b09.zip
      [2] war is in http://java.net/jira/browse/GLASSFISH-16513 at http://java.net/jira/secure/attachment/45774/AsyncWebApp.war

      Show
      To reproduce in GlassFish: download latest 3.1.1 promoted build [1] unzip, and start domain $INSTALL_ROOT/bin/asadmin start-domain domain1 deploy app at [2] $INSTALL_ROOT/bin/asadmin hit web application at http://localhost:8080/AsyncWebApp/resources/generic error message " WELD-000401 Failure while notifying an observer of event [package] .ExecuteFlowStepEvent" is in $INSTALL_ROOT/domains/domain1/logs/server.log. The above error (WELD-001308) is the root error that you can observe using a debugger. [1] http://dlc.sun.com.edgesuite.net/glassfish/3.1.1/promoted/glassfish-3.1.1-b09.zip [2] war is in http://java.net/jira/browse/GLASSFISH-16513 at http://java.net/jira/secure/attachment/45774/AsyncWebApp.war

    Description

      While investigating GLASSFISH-16513 (http://java.net/jira/browse/GLASSFISH-16513 ), I see that we run into the following root cause:
      > [#|2011-06-26T22:15:38.271+0530|SEVERE|glassfish3.2|javax.enterprise.system.std.com.sun.enterprise.server.logging|_ThreadID=12;_ThreadName=Thread-2;|org.jboss.weld.exceptions.UnsatisfiedResolutionException: WELD-001308 Unable to resolve any beans for Types: [interface org.jboss.weld.context.ejb.EjbRequestContext]; Bindings: [@javax.enterprise.inject.Any(), @javax.enterprise.inject.Default(), @org.jboss.weld.context.unbound.Unbound()]
      > at org.jboss.weld.manager.BeanManagerImpl.getBean(BeanManagerImpl.java:809)
      > at org.jboss.weld.bean.builtin.InstanceImpl.get(InstanceImpl.java:108)
      > at org.jboss.weld.event.DeferredEventNotification$RunInRequest.run(DeferredEventNotification.java:103)
      > at org.jboss.weld.event.DeferredEventNotification.run(DeferredEventNotification.java:64)
      > at org.jboss.weld.event.TransactionSynchronizedRunnable.afterCompletion(TransactionSynchronizedRunnable.java:62)
      > at com.sun.enterprise.transaction.JavaEETransactionImpl.commit(JavaEETransactionImpl.java:537)
      > at com.sun.enterprise.transaction.JavaEETransactionManagerSimplified.commit(JavaEETransactionManagerSimplified.java:852)
      > at com.sun.ejb.containers.BaseContainer.completeNewTx(BaseContainer.java:5138)
      > at com.sun.ejb.containers.BaseContainer.postInvokeTx(BaseContainer.java:4903)
      > at com.sun.ejb.containers.BaseContainer.postInvoke(BaseContainer.java:2044)
      > at com.sun.ejb.containers.EjbAsyncTask.call(EjbAsyncTask.java:114)
      > at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
      > at java.util.concurrent.FutureTask.run(FutureTask.java:138)
      > at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
      > at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
      > at java.lang.Thread.run(Thread.java:662)
      > |#]

      I am able to confirm the following BDA hierarchy being sent during deployment, that GF adds EJBServices to the DeploymentImpl, and that the AsyncSessionBean is being identified as a EJB in the root BeanManager.

      An unsatisfied resolution exception still occurs for org.jboss.weld.context.ejb.EjbRequestContext.

      > [#|2011-06-26T22:40:09.337+0530|FINE|glassfish3.2|org.glassfish.weld.DeploymentImpl|_ThreadID=12;_ThreadName=Thread-2;ClassName=org.glassfish.weld.DeploymentImpl;MethodName=getBeanDeploymentArchives;|DeploymentImpl::getBDAs. Returning
      > [|ID: AsyncWebApp, bdaType= WAR, accessibleBDAs #:11, [WEB-INF/lib/jersey-server-1.3,,,,,,,,,,,], Bean Classes #: 4,[test.async.MyAsyncSessionBean, test.async.GenericResource, test.async.MyActor, test.async.MyEvent], ejbs=[test.async.MyActor, test.async.MyAsyncSessionBean, test.async.GenericResource]
      > |---->ID: WEB-INF/lib/jersey-server-1.3, bdaType= UNKNOWN, accessibleBDAs #:1, [AsyncWebApp,], Bean Classes #: 0,, ejbs=[]
      > |---->ID: com.sun.jersey.server.impl.cdi.CDIExtension, bdaType= UNKNOWN, accessibleBDAs #:0, [], Bean Classes #: 1,[com.sun.jersey.server.impl.cdi.CDIExtension], ejbs=[]
      > |---->ID: org.glassfish.osgicdi.impl.OSGiServiceExtension, bdaType= UNKNOWN, accessibleBDAs #:0, [], Bean Classes #: 1,[org.glassfish.osgicdi.impl.OSGiServiceExtension], ejbs=[]
      > |---->ID: javax.ws.rs.core.Application, bdaType= UNKNOWN, accessibleBDAs #:0, [], Bean Classes #: 1,[javax.ws.rs.core.Application], ejbs=[]
      > |---->ID: javax.ws.rs.core.HttpHeaders, bdaType= UNKNOWN, accessibleBDAs #:0, [], Bean Classes #: 1,[javax.ws.rs.core.HttpHeaders], ejbs=[]
      > |---->ID: javax.ws.rs.ext.Providers, bdaType= UNKNOWN, accessibleBDAs #:0, [], Bean Classes #: 1,[javax.ws.rs.ext.Providers], ejbs=[]
      > |---->ID: javax.ws.rs.core.Request, bdaType= UNKNOWN, accessibleBDAs #:0, [], Bean Classes #: 1,[javax.ws.rs.core.Request], ejbs=[]
      > |---->ID: javax.ws.rs.core.SecurityContext, bdaType= UNKNOWN, accessibleBDAs #:0, [], Bean Classes #: 1,[javax.ws.rs.core.SecurityContext], ejbs=[]
      > |---->ID: javax.ws.rs.core.UriInfo, bdaType= UNKNOWN, accessibleBDAs #:0, [], Bean Classes #: 1,[javax.ws.rs.core.UriInfo], ejbs=[]
      > |---->ID: com.sun.jersey.core.util.FeaturesAndProperties, bdaType= UNKNOWN, accessibleBDAs #:0, [], Bean Classes #: 1,[com.sun.jersey.core.util.FeaturesAndProperties], ejbs=[]
      > |---->ID: com.sun.jersey.spi.MessageBodyWorkers, bdaType= UNKNOWN, accessibleBDAs #:0, [], Bean Classes #: 1,[com.sun.jersey.spi.MessageBodyWorkers], ejbs=[]
      > ]|#]

      Attachments

        Activity

          People

            sdouglas1@redhat.com Stuart Douglas
            sivakumart_jira Sivakumar Thyagarajan (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: