History | Log In     View a printable version of the current page. Get help!  
Issue Details (XML | Word)

Key: HJMS-66
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Critical Critical
Assignee: Colin Crist
Reporter: Michael Chayat
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
HermesJMS

Queue browsing and message posting to remote EMS server tries to access localhost:7222

Created: 13/Mar/08 07:18 PM   Updated: 16/Jun/08 03:56 PM
Component/s: None
Affects Version/s: 1.13
Fix Version/s: 1.13

Environment: JRE 1.5, HermesJMS 1.13, Tibco EMS 4.4.2


 Description  « Hide
The connection to the remote server works and is able to discover the queues and the topics, but when trying to browse a queue or post a message to it, the connection resolves itself to tcp://localhost:7222 and fails with the following message:

Error message:
2008-03-14 10:02:45,611 [Hermes ThreadPool-2] ERROR hermes.browser.tasks.HermesBrowserTaskListener - Failed to connect to the server at tcp://localhost:7222

My guess would be - it somehow resorts to the default EMS Connection Factory (ConnectionManagerSupport.java:122) initialization that defaults to tcp://localhost:7222 due to the username not being initiasized properly here:

            if (username == null)
            {
               rval = connectionFactory.createConnection();
            }
            else
            {
               rval = connectionFactory.createConnection(username, password);
            }

Exception stack trace:
javax.jms.JMSException: Failed to connect to the server at tcp://localhost:7222
at com.tibco.tibjms.TibjmsxLinkTcp._createSocket(TibjmsxLinkTcp.java:817)
at com.tibco.tibjms.TibjmsxLinkTcp.connect(TibjmsxLinkTcp.java:913)
at com.tibco.tibjms.TibjmsConnection._create(TibjmsConnection.java:1002)
at com.tibco.tibjms.TibjmsConnection.<init>(TibjmsConnection.java:2707)
at com.tibco.tibjms.TibjmsTopicConnection.<init>(TibjmsTopicConnection.java:36)
at com.tibco.tibjms.TibjmsxCFImpl._createImpl(TibjmsxCFImpl.java:177)
at com.tibco.tibjms.TibjmsxCFImpl._createConnection(TibjmsxCFImpl.java:239)
at com.tibco.tibjms.TibjmsConnectionFactory.createConnection(TibjmsConnectionFactory.java:36)
at hermes.impl.jms.ConnectionManagerSupport.createConnection(ConnectionManagerSupport.java:122)
at hermes.impl.jms.ConnectionManagerSupport.createConnection(ConnectionManagerSupport.java:92)
at hermes.impl.jms.ConnectionPerThreadManager.reconnect(ConnectionPerThreadManager.java:68)
at hermes.impl.jms.ConnectionPerThreadManager.connect(ConnectionPerThreadManager.java:80)
at hermes.impl.jms.ConnectionPerThreadManager.getConnection(ConnectionPerThreadManager.java:124)
at hermes.impl.jms.ConnectionPerThreadManager.getObject(ConnectionPerThreadManager.java:90)
at hermes.impl.jms.ThreadLocalSessionManager.connect(ThreadLocalSessionManager.java:190)
at hermes.impl.jms.ThreadLocalSessionManager.getSession(ThreadLocalSessionManager.java:570)
at hermes.impl.jms.AbstractSessionManager.getDestination(AbstractSessionManager.java:465)
at hermes.impl.DefaultHermesImpl.getDestination(DefaultHermesImpl.java:367)
at hermes.browser.tasks.BrowseDestinationTask.invoke(BrowseDestinationTask.java:141)
at hermes.browser.tasks.TaskSupport.run(TaskSupport.java:175)
at hermes.browser.tasks.ThreadPool.run(ThreadPool.java:170)
at java.lang.Thread.run(Thread.java:595)

