I will add more logs tomorrow.
I have rewritten the timer user EJB injection and get slightly different errors, but it might shed some more light on the problem.
It definitely looks like a class loader issue though...
I have also seen the following exception:
2009-02-21 21:31:36,562 DEBUG [org.jboss.ejb.txtimer.TimerImpl] (EJB-Timer-1235187861590[target=jboss.j2ee:ear=feudalism.ear,jar=feudalism-beans.jar,name=CommandEJB,service=EJ
B3]) setTimerState: in_timeout
2009-02-21 21:31:36,562 ERROR [org.jboss.ejb.txtimer.TimerImpl] (EJB-Timer-1235187861590[target=jboss.j2ee:ear=feudalism.ear,jar=feudalism-beans.jar,name=CommandEJB,service=EJ
B3]) Error invoking ejbTimeout
org.jboss.aop.DispatcherConnectException: EJB container is not completely started, or is stopped.
at org.jboss.ejb3.BlockContainerShutdownInterceptor.invoke(BlockContainerShutdownInterceptor.java:60)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
at org.jboss.aspects.currentinvocation.CurrentInvocationInterceptor.invoke(CurrentInvocationInterceptor.java:67)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
at org.jboss.ejb3.stateless.StatelessContainer.callTimeout(StatelessContainer.java:304)
at org.jboss.ejb.txtimer.TimerImpl$TimerTaskImpl.run(TimerImpl.java:561)
at java.util.TimerThread.mainLoop(Timer.java:512)
at java.util.TimerThread.run(Timer.java:462)
2009-02-21 21:31:36,562 DEBUG [org.jboss.ejb.txtimer.TimerImpl] (EJB-Timer-1235187861590[target=jboss.j2ee:ear=feudalism.ear,jar=feudalism-beans.jar,name=CommandEJB,service=EJ
B3]) Timer was not registered with Tx, resetting state: [id=1235187861590,target=[target=jboss.j2ee:ear=feudalism.ear,jar=feudalism-beans.jar,name=CommandEJB,service=EJB3],rem
aining=-23110031,periode=3600000,in_timeout]
After I restart the server and if there are no expired timers but timers in the future, when the timeout happens I get:
2009-02-24 20:35:15,406 ERROR [org.jboss.ejb.txtimer.TimerImpl] (EJB-Timer-12355
32907815[target=jboss.j2ee:ear=feudalism.ear,jar=feudalism-beans.jar,name=Comman
dEJB,service=EJB3]) Error invoking ejbTimeout
javax.ejb.EJBException: java.lang.RuntimeException: Unable to inject jndi depend
ency: env/com.feudalism.session.command.XXXCommandBean/playerBean into property
com.feudalism.session.command.XXXCommandBean.playerBean: com.feudalism.session.p
layer.PlayerRemote from BaseClassLoader@10ed791{VFSClassLoaderPolicy@16aa365{nam
e=vfsfile:/C:/java/jboss-5.0.0.GA/jboss-5.0.0.GA/server/feudalism/deploy/ejb2-ti
mer-service.xml domain=ClassLoaderDomain@1dddba{name=DefaultDomain parentPolicy=
BEFORE parent=org.jboss.system.NoAnnotationURLClassLoader@8a0d5d} roots=[MemoryC
ontextHandler@880352[path= context=vfsmemory://5c4o01u-q581nz-frlgcin1-1-frlgdl0
k-t real=vfsmemory://5c4o01u-q581nz-frlgcin1-1-frlgdl0k-t]] delegates=null expo
rted=[] <IMPORT-ALL>NON_EMPTY}}
at org.jboss.ejb3.tx.Ejb3TxPolicy.handleExceptionInOurTx(Ejb3TxPolicy.ja
va:77)
at org.jboss.aspects.tx.TxPolicy.invokeInOurTx(TxPolicy.java:83)
at org.jboss.aspects.tx.TxInterceptor$Required.invoke(TxInterceptor.java
:190)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.
java:102)
at org.jboss.aspects.tx.TxPropagationInterceptor.invoke(TxPropagationInt
erceptor.java:76)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.
java:102)
at org.jboss.ejb3.tx.NullInterceptor.invoke(NullInterceptor.java:42)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.
java:102)
at org.jboss.ejb3.security.Ejb3AuthenticationInterceptorv2.invoke(Ejb3Au
thenticationInterceptorv2.java:75)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.
java:102)
at org.jboss.ejb3.ENCPropagationInterceptor.invoke(ENCPropagationInterce
ptor.java:41)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.
java:102)
at org.jboss.ejb3.asynchronous.AsynchronousInterceptor.invoke(Asynchrono
usInterceptor.java:106)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.
java:102)
at org.jboss.ejb3.BlockContainerShutdownInterceptor.invoke(BlockContaine
rShutdownInterceptor.java:65)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.
java:102)
at org.jboss.aspects.currentinvocation.CurrentInvocationInterceptor.invo
ke(CurrentInvocationInterceptor.java:67)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.
java:102)
at org.jboss.ejb3.stateless.StatelessContainer.callTimeout(StatelessCont
ainer.java:304)
at org.jboss.ejb.txtimer.TimerImpl$TimerTaskImpl.run(TimerImpl.java:561)
at java.util.TimerThread.mainLoop(Timer.java:512)
at java.util.TimerThread.run(Timer.java:462)
Caused by: java.lang.RuntimeException: Unable to inject jndi dependency: env/com
.feudalism.session.command.XXXCommandBean/playerBean into property com.feudalism
.session.command.XXXCommandBean.playerBean: com.feudalism.session.player.PlayerR
emote from BaseClassLoader@10ed791{VFSClassLoaderPolicy@16aa365{name=vfsfile:/C:
/java/jboss-5.0.0.GA/jboss-5.0.0.GA/server/feudalism/deploy/ejb2-timer-service.x
ml domain=ClassLoaderDomain@1dddba{name=DefaultDomain parentPolicy=BEFORE parent
=org.jboss.system.NoAnnotationURLClassLoader@8a0d5d} roots=[MemoryContextHandler
@880352[path= context=vfsmemory://5c4o01u-q581nz-frlgcin1-1-frlgdl0k-t real=vfsm
emory://5c4o01u-q581nz-frlgcin1-1-frlgdl0k-t]] delegates=null exported=[] <IMPO
RT-ALL>NON_EMPTY}}
at org.jboss.injection.JndiPropertyInjector.lookup(JndiPropertyInjector.
java:82)
at org.jboss.injection.JndiPropertyInjector.inject(JndiPropertyInjector.
java:99)
at org.jboss.injection.JndiPropertyInjector.inject(JndiPropertyInjector.
java:89)
at org.jboss.injection.JndiPropertyInjector.inject(JndiPropertyInjector.
java:61)
at org.jboss.ejb3.injection.InjectionInvocation.invokeTarget(InjectionIn
vocation.java:89)
at org.jboss.ejb3.injection.InjectionInvocation.invokeNext(InjectionInvo
cation.java:83)
at org.jboss.aspects.currentinvocation.CurrentInvocationInterceptor.invo
ke(CurrentInvocationInterceptor.java:67)
at org.jboss.ejb3.injection.InjectionInvocation.invokeNext(InjectionInvo
cation.java:74)
at org.jboss.ejb3.EJBContainer.injectBeanContext(EJBContainer.java:1076)
at org.jboss.ejb3.pool.AbstractPool.create(AbstractPool.java:83)
at org.jboss.ejb3.InfinitePool.get(InfinitePool.java:56)
at org.jboss.ejb3.InfinitePool.get(InfinitePool.java:51)
at org.jboss.ejb3.pool.ThreadlocalPool.create(ThreadlocalPool.java:53)
at org.jboss.ejb3.pool.ThreadlocalPool.get(ThreadlocalPool.java:93)
at org.jboss.ejb3.stateless.StatelessInstanceInterceptor.invoke(Stateles
sInstanceInterceptor.java:58)
at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.
java:102)
at org.jboss.aspects.tx.TxPolicy.invokeInOurTx(TxPolicy.java:79)
... 20 more
Caused by: javax.naming.NamingException: Could not dereference object [Root exce
ption is javax.naming.NamingException: Could not dereference object [Root except
ion is java.lang.RuntimeException: Can not find interface declared by Proxy in o
ur CL + BaseClassLoader@10ed791{vfsfile:/C:/java/jboss-5.0.0.GA/jboss-5.0.0.GA/s
erver/feudalism/deploy/ejb2-timer-service.xml}]]
at org.jnp.interfaces.NamingContext.resolveLink(NamingContext.java:1339)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:804)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:673)
at org.jboss.ejb3.JndiUtil.lookup(JndiUtil.java:44)
at org.jboss.injection.JndiPropertyInjector.lookup(JndiPropertyInjector.
java:75)
... 36 more
Caused by: javax.naming.NamingException: Could not dereference object [Root exce
ption is java.lang.RuntimeException: Can not find interface declared by Proxy in
our CL + BaseClassLoader@10ed791{vfsfile:/C:/java/jboss-5.0.0.GA/jboss-5.0.0.GA
/server/feudalism/deploy/ejb2-timer-service.xml}]
at org.jnp.interfaces.NamingContext.getObjectInstanceWrapFailure(NamingC
ontext.java:1463)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:809)
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:673)
at javax.naming.InitialContext.lookup(InitialContext.java:351)
at org.jnp.interfaces.NamingContext.resolveLink(NamingContext.java:1333)
... 40 more
Caused by: java.lang.RuntimeException: Can not find interface declared by Proxy
in our CL + BaseClassLoader@10ed791{vfsfile:/C:/java/jboss-5.0.0.GA/jboss-5.0.0.
GA/server/feudalism/deploy/ejb2-timer-service.xml}
at org.jboss.ejb3.proxy.objectfactory.ProxyObjectFactory.redefineProxyIn
Tcl(ProxyObjectFactory.java:341)
at org.jboss.ejb3.proxy.objectfactory.session.SessionProxyObjectFactory.
createProxy(SessionProxyObjectFactory.java:134)
at org.jboss.ejb3.proxy.objectfactory.session.stateless.StatelessSession
ProxyObjectFactory.getProxy(StatelessSessionProxyObjectFactory.java:79)
at org.jboss.ejb3.proxy.objectfactory.ProxyObjectFactory.getObjectInstan
ce(ProxyObjectFactory.java:156)
at javax.naming.spi.NamingManager.getObjectInstance(NamingManager.java:3
04)
at org.jnp.interfaces.NamingContext.getObjectInstance(NamingContext.java
:1438)
at org.jnp.interfaces.NamingContext.getObjectInstanceWrapFailure(NamingC
ontext.java:1455)
... 44 more
Caused by: java.lang.ClassNotFoundException: com.feudalism.session.player.Player
Remote from BaseClassLoader@10ed791{VFSClassLoaderPolicy@16aa365{name=vfsfile:/C
:/java/jboss-5.0.0.GA/jboss-5.0.0.GA/server/feudalism/deploy/ejb2-timer-service.
xml domain=ClassLoaderDomain@1dddba{name=DefaultDomain parentPolicy=BEFORE paren
t=org.jboss.system.NoAnnotationURLClassLoader@8a0d5d} roots=[MemoryContextHandle
r@880352[path= context=vfsmemory://5c4o01u-q581nz-frlgcin1-1-frlgdl0k-t real=vfs
memory://5c4o01u-q581nz-frlgcin1-1-frlgdl0k-t]] delegates=null exported=[] <IMP
ORT-ALL>NON_EMPTY}}
at org.jboss.classloader.spi.base.BaseClassLoader.loadClass(BaseClassLoa
der.java:385)
at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:242)
at org.jboss.ejb3.proxy.objectfactory.ProxyObjectFactory.redefineProxyIn
Tcl(ProxyObjectFactory.java:337)
... 50 more