0 Replies Latest reply on Jan 3, 2002 3:05 AM by ppetit

    Authentication exception with a Queue on JBoss 3.0

    ppetit Newbie

      Hi Forum,
      I failed using OILClient so I'm using RMIClient.
      I create the queueSession with :
      ...
      queueFactory = (QueueConnectionFactory)jndiContext.lookup("RMIConnectionFactory");
      queueConnection = queueFactory.createQueueConnection();
      queueSession = queueConnection.createQueueSession( // No transaction
      false,
      // Auto ack
      Session.AUTO_ACKNOWLEDGE);
      ...

      I get Authentication exception when posting a TextMessage to a queue. I implemented a very simple queue sender and a MDB following the online doco.
      I have other SLSB managed by JAAS without any kind of problem.
      There's nothing about security management of MDB or sender/publisher online
      Can somebody help ?

      Here is the log :
      [StdServerSession] running (pool, session, xaSession, useLocalTX): , org.jboss.mq.SpyTopicSession@6ea258, org.jboss.mq.S
      pyTopicSession@6ea258, true
      [SecurityInterceptor] Authentication exception, principal=null
      [JMSContainerInvoker] Exception in JMSCI message listener
      java.rmi.RemoteException: checkSecurityAssociation; nested exception is:
      java.lang.SecurityException: Authentication exception, principal=null
      java.lang.SecurityException: Authentication exception, principal=null
      at org.jboss.ejb.plugins.SecurityInterceptor.checkSecurityAssociation(SecurityInterceptor.java:171)
      at org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:120)
      at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:166)
      at org.jboss.ejb.MessageDrivenContainer.invoke(MessageDrivenContainer.java:282)
      at org.jboss.ejb.plugins.jms.JMSContainerInvoker.invoke(JMSContainerInvoker.java:564)
      at org.jboss.ejb.plugins.jms.JMSContainerInvoker$MessageListenerImpl.onMessage(JMSContainerInvoker.java:909)
      at org.jboss.mq.SpyMessageConsumer.sessionConsumerProcessMessage(SpyMessageConsumer.java:433)
      at org.jboss.mq.SpyMessageConsumer.addMessage(SpyMessageConsumer.java:303)
      at org.jboss.mq.SpySession.run(SpySession.java:216)
      at org.jboss.jms.asf.StdServerSession.run(StdServerSession.java:209)
      at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:642)
      at java.lang.Thread.run(Thread.java:484)

      here is part of my ejb-jar.xml
      <enterprise-beans>
      <message-driven>
      Models a Planning Manager
      <ejb-name>Planning_MBean</ejb-name>
      <ejb-class>fr.ppet.saga.server.calendar.planning.Planning_MBean</ejb-class>
      <message-selector></message-selector>
      <transaction-type>Bean</transaction-type>
      <acknowledge-mode>Auto-acknowledge</acknowledge-mode>
      <message-driven-destination>
      <destination-type>javax.jms.Queue</destination-type>
      </message-driven-destination>

      <!-- JDBC DataSources -->
      <resource-ref>
      <res-ref-name>/DefaultDS</res-ref-name>
      <jndi-name>java:/DefaultDS</jndi-name>
      <res-type>javax.sql.DataSource</res-type>
      <res-auth>Container</res-auth>
      </resource-ref>

      </message-driven>
      </enterprise-beans>

      here is my jboss;xml
      <?xml version="1.0" encoding="ISO-8859-1"?>

      <!-- All bean containers use this security manager by default -->
      <security-domain>java:/jaas/Saga</security-domain>

      <container-configurations>
      <container-configuration>
      <container-name>Standard CMP EntityBean</container-name>
      <role-mapping-manager>java:/jaas/Saga</role-mapping-manager>
      <authentication-module>java:/jaas/Saga</authentication-module>
      </container-configuration>
      <container-configuration>
      <container-name>Standard Stateless SessionBean</container-name>
      <role-mapping-manager>java:/jaas/Saga</role-mapping-manager>
      <authentication-module>java:/jaas/Saga</authentication-module>
      </container-configuration>
      <container-configuration>
      <container-name>Standard Stateful SessionBean</container-name>
      <role-mapping-manager>java:/jaas/Saga</role-mapping-manager>
      <authentication-module>java:/jaas/Saga</authentication-module>
      </container-configuration>

      <container-configuration>
      <container-name>Standard Message Driven Bean</container-name>
      <role-mapping-manager>java:/jaas/Saga</role-mapping-manager>
      <authentication-module>java:/jaas/Saga</authentication-module>
      </container-configuration>

      </container-configurations>

      <enterprise-beans>
      <!-- PPET Rapporté le 27/12/ pour accès à la base de donnée en JDBC -->
      <!-- paramétrage couplé au ejb-jar dans le même répertoire -->
      <!-- Attention si on change celà peut compromettre l'accès de JDBCconnection.class à la base -->

      <message-driven>
      Models a Planning manager
      <ejb-name>Planning_MBean</ejb-name>
      <configuration-name>Standard Message Driven Bean</configuration-name>
      <destination-jndi-name>queue/planningTxQueue</destination-jndi-name>
      <resource-ref>
      <res-ref-name>/DefaultDS</res-ref-name>
      <jndi-name>java:/DefaultDS</jndi-name>
      </resource-ref>
      </message-driven>

      true

      </enterprise-beans>




      the conf/default/standardjboss.xml is unmodified

      in deploy/jbossmq-service.xml
      I added one specific topic and one specific queue :
      ...


      ...