4 Replies Latest reply on Sep 19, 2017 4:50 AM by meetpraveenkumar

    JBoss - jms-bridge - javax.jms.JMSSecurityException: invalid name or password

    meetpraveenkumar

      Hi,

       

      I am trying to create a jms-bridge from JBoss EAP 6.4 to TIbco EMS 8 (I think).

       

      I setup the below in the standalone config:

             <jms-bridge name="TibcoBridge" module="org.tbco">

               <source>

                   <connection-factory name="ConnectionFactory"/>

                   <destination name="mdm.output.queue"/>

               </source>

               <target>

                   <connection-factory name="XAQueueConnectionFactory"/>

                   <destination name="sync.queue.test"/>

                   <context>

                       <property key="java.naming.factory.initial" value="com.tibco.tibjms.naming.TibjmsInitialContextFactory"/>

                       <property key="java.naming.provider.url" value="tibjmsnaming://jms:7222"/>

                       <property key="java.naming.security.principal" value="consumer"/>

                       <property key="java.naming.security.credentials" value="password"/>

                   </context>

               </target>

               <quality-of-service>AT_MOST_ONCE</quality-of-service>

               <failure-retry-interval>100000</failure-retry-interval>

               <max-retries>10</max-retries>

               <max-batch-size>10</max-batch-size>

               <max-batch-time>100</max-batch-time>

              </jms-bridge>

       

      I setup the below directory structure for the module:

      [jboss@poc-informatica-jboss01 /usr/share/jbossas/modules/system/layers/base/org/tbco]$ ls -ltr main

      total 592

      -rw-r--r--. 1 jboss jboss 271790 Sep 19 13:00 tibcrypt.jar

      -rw-r--r--. 1 jboss jboss 323650 Sep 19 13:00 tibjms.jar

      drwxr-xr-x. 2 jboss jboss      6 Sep 19 13:03 attachments

      -rw-r--r--. 1 jboss jboss    734 Sep 19 13:31 module.xml

      -rw-r--r--. 1 jboss jboss      0 Sep 19 14:09 derby.log

       

      [jboss@poc-informatica-jboss01 /usr/share/jbossas/modules/system/layers/base/org/tbco/main]$ cat module.xml

      <?xml version="1.0" encoding="UTF-8"?>

      <module xmlns="urn:jboss:module:1.1" name="org.tbco">

      <properties>

          <property name="jboss.api" value="private"/>

      </properties>

       

       

      <resources>

          <!-- Insert resources required to connect to the source or target   -->

          <resource-root path="."/>

          <resource-root path="tibcrypt.jar"/>

          <resource-root path="tibjms.jar"/>

      </resources>

       

       

      <dependencies>

          <module name="javax.api"/>

          <module name="javax.jms.api"/>

          <module name="javax.transaction.api"/>

          <module name="javax.resource.api"/>

          <module name="org.hornetq"/>

          <module name="org.jboss.common-core"/>

          <module name="javax.management.j2ee.api"/>

          <module name="org.jboss.logging"/>

      </dependencies>

      </module>

      [jboss@poc-informatica-jboss01 /usr/share/jbossas/modules/system/layers/base/org/tbco/main]$

       

      Upon startup, I am seeing the below error message:

      14:15:37,039 WARN  [org.hornetq.jms.server] (Thread-98) HQ122010: Failed to connect JMS Bridge TibcoBridge: javax.jms.JMSSecurityException: invalid name or password

              at com.tibco.tibjms.Tibjmsx.buildException(Tibjmsx.java:575)

              at com.tibco.tibjms.TibjmsConnection._create(TibjmsConnection.java:1330)

              at com.tibco.tibjms.TibjmsConnection.<init>(TibjmsConnection.java:4115)

              at com.tibco.tibjms.TibjmsQueueConnection.<init>(TibjmsQueueConnection.java:36)

              at com.tibco.tibjms.TibjmsxCFImpl._createImpl(TibjmsxCFImpl.java:173)

              at com.tibco.tibjms.TibjmsxCFImpl._createConnection(TibjmsxCFImpl.java:253)

              at com.tibco.tibjms.TibjmsXAConnectionFactory.createConnection(TibjmsXAConnectionFactory.java:54)

              at org.hornetq.jms.bridge.impl.JMSBridgeImpl.createConnection(JMSBridgeImpl.java:1155)

              at org.hornetq.jms.bridge.impl.JMSBridgeImpl.setupJMSObjects(JMSBridgeImpl.java:1370)

              at org.hornetq.jms.bridge.impl.JMSBridgeImpl.setupJMSObjectsWithRetry(JMSBridgeImpl.java:1504)

              at org.hornetq.jms.bridge.impl.JMSBridgeImpl.access$2400(JMSBridgeImpl.java:80)

              at org.hornetq.jms.bridge.impl.JMSBridgeImpl$FailureHandler.run(JMSBridgeImpl.java:2132)

              at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [rt.jar:1.8.0_121]

              at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [rt.jar:1.8.0_121]

              at java.lang.Thread.run(Thread.java:745) [rt.jar:1.8.0_121]

       

      Reached here after half a day of struggle tweaking numerous mistakes.

      I have confirmed that the user and password works. Even tried with admin user and password but same error.

      Does tibco expect password to be encrypted or something?

       

      Please assist with jumping across hopefully the final hurdle.

        • 1. Re: JBoss - jms-bridge - javax.jms.JMSSecurityException: invalid name or password
          andey

          - This issue is specific to the Tibco JMS configured securely which expects username/password for connection.

           

          - check if the security credentials that you are passing are required when you create a queue session or for connection to Tibco..

           

          - try to add java.security details as custom properties for JMS Provider

           

          - The only workaround is to turn off access control at the JMS level, which removes the need for credentials entirely, but leaves your queue/topic wide open.

           

          - Also make sure that your password file is encoded in UTF-8 if it contains special characters like accents.

           

           

          See TIBCOmmunity Migration Notice | TIBCO Community

          • 2. Re: JBoss - jms-bridge - javax.jms.JMSSecurityException: invalid name or password
            meetpraveenkumar

            Hi Anup,

             

            Thank you for your reply.

            We are actually migrating from WebLogic to JBoss. These credentials work in WebLogic but are failing in JBoss.

            I also tried with another account, that too an Admin account and got the same error.

             

            - The credentials that I have given here are from Tibco. These were passed on by the Tibco admin as credentials to use when accessing the queue.

            - Can't remove access control as this exists in the current environment

            - There are NO non printable characters in the password

             

            Can you advise what do you mean when you say java.security details? Sorry, I am not across it.

            • 3. Re: JBoss - jms-bridge - javax.jms.JMSSecurityException: invalid name or password
              jmesnil

              The credentials you need to specify are for JMS, not for JNDI.
              Have you tried to set it in the target'user and password?

               

                       <target>

                           <connection-factory name="XAQueueConnectionFactory"/>

                           <destination name="sync.queue.test"/>

                           <user>consumer</user>

                           <password>password</password>

                           <context>

                               <property key="java.naming.factory.initial" value="com.tibco.tibjms.naming.TibjmsInitialContextFactory"/>

                               <property key="java.naming.provider.url" value="tibjmsnaming://jms:7222"/>

                               <property key="java.naming.security.principal" value="consumer"/>

                               <property key="java.naming.security.credentials" value="password"/>

                           </context>

                       </target>

              • 4. Re: JBoss - jms-bridge - javax.jms.JMSSecurityException: invalid name or password
                meetpraveenkumar

                I came here to post that I actually managed to make it work.

                I should have checked my mail.

                 

                Thanks a lot guys. This is a very active and helpful forum.