0 Replies Latest reply on May 7, 2003 6:00 PM by upi

    MessageDrivenBean 'run-as' fails

    upi

      Using JBoss 3.0.3:
      I'm trying to get my MessageDrivenBean to access session beans in my app'n server using 'run-as'
      I can't get it to work. I'm sure this role has the authority to access the session beans. Any ideas would be gratefully appreciated.

      First problem is I get:
      WARN [SecurityManager] No SecurityMetadadata was available for ImportMessageProcessor adding default security conf

      and finally when I try to get a reference to my session beans I get principal=null

      The stacktrace is as follows:

      17:21:59,437 ERROR [SecurityInterceptor] Authentication exception, principal=null
      17:21:59,437 ERROR [LogInterceptor] EJBException, causedBy:
      java.lang.SecurityException: Authentication exception, principal=null
      at org.jboss.ejb.plugins.SecurityInterceptor.checkSecurityAssociation(SecurityInterceptor.java:173)
      at org.jboss.ejb.plugins.SecurityInterceptor.invokeHome(SecurityInterceptor.java:94)
      at org.jboss.ejb.plugins.LogInterceptor.invokeHome(LogInterceptor.java:129)
      at org.jboss.ejb.StatelessSessionContainer.invokeHome(StatelessSessionContainer.java:300)
      at org.jboss.ejb.Container.invoke(Container.java:730)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:517)
      at org.jboss.invocation.local.LocalInvoker.invoke(LocalInvoker.java:98)
      at org.jboss.invocation.InvokerInterceptor.invoke(InvokerInterceptor.java:102)
      at org.jboss.proxy.TransactionInterceptor.invoke(TransactionInterceptor.java:77)
      at org.jboss.proxy.SecurityInterceptor.invoke(SecurityInterceptor.java:80)
      at org.jboss.proxy.ejb.HomeInterceptor.invoke(HomeInterceptor.java:198)
      at org.jboss.proxy.ClientContainer.invoke(ClientContainer.java:76)
      at $Proxy74.create(Unknown Source)
      at ssabsa.business.ejb.imports.ImportMessageProcessor.processObjectMessage(ImportMessageProcessor.java:104)
      at ssabsa.business.ejb.imports.ImportMessageProcessor.onMessage(ImportMessageProcessor.java:85)
      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)


      Below is my ejb-jar.xml message-driven entry:

      <message-driven>
      <ejb-name>ImportMessageProcessor</ejb-name>
      <ejb-class>ImportMessageProcessor</ejb-class>
      <message-selector></message-selector>
      <transaction-type>Container</transaction-type>
      <acknowledge-mode>Auto-acknowledge</acknowledge-mode>
      <message-driven-destination>
      <destination-type>javax.jms.Queue</destination-type>
      </message-driven-destination>
      <security-identity>
      <run-as>
      <role-name>G.I.Joe</role-name>
      </run-as>
      </security-identity>
      </message-driven>

      Cheers,

      Upi