Version 6

    After changing my default datasource, during the deployment of my message-driven beans, I get the following exception:

     

    16:45:51,781 WARN  [JMSContainerInvoker] JMS provider failure detected for MDB
    javax.jms.JMSSecurityException: User: null is NOT authenticated
            at org.jboss.mq.security.SecurityManager.authenticate(SecurityManager.java:230)
            at org.jboss.mq.security.ServerSecurityInterceptor.authenticate(ServerSecurityInterceptor.java:66)
            at org.jboss.mq.server.TracingInterceptor.authenticate(TracingInterceptor.java:613)
            at org.jboss.mq.server.JMSServerInvoker.authenticate(JMSServerInvoker.java:172)
            at org.jboss.mq.il.jvm.JVMServerIL.authenticate(JVMServerIL.java:165)
            at org.jboss.mq.Connection.authenticate(Connection.java:1065)
            at org.jboss.mq.Connection.<init>(Connection.java:252)
            at org.jboss.mq.Connection.<init>(Connection.java:323)
            at org.jboss.mq.SpyConnection.<init>(SpyConnection.java:116)
            at org.jboss.mq.SpyConnectionFactory.internalCreateConnection(SpyConnectionFactory.java:137)
            at org.jboss.mq.SpyConnectionFactory.createQueueConnection(SpyConnectionFactory.java:108)
    

     

     

     

    As explained here, in the JBossMQ loging module, you should change the dsJndiName attribute to point to a valid datasource.

     

     

     

    Also, very important, you should make sure to prepend the jndi name with "java:/". The following attribute is INVALID.

     

       <module-option name = "dsJndiName">jdbc/WhateverDS</module-option>
    

     

     

     

     

    How to debug

     

    In conf/log4j.xml, enabled TRACE logging for the following category:

     

       <category name="org.jboss.security.plugins.JaasSecurityManager.jbossmq">
         <priority value="TRACE" class="org.jboss.logging.XLevel"></priority>
       </category>
    

     

    You should then get this TRACE output:

     

      2006-08-29 16:45:51,406 TRACE [org.jboss.security.plugins.JaasSecurityManager.jbossmq] Begin isValid, principal:null, cache info: null
      2006-08-29 16:45:51,406 TRACE [org.jboss.security.plugins.JaasSecurityManager.jbossmq] defaultLogin, principal=null
      2006-08-29 16:45:51,421 TRACE [org.jboss.security.plugins.JaasSecurityManager.jbossmq] Login failure
    javax.security.auth.login.LoginException: Error looking up DataSource from: DefaultDS
    

     

    Referenced by: