From: jaikiran <nu...@jb...> - 2005-07-02 12:43:36
|
Hi, I am facing a problem regarding, invoking a session bean from a MDB. I have a MDB in which i am looking up a session bean and invoking method on it. Till some days back, everything was working fine. I was able to invoke the method. But all of a sudden a few days ago, i am getting a SecurityException while invoking the bean which states that principal = null. After exploring on the same, i found out that the MDB does not have the identity of the caller. So it will not be able to lookup any bean. I tried using the <run-as> attribute in the deployment descriptor, but even this did not work. I am really surprised, that till some days back without doing anything special in the deployment descriptors or code, i was able to invoke the session bean. But now it's giving me the following error: 12:45:14,386 ERROR [LogInterceptor] EJBException, causedBy: java.lang.SecurityException: Authentication exception, principal=null at org.jboss.ejb.plugins.SecurityInterceptor.checkSecurityAssociation(SecurityInterceptor.java:164) at org.jboss.ejb.plugins.SecurityInterceptor.invokeHome(SecurityInterceptor.java:81) at org.jboss.ejb.plugins.LogInterceptor.invokeHome(LogInterceptor.java:120) at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invokeHome(ProxyFactoryFinderInterceptor.java:93) at org.jboss.ejb.StatelessSessionContainer.internalInvokeHome(StatelessSessionContainer.java:319) at org.jboss.ejb.Container.invoke(Container.java:720) at org.jboss.ejb.plugins.local.BaseLocalProxyFactory.invokeHome(BaseLocalProxyFactory.java:293) at org.jboss.ejb.plugins.local.LocalHomeProxy.invoke(LocalHomeProxy.java:110) at $Proxy41.create(Unknown Source) 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:324) at com.teradata.tap.system.util.ServiceLocator.getLocalBean(ServiceLocator.java:282) at com.teradata.crm.processingengine.util.ProcessingEngineExecutionManager.lockProcessingEngine(ProcessingEngineExecutionManager.java:182) at com.teradata.crm.processingengine.util.ProcessingEngineExecutionManager.execute(ProcessingEngineExecutionManager.java:94) at com.teradata.crm.processingengine.ejb.ProcessingExecutionStarterMDBean.onMessage(ProcessingExecutionStarterMDBean.java:106) 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:324) at org.jboss.ejb.MessageDrivenContainer$ContainerInterceptor.invoke(MessageDrivenContainer.java:460) at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionInterceptor.java:185) at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:84) at org.jboss.ejb.plugins.AbstractTxInterceptorBMT.invokeNext(AbstractTxInterceptorBMT.java:144) at org.jboss.ejb.plugins.MessageDrivenTxInterceptorBMT.invoke(MessageDrivenTxInterceptorBMT.java:32) at org.jboss.ejb.plugins.MessageDrivenInstanceInterceptor.invoke(MessageDrivenInstanceInterceptor.java:62) at org.jboss.ejb.plugins.RunAsSecurityInterceptor.invoke(RunAsSecurityInterceptor.java:90) at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:191) at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFactoryFinderInterceptor.java:122) at org.jboss.ejb.MessageDrivenContainer.internalInvoke(MessageDrivenContainer.java:374) at org.jboss.ejb.Container.invoke(Container.java:700) at org.jboss.ejb.plugins.jms.JMSContainerInvoker.invoke(JMSContainerInvoker.java:824) at org.jboss.ejb.plugins.jms.JMSContainerInvoker$MessageListenerImpl.onMessage(JMSContainerInvoker.java:1114) at org.jboss.jms.asf.StdServerSession.onMessage(StdServerSession.java:256) at org.jboss.mq.SpyMessageConsumer.sessionConsumerProcessMessage(SpyMessageConsumer.java:633) at org.jboss.mq.SpyMessageConsumer.addMessage(SpyMessageConsumer.java:433) at org.jboss.mq.SpySession.run(SpySession.java:298) at org.jboss.jms.asf.StdServerSession.run(StdServerSession.java:180) at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:727) at java.lang.Thread.run(Thread.java:534) Does anyone know what might be the reason for the same. And also, does this mean that i can never invoke a session bean from a MDB(i have seen examples where people have done it, even my code was working fine so far) Thank you View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3883452#3883452 Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3883452 |