Connection details
   <factory classpathId="Tibco EMS 4.4.2">
        <provider className="com.tibco.tibjms.TibjmsConnectionFactory">
            <properties>
                <property name="SSLAuthOnly" value="true"/>
                <property name="SSLDebugTrace" value="true"/>
                <property name="SSLEnableVerifyHost" value="false"/>
                <property name="SSLEnableVerifyHostName" value="false"/>
                <property name="SSLIdentity" value="/C:/temp/EMS_SIT_CERTS/emsclientefxsit.p12"/>
                <property name="SSLPassword" value="CAL8SUH9"/>
                <property name="SSLTrace" value="true"/>
                <property name="SSLTrustedCertificate" value="/C:/temp/EMS_SIT_CERTS/NAB_CIB_Root_CA.pem"/>
                <property name="userName" value="eFX_SIT"/>
                <property name="serverUrl" value="ssl://mellatems01.global.thenational.com:20202"/>
                <property name="userPassword" value="eFX_SIT"/>
            </properties>
        </provider>
        <connection clientID="" connectionPerThread="true">
            <session audit="false" id="myEMS" reconnects="0" transacted="true" useConsumerForQueueBrowse="false"/>
        </connection>
        <destination clientID="$sys.route.EMS-SIT1:EID.CALE.LOG.EVENT.UPD.V02" domain="2" durable="true" name="EID.CALE.LOG.EVENT.UPD.V02"/>
        <destination clientID="$sys.route.EMS-SIT1:EID.CALE.NOTIFICATION.UPD.V01" domain="2" durable="true" name="EID.CALE.NOTIFICATION.UPD.V01"/>
        <destination clientID="$sys.route.EMS-SIT1:EID.Test.MQToEMS" domain="2" durable="true" name="EID.Test.MQToEMS"/>
        <destination clientID="$sys.route.EMS-SIT3:MERCURYFX.DEALS.PROV_CONF" domain="2" durable="true" name="MERCURYFX.DEALS.PROV_CONF"/>
        <destination clientID="$sys.route.EMS-SIT1:topic.shakedown" domain="2" durable="true" name="topic.shakedown"/>
        <destination domain="1" name="$TMP$.EMS-SIT2.4AA447CF8F861F.1"/>
        <destination domain="1" name="$TMP$.EMS-SIT2.4AA447CF8F863.1"/>
        <destination domain="1" name="$sys.admin"/>
        <destination domain="1" name="$sys.lookup"/>
        <destination domain="1" name="$sys.undelivered"/>
        <destination domain="1" name="&gt;"/>
        <destination domain="1" name="EID.CALE.&gt;"/>
        <destination domain="1" name="EID.CALE.HAWK.ALERT.UPD.V01"/>
        <destination domain="1" name="EID.CALE.LOG.EVENT.UPD.V01"/>
        <destination domain="1" name="EID.CALE.LOG.EVENT.UPD.V02"/>
        <destination domain="1" name="EID.CALE.NOTIFICATION.UPD.V01"/>
        <destination domain="1" name="EID.CALE.RESUBMIT.EVENT.REQ.V01"/>
        <destination domain="1" name="EID.CALE.RETRY.ALERT.UPD.V02"/>
        <destination domain="1" name="EID.CALE.RETRY.LOG.EVENT.UPD.V01"/>
        <destination domain="1" name="EID.CALE.RETRY.LOG.EVENT.UPD.V02"/>
        <destination domain="1" name="EID.CALE.USER.ALERT.UPD.V01"/>
        <destination domain="1" name="EID.CALE.USER.EVENT.REQ.V01"/>
        <destination domain="1" name="EID.CALE.USER.EVENT.RSP.V01"/>
        <destination domain="1" name="EID.XI50.ENCRYPT.REQ.V01"/>
        <destination domain="1" name="EID.XI50.ENCRYPT.RSP.V01"/>
        <destination domain="1" name="MYTESTQUEUE"/>
        <destination domain="1" name="load.balance"/>
        <destination domain="1" name="sit.private.tv.adml.nabcapital.mr"/>
        <destination domain="1" name="sit.private.tv.svml.nabcapital.mr"/>
        <destination domain="2" name="$TMP$.EMS-SIT1.&gt;"/>
        <destination domain="2" name="$TMP$.EMS-SIT3.&gt;"/>
        <destination domain="2" name="&gt;"/>
        <destination clientID="$sys.route.EMS-SIT1:EID.CALE.NOTIFICATION.UPD.V01" domain="2" durable="true" name="EID.CALE.NOTIFICATION.UPD.V01"/>
        <destination clientID="durable.shakedown.node2" domain="2" durable="true" name="topic.shakedown"/>
        <destination clientID="$sys.route.EMS-SIT3:MERCURYFX.DEALS.PROV_CONF" domain="2" durable="true" name="MERCURYFX.DEALS.PROV_CONF"/>
        <destination clientID="$sys.route.EMS-SIT1:EID.CALE.LOG.EVENT.UPD.V02" domain="2" durable="true" name="EID.CALE.LOG.EVENT.UPD.V02"/>
        <destination clientID="$sys.route.EMS-SIT1:EID.Test.MQToEMS" domain="2" durable="true" name="EID.Test.MQToEMS"/>
        <destination clientID="$sys.route.EMS-SIT1:topic.shakedown" domain="2" durable="true" name="topic.shakedown"/>
        <destination domain="2" name="EID.CALE.LOG.EVENT.UPD.V02"/>
        <destination clientID="$sys.route.EMS-SIT1:EID.CALE.LOG.EVENT.UPD.V02" domain="2" durable="true" name="EID.CALE.LOG.EVENT.UPD.V02"/>
        <destination domain="2" name="EID.CALE.NOTIFICATION.UPD.V01"/>
        <destination clientID="$sys.route.EMS-SIT1:EID.CALE.NOTIFICATION.UPD.V01" domain="2" durable="true" name="EID.CALE.NOTIFICATION.UPD.V01"/>
        <destination domain="2" name="EID.TEST.RESUBMIT"/>
        <destination domain="2" name="EID.Test.MQToEMS"/>
        <destination clientID="$sys.route.EMS-SIT1:EID.Test.MQToEMS" domain="2" durable="true" name="EID.Test.MQToEMS"/>
        <destination domain="2" name="MERCURYFX.DEALS.PROV_CONF"/>
        <destination clientID="$sys.route.EMS-SIT3:MERCURYFX.DEALS.PROV_CONF" domain="2" durable="true" name="MERCURYFX.DEALS.PROV_CONF"/>
        <destination domain="2" name="private.ac_prototype.verified.cmml.v1_1.nabcapital.shared_services.au.rdp.pricing.exchange_traded.integration_test"/>
        <destination domain="2" name="private.ac_prototype.verified.cmml.v1_1.nabcapital.shared_services.au.rdp.pricing.interest.integration_test"/>
        <destination domain="2" name="sit.private.tv.&gt;"/>
        <destination domain="2" name="sit.private.tv.adml.nabcapital.mr"/>
        <destination domain="2" name="sit.private.tv.svml.nabcapital.mr"/>
        <destination domain="2" name="test.public.eid.verified.cmml.v1_1.nabcapital.shared_services.au.reference_data.&gt;"/>
        <destination domain="2" name="test.public.eid.verified.cmml.v1_1.nabcapital.shared_services.au.reference_data.rates.approved.interest.nz.ntmr.1100"/>
        <destination domain="2" name="test.public.eid.verified.cmml.v1_2.nabcapital.shared_services.au.reference_data.rates.approved"/>
        <destination domain="2" name="topic.shakedown"/>
        <destination clientID="durable.shakedown.node2" domain="2" durable="true" name="topic.shakedown"/>
        <destination clientID="$sys.route.EMS-SIT1:topic.shakedown" domain="2" durable="true" name="topic.shakedown"/>
        <extension className="hermes.ext.ems.TibcoEMSAdminFactory">
            <properties>
                <property name="password" value="eFX_SIT"/>
                <property name="serverURL" value="ssl://mellatems01.global.thenational.com:20202"/>
                <property name="username" value="eFX_SIT"/>
            </properties>
        </extension>
    </factory

 All   Comments   Change History      Sort Order:
