10 Replies Latest reply on Jun 18, 2004 1:18 PM by joshlam

    Authenticating To 3rd Party JMS Provider Probem

    joshlam Newbie

      I got jBoss 3.2.1 to connect to TIBCO JMS without authentication but I have problems trying to get it working with authentication. I am getting the following error while starting jBoss:

      13:42:18,296 INFO [DLQHandler] Creating
      13:42:18,453 ERROR [DLQHandler] Initialization failed
      javax.jms.JMSException: Error creating the dlq connection: Not permitted: invalid name or password

      I read the FAQ and here's my js-ds.xml file:

      <?xml version="1.0" encoding="UTF-8"?>
      
      <connection-factories>
      
       <!-- The JMS provider loader -->
       <mbean code="org.jboss.jms.jndi.JMSProviderLoader" name="jboss.mq:service=JMSProviderLoader,name=TibjmsProvider">
       <attribute name="ProviderName">TIBCOJMSProvider</attribute>
       <attribute name="ProviderAdapterClass">com.tibco.tibjms.appserver.jboss.JBossAdapter</attribute>
       <attribute name="ProviderUrl">tibjmsnaming://localhost:7222</attribute>
       <attribute name="QueueFactoryRef">XAQueueConnectionFactory</attribute>
       <attribute name="TopicFactoryRef">XATopicConnectionFactory</attribute>
       </mbean>
      
      <!-- Redirect QueueConnectionFactory to TIBCO Enterprise for JMS -->
       <mbean code="org.jboss.naming.NamingAlias" name="DefaultDomain:service=NamingAlias,fromName=QueueConnectionFactory">
       <attribute name="ToName">tibjmsnaming://localhost:7222/XAQueueConnectionFactory</attribute>
       <attribute name="FromName">QueueConnectionFactory</attribute>
       </mbean>
      
      
      <!-- The server session pool for Message Driven Beans -->
       <mbean code="org.jboss.jms.asf.ServerSessionPoolLoader" name="jboss.mq:service=ServerSessionPoolMBean,name=StdJMSPool">
       <depends optional-attribute-name="XidFactory">jboss:service=XidFactory</depends>
       <attribute name="PoolName">StdJMSPool</attribute>
       <attribute name="PoolFactoryClass">org.jboss.jms.asf.StdServerSessionPoolFactory</attribute>
       </mbean>
      
       <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.Queue</config-property>
       <config-property name="JmsProviderAdapterJNDI" type="java.lang.String">java:/TIBCOJMSProvider</config-property>
       <security-domain-and-application>JmsXARealm</security-domain-and-application>
       </tx-connection-factory>
      
       <application-policy name = "JmsXARealm">
       <authentication>
       <login-module code = "org.jboss.resource.security.ConfiguredIdentityLoginModule" flag = "required">
       <module-option name = "principal">dude</module-option>
       <module-option name = "userName">dude</module-option>
       <module-option name = "password">dude</module-option>
       <module-option name = "managedConnectionFactoryName">jboss.jca:service=TxCM,name=JmsXA</module-option>
       </login-module>
       </authentication>
       </application-policy>
      </connection-factories>
      


      Please note that those in red are not needed if authentication is not turned on in the Tibco JMS. Those in green are what the Tibco documentation stipulated for integration with jBoss.

      Would appreciate any help.

      Thanks.

      --
      Josh

        • 1. Re: Authenticating To 3rd Party JMS Provider Probem
          Adrian Brock Master

          You are out of luck, the ability to specify a user and password on the DLQ
          connection wasn't added until JBoss-3.2.2

          The configuration you want is in invoker-proxy-binding
          DLQUser and DLQPassword
          see jboss_3_2.dtd for more info

          • 2. Re: Authenticating To 3rd Party JMS Provider Probem
            joshlam Newbie

            Thanks Adrian.

            That gives us a good reason to move to 3.2.3. :-)

            • 3. Re: Authenticating To 3rd Party JMS Provider Probem
              joshlam Newbie

              Hi Adrian,

              Just downloaded jBoss 3.2.3 and still getting the problem:

              15:40:10,140 ERROR [DLQHandler] Initialization failed
              javax.jms.JMSException: Error creating the dlq connection: Not permitted: invalid name or password

              Here's my standardjboss.xml file:

               <invoker-proxy-binding>
               <name>message-driven-bean</name>
               <invoker-mbean>default</invoker-mbean>
               <proxy-factory>org.jboss.ejb.plugins.jms.JMSContainerInvoker</proxy-factory>
               <proxy-factory-config>
               <JMSProviderAdapterJNDI>TIBCOJMSProvider</JMSProviderAdapterJNDI>
              
               <ServerSessionPoolFactoryJNDI>StdJMSPool</ServerSessionPoolFactoryJNDI>
               <MaximumSize>15</MaximumSize>
               <MaxMessages>1</MaxMessages>
               <MDBConfig>
               <ReconnectIntervalSec>10</ReconnectIntervalSec>
              
               <DLQConfig>
               <DestinationQueue>tibjmsnaming://localhost:7222/queue/DLQ</DestinationQueue>
               <MaxTimesRedelivered>10</MaxTimesRedelivered>
               <TimeToLive>0</TimeToLive>
              
               <DLQUser>dude</DLQUser>
               <DLQPassword>dude</DLQPassword>
               </DLQConfig>
              
               </MDBConfig>
               </proxy-factory-config>
               </invoker-proxy-binding>
               <invoker-proxy-binding>
               <name>iiop</name>
               <invoker-mbean>jboss:service=invoker,type=iiop</invoker-mbean>
               <proxy-factory>org.jboss.proxy.ejb.IORFactory</proxy-factory>
               <proxy-factory-config>
               <web-class-loader>org.jboss.iiop.WebCL</web-class-loader>
               <poa>per-servant</poa>
               <register-ejbs-in-jnp-context>true</register-ejbs-in-jnp-context>
               <jnp-context>iiop</jnp-context>
               <JMSProviderAdapterJNDI>DefaultJMSProvider</JMSProviderAdapterJNDI>
               <ServerSessionPoolFactoryJNDI>StdJMSPool</ServerSessionPoolFactoryJNDI>
               <MaximumSize>15</MaximumSize>
               <MaxMessages>1</MaxMessages>
               <MDBConfig>
               <ReconnectIntervalSec>10</ReconnectIntervalSec>
               <DLQConfig>
               <DestinationQueue>queue/DLQ</DestinationQueue>
               <MaxTimesRedelivered>10</MaxTimesRedelivered>
               <TimeToLive>0</TimeToLive>
               
               <DLQUser>dude</DLQUser>
               <DLQPassword>dude</DLQPassword> </DLQConfig>
               </MDBConfig>
               </proxy-factory-config>
               </invoker-proxy-binding>
               </invoker-proxy-bindings>
              


              Again, the red text is what I added according to the jboss3_2.dtd for authentication, they are not needed if authentication is not turned on. Would appreciate any help.

              Thanks.

              --
              Josh

              • 4. Re: Authenticating To 3rd Party JMS Provider Probem
                Adrian Brock Master

                It looks ok, but PLEASE post the full stacktrace.

                • 5. Re: Authenticating To 3rd Party JMS Provider Probem
                  joshlam Newbie

                  Sorry Adrian, but here it comes:

                  15:40:10,140 ERROR [DLQHandler] Initialization failed
                  javax.jms.JMSException: Error creating the dlq connection: Not permitted: invali
                  d name or password
                  at org.jboss.ejb.plugins.jms.DLQHandler.createService(DLQHandler.java:16
                  9)
                  at org.jboss.system.ServiceMBeanSupport.create(ServiceMBeanSupport.java:
                  158)
                  at org.jboss.ejb.plugins.jms.JMSContainerInvoker.innerCreate(JMSContaine
                  rInvoker.java:458)
                  at org.jboss.ejb.plugins.jms.JMSContainerInvoker.startService(JMSContain
                  erInvoker.java:674)
                  at org.jboss.system.ServiceMBeanSupport.start(ServiceMBeanSupport.java:1
                  92)
                  at org.jboss.ejb.MessageDrivenContainer.startService(MessageDrivenContai
                  ner.java:234)
                  at org.jboss.system.ServiceMBeanSupport.start(ServiceMBeanSupport.java:1
                  92)
                  at sun.reflect.GeneratedMethodAccessor49.invoke(Unknown Source)
                  at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
                  sorImpl.java:25)
                  at java.lang.reflect.Method.invoke(Method.java:324)
                  at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBea
                  nDispatcher.java:284)
                  at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:546)
                  at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceControl
                  ler.java:976)
                  at $Proxy14.start(Unknown Source)
                  at org.jboss.system.ServiceController.start(ServiceController.java:394)
                  at sun.reflect.GeneratedMethodAccessor9.invoke(Unknown Source)
                  at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
                  sorImpl.java:25)
                  at java.lang.reflect.Method.invoke(Method.java:324)
                  at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBea
                  nDispatcher.java:284)
                  at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:546)
                  at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:177)
                  at $Proxy29.start(Unknown Source)
                  at org.jboss.ejb.EjbModule.startService(EjbModule.java:331)
                  at org.jboss.system.ServiceMBeanSupport.start(ServiceMBeanSupport.java:1
                  92)
                  at sun.reflect.GeneratedMethodAccessor49.invoke(Unknown Source)
                  at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
                  sorImpl.java:25)
                  at java.lang.reflect.Method.invoke(Method.java:324)
                  at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBea
                  nDispatcher.java:284)
                  at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:546)
                  at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceControl
                  ler.java:976)
                  at $Proxy14.start(Unknown Source)
                  at org.jboss.system.ServiceController.start(ServiceController.java:394)
                  at sun.reflect.GeneratedMethodAccessor9.invoke(Unknown Source)
                  at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
                  sorImpl.java:25)
                  at java.lang.reflect.Method.invoke(Method.java:324)
                  at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBea
                  nDispatcher.java:284)
                  at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:546)
                  at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:177)
                  at $Proxy12.start(Unknown Source)
                  at org.jboss.ejb.EJBDeployer.start(EJBDeployer.java:544)
                  at org.jboss.deployment.MainDeployer.start(MainDeployer.java:832)
                  at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:642)
                  at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:605)
                  at sun.reflect.GeneratedMethodAccessor44.invoke(Unknown Source)
                  at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
                  sorImpl.java:25)
                  at java.lang.reflect.Method.invoke(Method.java:324)
                  at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBea
                  nDispatcher.java:284)
                  at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:546)
                  at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:177)
                  at $Proxy6.deploy(Unknown Source)
                  at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymen
                  tScanner.java:302)
                  at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentS
                  canner.java:476)
                  at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.
                  doScan(AbstractDeploymentScanner.java:201)
                  at org.jboss.deployment.scanner.AbstractDeploymentScanner.startService(A
                  bstractDeploymentScanner.java:274)
                  at org.jboss.system.ServiceMBeanSupport.start(ServiceMBeanSupport.java:1
                  92)
                  at sun.reflect.GeneratedMethodAccessor10.invoke(Unknown Source)
                  at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
                  sorImpl.java:25)
                  at java.lang.reflect.Method.invoke(Method.java:324)
                  at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBea
                  nDispatcher.java:284)
                  at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:546)
                  at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceControl
                  ler.java:976)
                  at $Proxy0.start(Unknown Source)
                  at org.jboss.system.ServiceController.start(ServiceController.java:394)
                  at sun.reflect.GeneratedMethodAccessor9.invoke(Unknown Source)
                  at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
                  sorImpl.java:25)
                  at java.lang.reflect.Method.invoke(Method.java:324)
                  at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBea
                  nDispatcher.java:284)
                  at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:546)
                  at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:177)
                  at $Proxy4.start(Unknown Source)
                  at org.jboss.deployment.SARDeployer.start(SARDeployer.java:226)
                  at org.jboss.deployment.MainDeployer.start(MainDeployer.java:832)
                  at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:642)
                  at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:605)
                  at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:589)
                  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                  at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
                  java:39)
                  at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
                  sorImpl.java:25)
                  at java.lang.reflect.Method.invoke(Method.java:324)
                  at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBea
                  nDispatcher.java:284)
                  at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:546)
                  at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:177)
                  at $Proxy5.deploy(Unknown Source)
                  at org.jboss.system.server.ServerImpl.doStart(ServerImpl.java:384)
                  at org.jboss.system.server.ServerImpl.start(ServerImpl.java:291)
                  at org.jboss.Main.boot(Main.java:150)
                  at org.jboss.Main$1.run(Main.java:395)
                  at java.lang.Thread.run(Thread.java:536)
                  15:40:10,234 INFO [JMSContainerInvoker] Started jboss.j2ee:binding=message-driv
                  en-bean,jndiName=local/StandardizationMDB,plugin=invoker,service=EJB
                  15:40:10,234 INFO [MessageDrivenInstancePool] Started jboss.j2ee:jndiName=local
                  /StandardizationMDB,plugin=pool,service=EJB
                  15:40:10,234 INFO [MessageDrivenContainer] Started jboss.j2ee:jndiName=local/St
                  andardizationMDB,service=EJB
                  15:40:10,234 WARN [JMSContainerInvoker] JMS provider failure detected:
                  javax.jms.JMSException: Error creating the dlq connection: Not permitted: invali
                  d name or password
                  at org.jboss.ejb.plugins.jms.DLQHandler.createService(DLQHandler.java:16
                  9)
                  at org.jboss.system.ServiceMBeanSupport.create(ServiceMBeanSupport.java:
                  158)
                  at org.jboss.ejb.plugins.jms.JMSContainerInvoker.innerCreate(JMSContaine
                  rInvoker.java:458)
                  at org.jboss.ejb.plugins.jms.JMSContainerInvoker.startService(JMSContain
                  erInvoker.java:674)
                  at org.jboss.system.ServiceMBeanSupport.start(ServiceMBeanSupport.java:1
                  92)
                  at org.jboss.ejb.MessageDrivenContainer.startService(MessageDrivenContai
                  ner.java:234)
                  at org.jboss.system.ServiceMBeanSupport.start(ServiceMBeanSupport.java:1
                  92)
                  at sun.reflect.GeneratedMethodAccessor49.invoke(Unknown Source)
                  at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
                  sorImpl.java:25)
                  at java.lang.reflect.Method.invoke(Method.java:324)
                  at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBea
                  nDispatcher.java:284)
                  at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:546)
                  at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceControl
                  ler.java:976)
                  at $Proxy14.start(Unknown Source)
                  at org.jboss.system.ServiceController.start(ServiceController.java:394)
                  at sun.reflect.GeneratedMethodAccessor9.invoke(Unknown Source)
                  at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
                  sorImpl.java:25)
                  at java.lang.reflect.Method.invoke(Method.java:324)
                  at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBea
                  nDispatcher.java:284)
                  at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:546)
                  at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:177)
                  at $Proxy29.start(Unknown Source)
                  at org.jboss.ejb.EjbModule.startService(EjbModule.java:331)
                  at org.jboss.system.ServiceMBeanSupport.start(ServiceMBeanSupport.java:1
                  92)
                  at sun.reflect.GeneratedMethodAccessor49.invoke(Unknown Source)
                  at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
                  sorImpl.java:25)
                  at java.lang.reflect.Method.invoke(Method.java:324)
                  at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBea
                  nDispatcher.java:284)
                  at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:546)
                  at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceControl
                  ler.java:976)
                  at $Proxy14.start(Unknown Source)
                  at org.jboss.system.ServiceController.start(ServiceController.java:394)
                  at sun.reflect.GeneratedMethodAccessor9.invoke(Unknown Source)
                  at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
                  sorImpl.java:25)
                  at java.lang.reflect.Method.invoke(Method.java:324)
                  at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBea
                  nDispatcher.java:284)
                  at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:546)
                  at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:177)
                  at $Proxy12.start(Unknown Source)
                  at org.jboss.ejb.EJBDeployer.start(EJBDeployer.java:544)
                  at org.jboss.deployment.MainDeployer.start(MainDeployer.java:832)
                  at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:642)
                  at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:605)
                  at sun.reflect.GeneratedMethodAccessor44.invoke(Unknown Source)
                  at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
                  sorImpl.java:25)
                  at java.lang.reflect.Method.invoke(Method.java:324)
                  at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBea
                  nDispatcher.java:284)
                  at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:546)
                  at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:177)
                  at $Proxy6.deploy(Unknown Source)
                  at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymen
                  tScanner.java:302)
                  at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentS
                  canner.java:476)
                  at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.
                  doScan(AbstractDeploymentScanner.java:201)
                  at org.jboss.deployment.scanner.AbstractDeploymentScanner.startService(A
                  bstractDeploymentScanner.java:274)
                  at org.jboss.system.ServiceMBeanSupport.start(ServiceMBeanSupport.java:1
                  92)
                  at sun.reflect.GeneratedMethodAccessor10.invoke(Unknown Source)
                  at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
                  sorImpl.java:25)
                  at java.lang.reflect.Method.invoke(Method.java:324)
                  at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBea
                  nDispatcher.java:284)
                  at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:546)
                  at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceControl
                  ler.java:976)
                  at $Proxy0.start(Unknown Source)
                  at org.jboss.system.ServiceController.start(ServiceController.java:394)
                  at sun.reflect.GeneratedMethodAccessor9.invoke(Unknown Source)
                  at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
                  sorImpl.java:25)
                  at java.lang.reflect.Method.invoke(Method.java:324)
                  at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBea
                  nDispatcher.java:284)
                  at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:546)
                  at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:177)
                  at $Proxy4.start(Unknown Source)
                  at org.jboss.deployment.SARDeployer.start(SARDeployer.java:226)
                  at org.jboss.deployment.MainDeployer.start(MainDeployer.java:832)
                  at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:642)
                  at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:605)
                  at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:589)
                  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                  at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
                  java:39)
                  at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
                  sorImpl.java:25)
                  at java.lang.reflect.Method.invoke(Method.java:324)
                  at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBea
                  nDispatcher.java:284)
                  at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:546)
                  at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:177)
                  at $Proxy5.deploy(Unknown Source)
                  at org.jboss.system.server.ServerImpl.doStart(ServerImpl.java:384)
                  at org.jboss.system.server.ServerImpl.start(ServerImpl.java:291)
                  at org.jboss.Main.boot(Main.java:150)
                  at org.jboss.Main$1.run(Main.java:395)
                  at java.lang.Thread.run(Thread.java:536)
                  15:40:10,281 ERROR [DLQHandler] Initialization failed
                  javax.jms.JMSException: Error creating the dlq connection: Not permitted: invali
                  d name or password
                  at org.jboss.ejb.plugins.jms.DLQHandler.createService(DLQHandler.java:16
                  9)
                  at org.jboss.system.ServiceMBeanSupport.create(ServiceMBeanSupport.java:
                  158)
                  at org.jboss.ejb.plugins.jms.JMSContainerInvoker.innerCreate(JMSContaine
                  rInvoker.java:458)
                  at org.jboss.ejb.plugins.jms.JMSContainerInvoker.startService(JMSContain
                  erInvoker.java:674)
                  at org.jboss.system.ServiceMBeanSupport.start(ServiceMBeanSupport.java:1
                  92)
                  at org.jboss.ejb.MessageDrivenContainer.startService(MessageDrivenContai
                  ner.java:234)
                  at org.jboss.system.ServiceMBeanSupport.start(ServiceMBeanSupport.java:1
                  92)
                  at sun.reflect.GeneratedMethodAccessor49.invoke(Unknown Source)
                  at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
                  sorImpl.java:25)
                  at java.lang.reflect.Method.invoke(Method.java:324)
                  at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBea
                  nDispatcher.java:284)
                  at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:546)
                  at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceControl
                  ler.java:976)
                  at $Proxy14.start(Unknown Source)
                  at org.jboss.system.ServiceController.start(ServiceController.java:394)
                  at sun.reflect.GeneratedMethodAccessor9.invoke(Unknown Source)
                  at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
                  sorImpl.java:25)
                  at java.lang.reflect.Method.invoke(Method.java:324)
                  at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBea
                  nDispatcher.java:284)
                  at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:546)
                  at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:177)
                  at $Proxy29.start(Unknown Source)
                  at org.jboss.ejb.EjbModule.startService(EjbModule.java:331)
                  at org.jboss.system.ServiceMBeanSupport.start(ServiceMBeanSupport.java:1
                  92)
                  at sun.reflect.GeneratedMethodAccessor49.invoke(Unknown Source)
                  at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
                  sorImpl.java:25)
                  at java.lang.reflect.Method.invoke(Method.java:324)
                  at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBea
                  nDispatcher.java:284)
                  at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:546)
                  at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceControl
                  ler.java:976)
                  at $Proxy14.start(Unknown Source)
                  at org.jboss.system.ServiceController.start(ServiceController.java:394)
                  at sun.reflect.GeneratedMethodAccessor9.invoke(Unknown Source)
                  at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
                  sorImpl.java:25)
                  at java.lang.reflect.Method.invoke(Method.java:324)
                  at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBea
                  nDispatcher.java:284)
                  at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:546)
                  at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:177)
                  at $Proxy12.start(Unknown Source)
                  at org.jboss.ejb.EJBDeployer.start(EJBDeployer.java:544)
                  at org.jboss.deployment.MainDeployer.start(MainDeployer.java:832)
                  at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:642)
                  at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:605)
                  at sun.reflect.GeneratedMethodAccessor44.invoke(Unknown Source)
                  at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
                  sorImpl.java:25)
                  at java.lang.reflect.Method.invoke(Method.java:324)
                  at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBea
                  nDispatcher.java:284)
                  at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:546)
                  at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:177)
                  at $Proxy6.deploy(Unknown Source)
                  at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymen
                  tScanner.java:302)
                  at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentS
                  canner.java:476)
                  at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.
                  doScan(AbstractDeploymentScanner.java:201)
                  at org.jboss.deployment.scanner.AbstractDeploymentScanner.startService(A
                  bstractDeploymentScanner.java:274)
                  at org.jboss.system.ServiceMBeanSupport.start(ServiceMBeanSupport.java:1
                  92)
                  at sun.reflect.GeneratedMethodAccessor10.invoke(Unknown Source)
                  at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
                  sorImpl.java:25)
                  at java.lang.reflect.Method.invoke(Method.java:324)
                  at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBea
                  nDispatcher.java:284)
                  at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:546)
                  at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceControl
                  ler.java:976)
                  at $Proxy0.start(Unknown Source)
                  at org.jboss.system.ServiceController.start(ServiceController.java:394)
                  at sun.reflect.GeneratedMethodAccessor9.invoke(Unknown Source)
                  at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
                  sorImpl.java:25)
                  at java.lang.reflect.Method.invoke(Method.java:324)
                  at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBea
                  nDispatcher.java:284)
                  at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:546)
                  at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:177)
                  at $Proxy4.start(Unknown Source)
                  at org.jboss.deployment.SARDeployer.start(SARDeployer.java:226)
                  at org.jboss.deployment.MainDeployer.start(MainDeployer.java:832)
                  at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:642)
                  at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:605)
                  at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:589)
                  at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                  at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
                  java:39)
                  at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
                  sorImpl.java:25)
                  at java.lang.reflect.Method.invoke(Method.java:324)
                  at org.jboss.mx.capability.ReflectedMBeanDispatcher.invoke(ReflectedMBea
                  nDispatcher.java:284)
                  at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:546)
                  at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:177)
                  at $Proxy5.deploy(Unknown Source)
                  at org.jboss.system.server.ServerImpl.doStart(ServerImpl.java:384)
                  at org.jboss.system.server.ServerImpl.start(ServerImpl.java:291)
                  at org.jboss.Main.boot(Main.java:150)
                  at org.jboss.Main$1.run(Main.java:395)
                  at java.lang.Thread.run(Thread.java:536)

                  • 6. Re: Authenticating To 3rd Party JMS Provider Probem
                    Adrian Brock Master

                    Argh! I forget that JMSException doesn't print the linked exception.
                    I can't see the real exception.

                    Can you download this class and change it to do:
                    http://cvs.sourceforge.net/viewcvs.py/jboss/jboss/src/main/org/jboss/ejb/plugins/jms/DLQHandler.java?annotate=1.11.2.9

                    163 catch (Exception e)
                    164 {
                    165 if (e instanceof JMSException)
                    166 throw e;
                    167 else
                    168 {
                     log.error("Error creating the dlq", e); // HERE
                    169 JMSException x = new JMSException("Error creating the dlq connection: " + e.getMessage());
                    170 x.setLinkedException(e);
                    171 throw x;
                    172 }
                    173 user57 1.11 }
                    


                    The class goes in jboss.jar

                    • 7. Re: Authenticating To 3rd Party JMS Provider Probem
                      Adrian Brock Master

                      The fact it is not throwing a JMSException suggests to me your problem is with
                      jndi access not JMS.

                      • 8. Re: Authenticating To 3rd Party JMS Provider Probem
                        joshlam Newbie

                        Hi Adrian,

                        You are right on and it had something to do with JNDI access.

                        I had to add the following to the conf/jndi.properties file:

                        java.naming.security.principal=dude
                        java.naming.security.credentials=dude
                        


                        That did the trick. Thanks for your help!

                        Just out of curiosity though, not being savvy about JNDI, are the DLQUser and DLQPassword used in the context of

                        Hashtable env = new Hashtable();
                        env.put(Context.SECURITY_PRINCIPAL, "dude");
                        env.put(Context.SECURITY_CREDENTIALS, "dude");
                        env.put(Context.INITIAL_CONTEXT_FACTORY,providerContextFactory);
                        env.put(Context.PROVIDER_URL,defaultProviderURL);
                        jndiContext = new InitialContext(env);
                        


                        or

                        QueueConnectionFactory factory = javax.jms.QueueConnectionFactory)jndiContext.lookup("QueueConnectionFactory");
                        conn = factory.createQueueConnection("dude","dude");
                        


                        What about the following in in the jms-ds.xml for MDBs?

                        <application-policy name = "JmsXARealm">
                         ...
                         <module-option name = "principal">dude</module-option>
                         <module-option name = "userName">dude</module-option>
                         <module-option name = "password">dude</module-option>
                        ...
                        </application-policy name>
                        


                        Thanks again.

                        --
                        Josh



                        • 9. Re: Authenticating To 3rd Party JMS Provider Probem
                          Adrian Brock Master

                          The DLQUser/Password are used in createQueueConnection,
                          as are the ones in JmsXARealm.

                          • 10. Re: Authenticating To 3rd Party JMS Provider Probem
                            joshlam Newbie

                            Hi Adrian,

                            Sorry to follow up with a question on this previous question but I am just trying to understand the mechanisms behind the JMS authentication on jBoss.

                            I commented out the following in the jms-ds.xml file:

                             <application-policy name = "JmsXARealm">
                             <authentication>
                             <login-module code = "org.jboss.resource.security.ConfiguredIdentityLoginModule" flag = "required">
                             <module-option name = "principal">dude</module-option>
                             <module-option name = "userName">dude</module-option>
                             <module-option name = "password">dude</module-option>
                             <module-option name = "managedConnectionFactoryName">jboss.jca:service=TxCM,name=JmsXA</module-option>
                             </login-module>
                             </authentication>
                             </application-policy>
                            


                            and jBoss/MDB was still able to authenticate to the JMS server on start up. The one thing I did put in my jboss.xml file for the MDBs were:

                            <message-driven>
                             <ejb-name>MyMDB</ejb-name>
                             ...
                             
                             <mdb-user>dude</mdb-user>
                             <mdb-passwd>dude</mdb-passwd>
                             ...
                            </message-driven>
                            


                            Removing the <mdb-user> and <mdb-passwd> would cause authentication of the MDB to fail whether the <application-policy> tag was present or not.

                            I understand from reading the FAQ that in general, the <application-policy> tag was needed but I was just wondering why apparently it was not needed in my case. My guess is that the <ndb-user> and <mdb-passwd> are used for MDB and <application-policy> is for something else (if so, what is it?)

                            Would appreciate any comments or directions to help me better understand.

                            Thanks in advance!

                            --
                            Josh