Unsatisfied resolution for @Observes(during=TransactionPhase.AFTER_COMPLETION)
-------------------------------------------------------------------------------
Key: WELD-936
URL:
https://issues.jboss.org/browse/WELD-936
Project: Weld
Issue Type: Bug
Reporter: Sivakumar Thyagarajan
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=[]
]|#]
--
This message is automatically generated by JIRA.
For more information on JIRA, see:
http://www.atlassian.com/software/jira