Colin Crist [18/Mar/08 09:44 AM]

I've fixed this (I think) - try the build at http://hermesjms.com/patches.


Michael Chayat [18/Mar/08 08:57 PM]
Colin,

I tried the fix, but still no luck. I think it has the same issue with the typo in the TrustedCerts attribute variable name:

com.tibco.tibjms.admin.TibjmsAdminException: Unable to connect to server. Root cause:
javax.jms.JMSSecurityException: Can not initialize SSL client: no trusted certificates are set
at com.tibco.tibjms.admin.MessengerUtil.<init>(MessengerUtil.java:67)
at com.tibco.tibjms.admin.TibjmsAdmin.<init>(TibjmsAdmin.java:348)
at com.tibco.tibjms.admin.TibjmsAdmin.<init>(TibjmsAdmin.java:329)
at hermes.ext.ems.TibcoEMSAdminFactory.createAdmin(TibcoEMSAdminFactory.java:105)
at hermes.ext.ems.TibcoEMSAdmin.getAdmin(TibcoEMSAdmin.java:75)
at hermes.ext.ems.TibcoEMSAdmin.discoverDestinationConfigs(TibcoEMSAdmin.java:261)
at hermes.impl.HermesAdminAdapter.discoverDestinationConfigs(HermesAdminAdapter.java:84)
at hermes.impl.DefaultHermesImpl.discoverDestinationConfigs(DefaultHermesImpl.java:1357)
at hermes.browser.tasks.DiscoverDestinationsTask.invoke(DiscoverDestinationsTask.java:76)
at hermes.browser.tasks.TaskSupport.run(TaskSupport.java:175)
at hermes.browser.tasks.ThreadPool.run(ThreadPool.java:170)
at java.lang.Thread.run(Thread.java:595)
Internal exception:
javax.jms.JMSSecurityException: Can not initialize SSL client: no trusted certificates are set
at com.tibco.tibjms.TibjmsxLinkSSL._initSSL(TibjmsxLinkSSL.java:298)
at com.tibco.tibjms.TibjmsxLinkSSL.connect(TibjmsxLinkSSL.java:399)
at com.tibco.tibjms.TibjmsConnection._create(TibjmsConnection.java:1002)
at com.tibco.tibjms.TibjmsConnection.<init>(TibjmsConnection.java:2707)
at com.tibco.tibjms.TibjmsQueueConnection.<init>(TibjmsQueueConnection.java:36)
at com.tibco.tibjms.TibjmsxCFImpl._createImpl(TibjmsxCFImpl.java:186)
at com.tibco.tibjms.TibjmsxCFImpl._createConnection(TibjmsxCFImpl.java:239)
at com.tibco.tibjms.TibjmsQueueConnectionFactory.createQueueConnection(TibjmsQueueConnectionFactory.java:87)
at com.tibco.tibjms.admin.MessengerUtil.<init>(MessengerUtil.java:55)
at com.tibco.tibjms.admin.TibjmsAdmin.<init>(TibjmsAdmin.java:348)
at com.tibco.tibjms.admin.TibjmsAdmin.<init>(TibjmsAdmin.java:329)
at hermes.ext.ems.TibcoEMSAdminFactory.createAdmin(TibcoEMSAdminFactory.java:105)
at hermes.ext.ems.TibcoEMSAdmin.getAdmin(TibcoEMSAdmin.java:75)
at hermes.ext.ems.TibcoEMSAdmin.discoverDestinationConfigs(TibcoEMSAdmin.java:261)
at hermes.impl.HermesAdminAdapter.discoverDestinationConfigs(HermesAdminAdapter.java:84)
at hermes.impl.DefaultHermesImpl.discoverDestinationConfigs(DefaultHermesImpl.java:1357)
at hermes.browser.tasks.DiscoverDestinationsTask.invoke(DiscoverDestinationsTask.java:76)
at hermes.browser.tasks.TaskSupport.run(TaskSupport.java:175)
at hermes.browser.tasks.ThreadPool.run(ThreadPool.java:170)
at java.lang.Thread.run(Thread.java:595)

Michael Chayat [15/May/08 06:16 AM]
Colin,

I managed to find the root cause for the getters not being invoked.

The function isGetter (ReflectUtils.java:80) will always return false because m.getParameterTypes().length will never equal to 1 for getters. Once I change the return line to:
return m.getName().startsWith("get") && isPublicAndNonStatic(m);

SSL works like a charm.

Can you, please, run the build again?

Thanks

Colin Crist [28/May/08 04:06 AM]
Looks like a c&p error. Doh.

Changed to:

public static boolean isGetter(Method m)
   {
      return m.getName().startsWith("get") && isPublicAndNonStatic(m) && m.getParameterTypes().length == 0 ;
   }

Updated patch build in http://hermesjms.com/patches




Colin Crist [16/Jun/08 04:05 AM]
Did my last fix work for you? I'd like to get a Hermes 1.13 build out and include this fix.

Michael Chayat [16/Jun/08 03:47 PM]
Hi Colin,

Sorry for not replying. The latest version works fine.

Thanks.

Colin Crist [16/Jun/08 03:56 PM]
Cool - thanks Michael.