JBoss - jms-bridge - javax.jms.JMSSecurityException:无效的名称或密码

时间:2017-09-19 05:08:37

标签: jboss jms jboss7.x tibco bridge

我正在尝试创建一个从JBoss EAP 6.4到TIbco EMS 8的jms-bridge(我认为)。

我在独立配置中设置了以下内容:



<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>
&#13;
&#13;
&#13;

我为模块设置了以下目录结构:

&#13;
&#13;
[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]$
&#13;
&#13;
&#13;

启动时,我看到以下错误消息:

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]

在经过半天的努力调整无数错误后到达这里。 我已确认用户和密码有效。甚至尝试使用管理员用户和密码,但同样的错误。 tibco是否希望密码加密或其他什么?

请帮助跳过最后的障碍。

1 个答案:

答案 0 :(得分:0)

请在此处查看答案: https://developer.jboss.org/message/976162#976162

您需要指定的凭据适用于JMS,而不适用于JNDI。 您是否尝试在目标用户和密码中设置它?

     <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>