2 Replies Latest reply on Nov 29, 2005 8:48 AM by valtoni

    Does unauthenticated principal work with Timer service?

    bigdaddy

      JBoss: 4.0.1RC2
      Java: 1.4.2_04

      Ok, I have put my EJB jar under a security realm within JBoss and I can access everything as expected using declarative security within my ejb-jar.xml. Next, I decided to add another stateless session bean to utilize the Timer service and I am able to invoke it with my client while logged in.

      But, I could not invoke the ejbTimeout method while not logged in. Ok fine, so I set up the DatabaseLoginModule with an unauthenticated user in my login-config.xml file with permissions on all the methods of my stateless session bean that invokes the Timer service and has the ejbTimeout callback method. But, now that I have made it past the initial authentication/authorization problems I am getting the "check your deployment packaging" error listed below when my ejbTimeout callback method is invoked. What am I doing wrong?

      All my other entity and session beans work in the same jar except the ejbTimeout callback method. It produces the following stack trace:


      2004-12-18 21:38:01,229 TRACE [org.jboss.ejb.plugins.LogInterceptor] Start method=ejbTimeout
      2004-12-18 21:38:01,229 TRACE [org.jboss.ejb.plugins.SecurityInterceptor] Authenticated principal=null
      2004-12-18 21:38:01,229 TRACE [org.jboss.ejb.plugins.SecurityInterceptor] method=public abstract void javax.ejb.TimedObject.ejbTimeout(javax.ejb.Timer), interface=LOCAL, requiredRoles=[]
      2004-12-18 21:38:01,229 TRACE [org.jboss.ejb.plugins.TxInterceptorCMT] Current transaction in MI is null
      2004-12-18 21:38:01,229 TRACE [org.jboss.ejb.plugins.TxInterceptorCMT] TX_REQUIRED for ejbTimeout timeout=0
      2004-12-18 21:38:01,229 TRACE [org.jboss.ejb.plugins.TxInterceptorCMT] Thread came in with tx null
      2004-12-18 21:38:01,229 TRACE [org.jboss.ejb.plugins.TxInterceptorCMT] Starting new tx TransactionImpl:XidImpl[FormatId=257, GlobalId=NEO/35, BranchQual=, localId=35]
      2004-12-18 21:38:01,229 TRACE [org.jboss.ejb.plugins.StatelessSessionInstancePool] Get instance org.jboss.ejb.plugins.StatelessSessionInstancePool@974e4b#1#class net.itrus.arx.infinity.sma.ejb.session.stateless.ServiceCustomReportEJBSession
      2004-12-18 21:38:01,229 TRACE [org.jboss.ejb.plugins.StatelessSessionInstancePool] Discard instance:org.jboss.ejb.plugins.StatelessSessionInstancePool@974e4b#org.jboss.ejb.StatelessSessionEnterpriseContext@a9fd96#TransactionImpl:XidImpl[FormatId=257, GlobalId=NEO/35, BranchQual=, localId=35]#true#class net.itrus.arx.infinity.sma.ejb.session.stateless.ServiceCustomReportEJBSession
      2004-12-18 21:38:01,229 TRACE [org.jboss.ejb.plugins.TxInterceptorCMT] TxInterceptorCMT: In finally
      2004-12-18 21:38:01,229 DEBUG [org.jboss.ejb.txtimer.TimerImpl] rollback: [id=1target=[target=jboss.j2ee:jndiName=ServiceCustomReport,service=EJB],remaining=-1229,periode=0,in_timeout]
      2004-12-18 21:38:01,229 DEBUG [org.jboss.ejb.txtimer.TimerImpl] setTimerState: retry_timeout
      2004-12-18 21:38:01,229 DEBUG [org.jboss.ejb.txtimer.TimerImpl] retry: [id=1target=[target=jboss.j2ee:jndiName=ServiceCustomReport,service=EJB],remaining=-1229,periode=0,retry_timeout]
      2004-12-18 21:38:01,229 ERROR [org.jboss.ejb.plugins.LogInterceptor] EJBException in method: public abstract void javax.ejb.TimedObject.ejbTimeout(javax.ejb.Timer):
      javax.ejb.EJBException: Invalid invocation, check your deployment packaging, method=public abstract void javax.ejb.TimedObject.ejbTimeout(javax.ejb.Timer)
      at org.jboss.ejb.StatelessSessionContainer$ContainerInterceptor.invoke(StatelessSessionContainer.java:192)
      at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionInterceptor.java:185)
      at org.jboss.ejb.plugins.StatelessSessionInstanceInterceptor.invoke(StatelessSessionInstanceInterceptor.java:113)
      at org.jboss.webservice.server.ServiceEndpointInterceptor.invoke(ServiceEndpointInterceptor.java:51)
      at org.jboss.ejb.plugins.CallValidationInterceptor.invoke(CallValidationInterceptor.java:48)
      at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:105)
      at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:313)
      at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:146)
      at org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:122)
      at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:191)
      at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFactoryFinderInterceptor.java:122)
      at org.jboss.ejb.SessionContainer.internalInvoke(SessionContainer.java:624)
      at org.jboss.ejb.Container.invoke(Container.java:856)
      at org.jboss.ejb.txtimer.TimedObjectInvokerImpl.callTimeout(TimedObjectInvokerImpl.java:63)
      at org.jboss.ejb.txtimer.TimerImpl$TimerTaskImpl.run(TimerImpl.java:473)
      at java.util.TimerThread.mainLoop(Timer.java:432)
      at java.util.TimerThread.run(Timer.java:382)
      2004-12-18 21:38:01,229 TRACE [org.jboss.ejb.plugins.LogInterceptor] End method=ejbTimeout
      2004-12-18 21:38:01,229 ERROR [org.jboss.ejb.txtimer.TimerImpl] Error invoking ejbTimeout
      javax.ejb.EJBException: Invalid invocation, check your deployment packaging, method=public abstract void javax.ejb.TimedObject.ejbTimeout(javax.ejb.Timer)
      at org.jboss.ejb.StatelessSessionContainer$ContainerInterceptor.invoke(StatelessSessionContainer.java:192)
      at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionInterceptor.java:185)
      at org.jboss.ejb.plugins.StatelessSessionInstanceInterceptor.invoke(StatelessSessionInstanceInterceptor.java:113)
      at org.jboss.webservice.server.ServiceEndpointInterceptor.invoke(ServiceEndpointInterceptor.java:51)
      at org.jboss.ejb.plugins.CallValidationInterceptor.invoke(CallValidationInterceptor.java:48)
      at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:105)
      at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:313)
      at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:146)
      at org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:122)
      at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:191)
      at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFactoryFinderInterceptor.java:122)
      at org.jboss.ejb.SessionContainer.internalInvoke(SessionContainer.java:624)
      at org.jboss.ejb.Container.invoke(Container.java:856)
      at org.jboss.ejb.txtimer.TimedObjectInvokerImpl.callTimeout(TimedObjectInvokerImpl.java:63)
      at org.jboss.ejb.txtimer.TimerImpl$TimerTaskImpl.run(TimerImpl.java:473)
      at java.util.TimerThread.mainLoop(Timer.java:432)
      at java.util.TimerThread.run(Timer.java:382)
      2004-12-18 21:38:01,339 DEBUG [org.jboss.ejb.txtimer.FixedDelayRetryPolicy] Retry ejbTimeout: [id=1target=[target=jboss.j2ee:jndiName=ServiceCustomReport,service=EJB],remaining=-1339,periode=0,retry_timeout]
      2004-12-18 21:38:01,339 TRACE [org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor] invokerBInding is null in ProxyFactoryFinder
      2004-12-18 21:38:01,339 TRACE [org.jboss.ejb.plugins.LogInterceptor] Start method=ejbTimeout
      2004-12-18 21:38:01,339 TRACE [org.jboss.ejb.plugins.SecurityInterceptor] Authenticated principal=null
      2004-12-18 21:38:01,339 TRACE [org.jboss.ejb.plugins.SecurityInterceptor] method=public abstract void javax.ejb.TimedObject.ejbTimeout(javax.ejb.Timer), interface=LOCAL, requiredRoles=[]
      2004-12-18 21:38:01,339 TRACE [org.jboss.ejb.plugins.TxInterceptorCMT] Current transaction in MI is null
      2004-12-18 21:38:01,339 TRACE [org.jboss.ejb.plugins.TxInterceptorCMT] TX_REQUIRED for ejbTimeout timeout=0
      2004-12-18 21:38:01,339 TRACE [org.jboss.ejb.plugins.TxInterceptorCMT] Thread came in with tx null
      2004-12-18 21:38:01,339 TRACE [org.jboss.ejb.plugins.TxInterceptorCMT] Starting new tx TransactionImpl:XidImpl[FormatId=257, GlobalId=NEO/36, BranchQual=, localId=36]
      2004-12-18 21:38:01,339 TRACE [org.jboss.ejb.plugins.StatelessSessionInstancePool] Get instance org.jboss.ejb.plugins.StatelessSessionInstancePool@974e4b#0#class net.itrus.arx.infinity.sma.ejb.session.stateless.ServiceCustomReportEJBSession
      2004-12-18 21:38:01,339 TRACE [org.jboss.ejb.plugins.StatelessSessionInstancePool] Discard instance:org.jboss.ejb.plugins.StatelessSessionInstancePool@974e4b#org.jboss.ejb.StatelessSessionEnterpriseContext@128d900#TransactionImpl:XidImpl[FormatId=257, GlobalId=NEO/36, BranchQual=, localId=36]#true#class net.itrus.arx.infinity.sma.ejb.session.stateless.ServiceCustomReportEJBSession
      2004-12-18 21:38:01,339 TRACE [org.jboss.ejb.plugins.TxInterceptorCMT] TxInterceptorCMT: In finally
      2004-12-18 21:38:01,339 DEBUG [org.jboss.ejb.txtimer.TimerImpl] rollback: [id=1target=[target=jboss.j2ee:jndiName=ServiceCustomReport,service=EJB],remaining=-1339,periode=0,retry_timeout]
      2004-12-18 21:38:01,339 DEBUG [org.jboss.ejb.txtimer.TimerImpl] setTimerState: expired
      2004-12-18 21:38:01,339 DEBUG [org.jboss.ejb.txtimer.TimerImpl] killTimer: [id=1target=[target=jboss.j2ee:jndiName=ServiceCustomReport,service=EJB],remaining=-1339,periode=0,expired]
      2004-12-18 21:38:01,354 ERROR [org.jboss.ejb.plugins.LogInterceptor] EJBException in method: public abstract void javax.ejb.TimedObject.ejbTimeout(javax.ejb.Timer):
      javax.ejb.EJBException: Invalid invocation, check your deployment packaging, method=public abstract void javax.ejb.TimedObject.ejbTimeout(javax.ejb.Timer)
      at org.jboss.ejb.StatelessSessionContainer$ContainerInterceptor.invoke(StatelessSessionContainer.java:192)
      at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionInterceptor.java:185)
      at org.jboss.ejb.plugins.StatelessSessionInstanceInterceptor.invoke(StatelessSessionInstanceInterceptor.java:113)
      at org.jboss.webservice.server.ServiceEndpointInterceptor.invoke(ServiceEndpointInterceptor.java:51)
      at org.jboss.ejb.plugins.CallValidationInterceptor.invoke(CallValidationInterceptor.java:48)
      at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:105)
      at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:313)
      at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:146)
      at org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:122)
      at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:191)
      at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFactoryFinderInterceptor.java:122)
      at org.jboss.ejb.SessionContainer.internalInvoke(SessionContainer.java:624)
      at org.jboss.ejb.Container.invoke(Container.java:856)
      at org.jboss.ejb.txtimer.TimedObjectInvokerImpl.callTimeout(TimedObjectInvokerImpl.java:63)
      at org.jboss.ejb.txtimer.FixedDelayRetryPolicy$RetryThread.run(FixedDelayRetryPolicy.java:98)
      2004-12-18 21:38:01,354 TRACE [org.jboss.ejb.plugins.LogInterceptor] End method=ejbTimeout
      2004-12-18 21:38:01,354 INFO [STDOUT] javax.ejb.EJBException: Invalid invocation, check your deployment packaging, method=public abstract void javax.ejb.TimedObject.ejbTimeout(javax.ejb.Timer)
      2004-12-18 21:38:01,354 INFO [STDOUT] at org.jboss.ejb.StatelessSessionContainer$ContainerInterceptor.invoke(StatelessSessionContainer.java:192)
      2004-12-18 21:38:01,354 INFO [STDOUT] at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionInterceptor.java:185)
      2004-12-18 21:38:01,354 INFO [STDOUT] at org.jboss.ejb.plugins.StatelessSessionInstanceInterceptor.invoke(StatelessSessionInstanceInterceptor.java:113)
      2004-12-18 21:38:01,354 INFO [STDOUT] at org.jboss.webservice.server.ServiceEndpointInterceptor.invoke(ServiceEndpointInterceptor.java:51)
      2004-12-18 21:38:01,354 INFO [STDOUT] at org.jboss.ejb.plugins.CallValidationInterceptor.invoke(CallValidationInterceptor.java:48)
      2004-12-18 21:38:01,354 INFO [STDOUT] at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:105)
      2004-12-18 21:38:01,354 INFO [STDOUT] at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:313)
      2004-12-18 21:38:01,354 INFO [STDOUT] at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:146)
      2004-12-18 21:38:01,354 INFO [STDOUT] at org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:122)
      2004-12-18 21:38:01,354 INFO [STDOUT] at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:191)
      2004-12-18 21:38:01,354 INFO [STDOUT] at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFactoryFinderInterceptor.java:122)
      2004-12-18 21:38:01,354 INFO [STDOUT] at org.jboss.ejb.SessionContainer.internalInvoke(SessionContainer.java:624)
      2004-12-18 21:38:01,354 INFO [STDOUT] at org.jboss.ejb.Container.invoke(Container.java:856)
      2004-12-18 21:38:01,354 INFO [STDOUT] at org.jboss.ejb.txtimer.TimedObjectInvokerImpl.callTimeout(TimedObjectInvokerImpl.java:63)
      2004-12-18 21:38:01,354 INFO [STDOUT] at org.jboss.ejb.txtimer.FixedDelayRetryPolicy$RetryThread.run(FixedDelayRetryPolicy.java:98)