[jboss-user] [JBoss Seam] - Re: Unable to use @Asynchronous annotation on Glassfish serv

usedtoclimb do-not-reply at jboss.com
Wed Dec 26 14:45:07 EST 2007


I was not declaring jboss-seam.jar in application.xml so I resolved that and now a timer runs but it cannot find the EJB containing the @Asynchronous method (SystemManagerBean).  

Here is what is displayed when the timer runs (emphasis added)...

EJB5018: An exception was thrown during an ejb invocation on [Dispatcher]
javax.ejb.EJBException
        at com.sun.ejb.containers.BaseContainer.processSystemException(BaseContainer.java:3869)
        at com.sun.ejb.containers.BaseContainer.completeNewTx(BaseContainer.java:3769)
        at com.sun.ejb.containers.BaseContainer.postInvokeTx(BaseContainer.java:3571)
        at com.sun.ejb.containers.BaseContainer.postInvoke(BaseContainer.java:1354)
        at com.sun.ejb.containers.BaseContainer.postInvoke(BaseContainer.java:1316)
        at com.sun.ejb.containers.BaseContainer.callEJBTimeout(BaseContainer.java:2855)
        at com.sun.ejb.containers.EJBTimerService.deliverTimeout(EJBTimerService.java:1401)
        at com.sun.ejb.containers.EJBTimerService.access$100(EJBTimerService.java:99)
        at com.sun.ejb.containers.EJBTimerService$TaskExpiredWork.run(EJBTimerService.java:1952)
        at com.sun.ejb.containers.EJBTimerService$TaskExpiredWork.service(EJBTimerService.java:1948)
        at com.sun.ejb.containers.util.WorkAdapter.doWork(WorkAdapter.java:75)
        at com.sun.corba.ee.impl.orbutil.threadpool.ThreadPoolImpl$WorkerThread.run(ThreadPoolImpl.java:555)
Caused by: org.jboss.seam.InstantiationException: Could not instantiate Seam component: systemManager
        at org.jboss.seam.Component.newInstance(Component.java:1740)
        at org.jboss.seam.Component.getInstance(Component.java:1643)
        at org.jboss.seam.Component.getInstance(Component.java:1610)
        at org.jboss.seam.Component.getInstance(Component.java:1604)
        at org.jboss.seam.core.Dispatcher$AsynchronousInvocation.call(Dispatcher.java:122)
        at org.jboss.seam.core.Dispatcher$Asynchronous.execute(Dispatcher.java:88)
        at org.jboss.seam.core.Dispatcher.dispatch(Dispatcher.java:165)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:597)
        at com.sun.enterprise.security.application.EJBSecurityManager.runMethod(EJBSecurityManager.java:1067)
        at com.sun.enterprise.security.SecurityUtil.invoke(SecurityUtil.java:176)
        at com.sun.ejb.containers.BaseContainer.invokeTargetBeanMethod(BaseContainer.java:2895)
        at com.sun.ejb.containers.BaseContainer.callEJBTimeout(BaseContainer.java:2824)
        ... 6 more
Caused by: javax.naming.NameNotFoundException: No object bound to name java:comp/env/mlm-ear-1.0/SystemManagerBean/local
        at com.sun.enterprise.naming.NamingManagerImpl.lookup(NamingManagerImpl.java:834)
        at com.sun.enterprise.naming.java.javaURLContext.lookup(javaURLContext.java:173)
        at com.sun.enterprise.naming.SerialContext.lookup(SerialContext.java:337)
        at javax.naming.InitialContext.lookup(InitialContext.java:392)
        at org.jboss.seam.Component.instantiateSessionBean(Component.java:1107)
        at org.jboss.seam.Component.instantiate(Component.java:1093)
        at org.jboss.seam.Component.newInstance(Component.java:1736)
        ... 20 more
EJB5119:Expunging timer ['4@@1198695363541@@server@@domain1' 'TimedObject = Dispatcher' 'Application = mlm-ear-1.0' 'BEING_DELIVERED' 'SINGLE-ACTION' 'Container ID = 78557698959015936' 'Wed Dec 26 11:57:02 MST 2007' '0' ] after [2] failed deliveries


I declare the SystemManagerBean as follows:
@Name(value = "systemManager")
  | @Stateless
  | public class SystemManagerBean implements SystemManager {
  | 
I made a guess thinking it might be a glassfish embedded EJB issue and added the following to ejb-jar.xml but it did not help.
        <session>
  |             <ejb-name>Dispatcher</ejb-name>
  |             <ejb-local-ref>
  |                 <ejb-ref-name>mlm-ear-1.0/SystemManagerBean/local</ejb-ref-name>
  |                 <ejb-ref-type>Session</ejb-ref-type>
  |                 <local>com.el.mlm.SystemManager</local>
  |                 <ejb-link>SystemManagerBean</ejb-link> 
  |             </ejb-local-ref>
  |         </session>

Thanks for your help.

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4115546#4115546

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4115546



More information about the jboss-user mailing list