1 Reply Latest reply on Oct 12, 2003 3:07 PM by Andreas Buschka

    Getting mad with JAAS/JMS/MDB ;(

    Andreas Buschka Newbie

      I have created a new message queue in my application. However, every time my MDB tries to access the queue during the deployment process, I get the following error:

      2003-10-12 22:06:03,950 INFO [org.jboss.resource.adapter.jms.JmsManagedConnectionFactory.JmsXA] Bound connection factory for resour
      ce adapter for ConnectionManager 'jboss.jca:service=TxCM,name=JmsXA to JNDI name 'java:/JmsXA'
      2003-10-12 22:06:16,739 DEBUG [org.jboss.ejb.MessageDrivenContainer] Mapped onMessage 1175993645 to public void de.fernunihagen.info
      rmme.mdb.EreignisEmpfaenger.EreignisEmpfaengerBean.onMessage(javax.jms.Message)
      2003-10-12 22:06:16,739 INFO [org.jboss.ejb.plugins.jms.JMSContainerInvoker] Creating
      2003-10-12 22:06:16,759 INFO [org.jboss.ejb.plugins.jms.JMSContainerInvoker] Created
      2003-10-12 22:06:22,828 DEBUG [org.jboss.ejb.MessageDrivenContainer] Binding resource manager: java:/JmsXA to JDNI ENC as: jms/Queue
      Factory
      2003-10-12 22:06:22,838 INFO [org.jboss.ejb.plugins.jms.JMSContainerInvoker] Starting
      2003-10-12 22:06:22,838 DEBUG [org.jboss.ejb.plugins.jms.JMSContainerInvoker] Initializing
      2003-10-12 22:06:22,838 DEBUG [org.jboss.ejb.plugins.jms.JMSContainerInvoker] Looking up provider adapter: java:/DefaultJMSProvider
      2003-10-12 22:06:22,838 DEBUG [org.jboss.ejb.plugins.jms.JMSContainerInvoker] Provider adapter: org.jboss.jms.jndi.JBossMQProvider@8
      13bc1
      2003-10-12 22:06:22,848 INFO [org.jboss.ejb.plugins.jms.DLQHandler] Creating
      2003-10-12 22:06:22,848 DEBUG [org.jboss.jms.jndi.JBossMQProvider] no provider url; connecting to local JNDI
      2003-10-12 22:06:22,848 DEBUG [org.jboss.jms.jndi.JBossMQProvider] created context: javax.naming.InitialContext@14c7deb
      2003-10-12 22:06:22,848 DEBUG [org.jboss.ejb.plugins.jms.DLQHandler] Using factory: org.jboss.mq.SpyXAConnectionFactory@deeebd
      2003-10-12 22:06:23,008 DEBUG [org.jboss.ejb.plugins.jms.DLQHandler] Created connection: org.jboss.mq.SpyConnection@142f703
      2003-10-12 22:06:23,008 DEBUG [org.jboss.ejb.plugins.jms.DLQHandler] Using Queue: QUEUE.DLQ
      2003-10-12 22:06:23,008 INFO [org.jboss.ejb.plugins.jms.DLQHandler] Created
      2003-10-12 22:06:23,008 DEBUG [org.jboss.jms.jndi.JBossMQProvider] no provider url; connecting to local JNDI
      2003-10-12 22:06:23,008 DEBUG [org.jboss.jms.jndi.JBossMQProvider] created context: javax.naming.InitialContext@1ac7fbb
      2003-10-12 22:06:23,008 DEBUG [org.jboss.ejb.plugins.jms.JMSContainerInvoker] context: javax.naming.InitialContext@1ac7fbb
      2003-10-12 22:06:23,008 DEBUG [org.jboss.ejb.plugins.jms.JMSContainerInvoker] jndiSuffix: InformMe-EreignisEmpfaengerQueue
      2003-10-12 22:06:23,008 DEBUG [org.jboss.ejb.plugins.jms.JMSContainerInvoker] Got destination type Queue for EreignisEmpfaenger
      2003-10-12 22:06:23,018 DEBUG [org.jboss.jms.ConnectionFactoryHelper] using connection factory: org.jboss.mq.SpyXAConnectionFactory@
      deeebd
      2003-10-12 22:06:23,018 DEBUG [org.jboss.jms.ConnectionFactoryHelper] using username/password: InformMeMdbService/informme42
      2003-10-12 22:06:23,028 DEBUG [org.jboss.jms.ConnectionFactoryHelper] created XAQueueConnection: org.jboss.mq.SpyXAConnection@10e6cb
      d
      2003-10-12 22:06:23,028 DEBUG [org.jboss.ejb.plugins.jms.JMSContainerInvoker] Using client id: null
      2003-10-12 22:06:23,038 DEBUG [org.jboss.ejb.plugins.jms.JMSContainerInvoker] looking up session pool factory: java:/StdJMSPool
      2003-10-12 22:06:23,078 DEBUG [org.jboss.jms.asf.StdServerSessionPool] initializing with connection: org.jboss.mq.SpyXAConnection@10
      ...
      2003-10-12 22:06:23,218 INFO [org.jboss.ejb.plugins.jms.JMSContainerInvoker] Started
      2003-10-12 22:06:23,228 WARN [org.jboss.ejb.plugins.jms.JMSContainerInvoker] JMS provider failure detected:
      javax.jms.JMSSecurityException: Connection not authorized to subscribe to destination: InformMe-EreignisEmpfaengerQueue
      at org.jboss.ejb.plugins.jms.JMSContainerInvoker.innerCreate(JMSContainerInvoker.java:562)
      at org.jboss.ejb.plugins.jms.JMSContainerInvoker.startService(JMSContainerInvoker.java:579)
      2003-10-12 22:06:23,258 INFO [org.jboss.ejb.plugins.jms.JMSContainerInvoker] Trying to reconnect to JMS provider

      Attached are my descriptors and configuration files. I am working on this now for six hours and still got no solution, and I'm totally frustrated ;(

      My deployment descriptors:
      In ejb-jar.xml:
      <message-driven>
      <display-name>EreignisEmpfaenger</display-name>
      <ejb-name>EreignisEmpfaenger</ejb-name>
      <ejb-class>de.fernunihagen.informme.mdb.EreignisEmpfaenger.EreignisEmpfaengerBean</ejb-class>
      <transaction-type>Container</transaction-type>
      <message-selector>MessageFormat = 'Version 1.0'</message-selector>
      <message-driven-destination>
      <destination-type>javax.jms.Queue</destination-type>
      </message-driven-destination>
      <resource-ref>

      <res-ref-name>jms/QueueFactory</res-ref-name>
      <res-type>javax.jms.QueueConnectionFactory</res-type>
      <res-auth>Container</res-auth>
      </resource-ref>
      </message-driven>

      In jboss.xml:
      <message-driven>
      <ejb-name>EreignisEmpfaenger</ejb-name>
      <destination-jndi-name>queue/InformMe-EreignisEmpfaengerQueue</destination-jndi-name>
      <resource-ref>
      <res-ref-name>jms/QueueFactory</res-ref-name>
      <jndi-name>java:/JmsXA</jndi-name>
      </resource-ref>
      <mdb-user>InformMeMdbService</mdb-user>
      <mdb-passwd>informme42</mdb-passwd>
      </message-driven>

      jboss/server/default/conf/jboss-login.conf:
      <application-policy name="jbossmq">
      <application-policy name="client-login">

      <login-module code="org.jboss.security.ClientLoginModule" flag="required"/>

      </application-policy>
      <!--
      <login-module code="org.jboss.security.auth.spi.UsersRolesLoginModule" flag="required"/>
      -->

      <login-module code="org.jboss.mq.sm.file.DynamicLoginModule" flag="required">
      <module-option name="unauthenticatedIdentity">guest</module-option>
      <module-option name="sm.objectname">jboss.mq:service=StateManager</module-option>
      </login-module>

      </application-policy>

      In jboss/server/default/conf/jbossmq-state.xml:
      ...

      InformMeMdbService
      informme42

      ...

      InformMeMdbService

      ...

      In jboss/server/default/deploy/informme-jms-topics-service.xml:

      <depends optional-attribute-name="DestinationManager">jboss.mq:service=DestinationManager
      <depends optional-attribute-name="SecurityManager">jboss.mq:service=SecurityManager








      In jboss/server/default/deploy/jms/jms-ds.xml:
      <!-- JMS XA Resource adapter, use this to get transacted JMS in beans -->
      <tx-connection-factory>
      <jndi-name>JmsXA</jndi-name>
      <xa-transaction/>
      <adapter-display-name>JMS Adapter</adapter-display-name>
      <config-property name="SessionDefaultType" type="java.lang.String">javax.jms.Topic</config-property>
      <security-domain>JmsXARealm</security-domain>
      </tx-connection-factory>

      I have no idea where else to search...