Service Virtualization

Expand all | Collapse all

JMSSecurityException is thrown, while connecting to Topic EMS JNDI Topic/Queue from JMS Sens/Receive step

  • 1.  JMSSecurityException is thrown, while connecting to Topic EMS JNDI Topic/Queue from JMS Sens/Receive step

    Posted Aug 23, 2017 04:17 AM

    Greetings Team,

     

    I am facing a weird problem, hoping to find the resolution from experts.

     

    Scenario: I have to Virtualize JNDI based Topic/Queue created on Tibco EMS server.

     

    We are not allowed to create the proxy Topic/Queue on Tibco EMS as there is no need of LIVE invocation implementation.

     

    Approach :

    1. Create VS image- Through Request-Response pair

    2. Mapped the Req-Res pair directory

    3. Selected transport protocol as JMS

    4. In the transport protocol configuration screen, disabled LIVE Invocation option

    5. Created and selected Actual/Live JMS (JNDI Topic) assets from Proxy Request and Proxy Response dropdowns

    6. Procedure followed to create the JMS Assets

    Created JMS Session->JMS Connection-->JMS Connection Factory-->JNDI Context ( Asset Verification is successful)

    Verifying Asset
    Opening JNDI context with URL: ldap://*********************************
    Performing JNDI lookup with name: fxClientDestinationUID=***********************
    Success: class *******************************************

    7. Selected class as JNDI Topic

     

    In order to verify the JMS connectivity used the created JMS asset in "JMS Send Receive" step, however below error is thrown

     

    Executing step
    Autopopulated JMS Producer with producer:********  Connection Factory (JMS Message Producer)
    Adjusting Runtime Scopes
    Adjusting Runtime Scopes
    Opening JNDI context with URL: ********
    Performing JNDI lookup with name: fxClientDestinationUID=********
    Performing JNDI lookup with name: fxClientUID=********
    Creating JMS Connection
    Error: Error creating connection with factory ******** Connection Factory: Failed to connect to any server at: tcp********,tcp********[Error: authentication failed: url that returned this exception = TCP********]


    ============================================================================
    | Exception:
    ============================================================================
    | Message:     Error creating connection with factory ******** Connection Factory: Failed to connect to any server at: tcp********,tcp********[Error: authentication failed: url that returned this exception = TCP********]
    ----------------------------------------------------------------------------
    | Trapped Exception: Failed to connect to any server at: tcp:********,tcp********[Error: authentication failed: url that returned this exception = TCP********]
    | Trapped Message:   javax.jms.JMSSecurityException: Failed to connect to any server at: tcp********,tcp********[Error: authentication failed: url that returned this exception = TCP********]
    ----------------------------------------------------------------------------
    STACK TRACE
    javax.jms.JMSSecurityException: Failed to connect to any server at: tcp********,tcp********[Error: authentication failed: url that returned this exception = TCP********]
     at com.tibco.tibjms.TibjmsConnection._create(TibjmsConnection.java:1389)

     

    When I use the same JMS connection details in "Tibco EMS Messaging (Deprecated) step", I am able to publish/subscribe the messages.

     

     

    Please let me know, if any additional configuration/ setting needs to be done to use JMS Send/Receive step.

     

    Thanks in advance.



  • 2.  Re: JMSSecurityException is thrown, while connecting to Topic EMS JNDI Topic/Queue from JMS Sens/Receive step

    Posted Aug 23, 2017 01:28 PM

    My guess is you need to enter your username and password on the 'JMS Connection' asset.



  • 3.  Re: JMSSecurityException is thrown, while connecting to Topic EMS JNDI Topic/Queue from JMS Sens/Receive step

    Posted Aug 23, 2017 09:42 PM

    Greetings Kevin,

     

    The JMS username and credentials are provided in the JMS connection asset.

     

    And the JMS connection asset verification was successful.

     

    Thanks in advance.

     

    Regards,

    Mahesh



  • 4.  Re: JMSSecurityException is thrown, while connecting to Topic EMS JNDI Topic/Queue from JMS Sens/Receive step

    Posted Aug 24, 2017 01:52 AM

    Make sure you are testing the 'Connection' asset and not the 'Connection Factory' asset.  Your except (6) above only goes as far as the connection factory lookup, I do not see it actually trying the connection.



  • 5.  Re: JMSSecurityException is thrown, while connecting to Topic EMS JNDI Topic/Queue from JMS Sens/Receive step

    Posted Aug 24, 2017 02:40 AM

    Greetings Kevin,

     

    Thanks for the quick response, much appreciated.

     

    Please find below the  stack trace of the following assets that I have created

     

    Verifying Asset
    Opening JNDI context with URL: ldap:********
    Performing JNDI lookup with name: **ClientUID=******
    Creating JMS Connection
    Starting JMS Connection
    Stopping JMS Connection
    Closing JMS Connection
    Success: class com.**********JmsConnection

     

    Connection Factory 

     

    Verifying Asset
    Opening JNDI context with URL: ldap:******
    Performing JNDI lookup with name: **ClientUID=******
    Success: class com.*******JmsTopicConnectionFactory

     

    JNDI Context

     

    Verifying Asset
    Opening JNDI context with URL: ldap:**********
    Success: class javax.naming.InitialContext

     

    JMS JNDI Topic

     

    Verifying Asset
    Opening JNDI context with URL: ldap:********
    Performing JNDI lookup with name: **ClientDestinationUID=*********
    Success: class com.***********.**.decorator.jms.***********JmsTopic



  • 6.  Re: JMSSecurityException is thrown, while connecting to Topic EMS JNDI Topic/Queue from JMS Sens/Receive step

    Posted Aug 24, 2017 03:01 AM

    Can you give me the full stack trace of the error you get in the Send Receive step?



  • 7.  Re: JMSSecurityException is thrown, while connecting to Topic EMS JNDI Topic/Queue from JMS Sens/Receive step

    Posted Aug 24, 2017 03:12 AM

    There you go Kevin,

     

    Executing step
    Autopopulated JMS Producer with producer:L****@L***** Connection Factory (JMS Message Producer)
    Autopopulated JMS Session with L**** Connection Factory (JMS Session)
    Adjusting Runtime Scopes
    Adjusting Runtime Scopes
    Opening JNDI context with URL: ldap:*******
    Performing JNDI lookup with name: **ClientDestinationUID=*******
    Performing JNDI lookup with name: **ClientUID=*******
    Creating JMS Connection
    Error: Error creating connection with factory L**** Connection Factory: Failed to connect to any server at: tcp:*******,tcp:******* [Error: authentication failed: url that returned this exception = TCP:******* ]


    ============================================================================
    | Exception:
    ============================================================================
    | Message: Error creating connection with factory L**** Connection Factory: Failed to connect to any server at: tcp:*******,tcp:******* [Error: authentication failed: url that returned this exception = TCP:******* ]
    ----------------------------------------------------------------------------
    | Trapped Exception: Failed to connect to any server at: tcp://*******,tcp:******* [Error: authentication failed: url that returned this exception = TCP:******* ]
    | Trapped Message: javax.jms.JMSSecurityException: Failed to connect to any server at: tcp:*******,tcp:******* [Error: authentication failed: url that returned this exception = TCP:******* ]
    ----------------------------------------------------------------------------
    STACK TRACE
    javax.jms.JMSSecurityException: Failed to connect to any server at: tcp://*******,tcp://******* [Error: authentication failed: url that returned this exception = TCP:/******* ]
    at com.tibco.tibjms.TibjmsConnection._create(TibjmsConnection.java:1389)
    at com.tibco.tibjms.TibjmsConnection.<init>(TibjmsConnection.java:4127)
    at com.tibco.tibjms.TibjmsTopicConnection.<init>(TibjmsTopicConnection.java:36)
    at com.tibco.tibjms.TibjmsxCFImpl._createImpl(TibjmsxCFImpl.java:191)
    at com.tibco.tibjms.TibjmsxCFImpl._createConnection(TibjmsxCFImpl.java:253)
    at com.tibco.tibjms.TibjmsConnectionFactory.createConnection(TibjmsConnectionFactory.java:36)
    at com.****.**.decorator.jms.****JmsConnectionFactory.createConnection(****JmsConnectionFactory.java:222)
    at com.itko.lisa.messaging.asset.AbstractJmsConnectionFromFactoryAsset.createInstance(AbstractJmsConnectionFromFactoryAsset.java:131)
    at com.itko.lisa.messaging.asset.AbstractJmsConnectionFromFactoryAsset.createInstance(AbstractJmsConnectionFromFactoryAsset.java:42)
    at com.itko.lisa.asset.LocalAssetRuntime$InstanceEntry.open(LocalAssetRuntime.java:1691)
    at com.itko.lisa.asset.LocalAssetRuntime$InstanceEntry.checkOut(LocalAssetRuntime.java:1227)
    at com.itko.lisa.asset.LocalAssetRuntime$RuntimeEntry.checkOut(LocalAssetRuntime.java:660)
    at com.itko.lisa.asset.LocalAssetRuntime.doOpenAsset(LocalAssetRuntime.java:157)
    at com.itko.lisa.asset.LocalAssetRuntime.openAssetInScope(LocalAssetRuntime.java:109)
    at com.itko.lisa.asset.LocalAssetRuntime.openAsset(LocalAssetRuntime.java:100)
    at com.itko.lisa.messaging.asset.AbstractJmsSessionAsset.createInstance(AbstractJmsSessionAsset.java:84)
    at com.itko.lisa.messaging.asset.AbstractJmsSessionAsset.createInstance(AbstractJmsSessionAsset.java:35)
    at com.itko.lisa.asset.LocalAssetRuntime$InstanceEntry.open(LocalAssetRuntime.java:1691)
    at com.itko.lisa.asset.LocalAssetRuntime$InstanceEntry.checkOut(LocalAssetRuntime.java:1227)
    at com.itko.lisa.asset.LocalAssetRuntime$RuntimeEntry.checkOut(LocalAssetRuntime.java:660)
    at com.itko.lisa.asset.LocalAssetRuntime.doOpenAsset(LocalAssetRuntime.java:157)
    at com.itko.lisa.asset.LocalAssetRuntime.openAssetInScope(LocalAssetRuntime.java:109)
    at com.itko.lisa.asset.LocalAssetRuntime.openAsset(LocalAssetRuntime.java:100)
    at com.itko.lisa.messaging.asset.JmsProducerAsset.createInstance(JmsProducerAsset.java:106)
    at com.itko.lisa.messaging.asset.JmsProducerAsset.createInstance(JmsProducerAsset.java:29)
    at com.itko.lisa.asset.LocalAssetRuntime$InstanceEntry.open(LocalAssetRuntime.java:1691)
    at com.itko.lisa.asset.LocalAssetRuntime$InstanceEntry.checkOut(LocalAssetRuntime.java:1227)
    at com.itko.lisa.asset.LocalAssetRuntime$RuntimeEntry.checkOut(LocalAssetRuntime.java:660)
    at com.itko.lisa.asset.LocalAssetRuntime.doOpenAsset(LocalAssetRuntime.java:157)
    at com.itko.lisa.asset.LocalAssetRuntime.openAssetInScope(LocalAssetRuntime.java:109)
    at com.itko.lisa.asset.LocalAssetRuntime.openAsset(LocalAssetRuntime.java:100)
    at com.itko.lisa.messaging.jms.JmsSendOperation.doExecute(JmsSendOperation.java:190)
    at com.itko.lisa.messaging.jms.JmsSendOperation.doExecute(JmsSendOperation.java:68)
    at com.itko.lisa.asset.operation.AbstractRuntimeOperation.execute(AbstractRuntimeOperation.java:167)
    at com.itko.lisa.messaging.builder.AbstractSendReceiveOperation.doExecute(AbstractSendReceiveOperation.java:152)
    at com.itko.lisa.asset.operation.AbstractRuntimeOperation.execute(AbstractRuntimeOperation.java:167)
    at com.itko.lisa.asset.operation.AbstractOperationStep.execute(AbstractOperationStep.java:176)
    at com.itko.lisa.asset.operation.AbstractOperationStep.execute(AbstractOperationStep.java:125)
    at com.itko.lisa.asset.operation.AbstractOperationStepEditor$ExecuteTask.run(AbstractOperationStepEditor.java:575)
    at com.itko.lisa.asset.ui.ProgressLog$Worker.doInBackground(ProgressLog.java:116)
    at com.itko.lisa.asset.ui.ProgressLog$Worker.doInBackground(ProgressLog.java:98)
    at javax.swing.SwingWorker$1.call(Unknown Source)
    at java.util.concurrent.FutureTask.run(Unknown Source)
    at javax.swing.SwingWorker.run(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)
    ============================================================================


    at com.itko.lisa.messaging.asset.AbstractJmsConnectionFromFactoryAsset.createInstance(AbstractJmsConnectionFromFactoryAsset.java:134)
    at com.itko.lisa.messaging.asset.AbstractJmsConnectionFromFactoryAsset.createInstance(AbstractJmsConnectionFromFactoryAsset.java:42)
    at com.itko.lisa.asset.LocalAssetRuntime$InstanceEntry.open(LocalAssetRuntime.java:1691)
    at com.itko.lisa.asset.LocalAssetRuntime$InstanceEntry.checkOut(LocalAssetRuntime.java:1227)
    at com.itko.lisa.asset.LocalAssetRuntime$RuntimeEntry.checkOut(LocalAssetRuntime.java:660)
    at com.itko.lisa.asset.LocalAssetRuntime.doOpenAsset(LocalAssetRuntime.java:157)
    at com.itko.lisa.asset.LocalAssetRuntime.openAssetInScope(LocalAssetRuntime.java:109)
    at com.itko.lisa.asset.LocalAssetRuntime.openAsset(LocalAssetRuntime.java:100)
    at com.itko.lisa.messaging.asset.AbstractJmsSessionAsset.createInstance(AbstractJmsSessionAsset.java:84)
    at com.itko.lisa.messaging.asset.AbstractJmsSessionAsset.createInstance(AbstractJmsSessionAsset.java:35)
    at com.itko.lisa.asset.LocalAssetRuntime$InstanceEntry.open(LocalAssetRuntime.java:1691)
    at com.itko.lisa.asset.LocalAssetRuntime$InstanceEntry.checkOut(LocalAssetRuntime.java:1227)
    at com.itko.lisa.asset.LocalAssetRuntime$RuntimeEntry.checkOut(LocalAssetRuntime.java:660)
    at com.itko.lisa.asset.LocalAssetRuntime.doOpenAsset(LocalAssetRuntime.java:157)
    at com.itko.lisa.asset.LocalAssetRuntime.openAssetInScope(LocalAssetRuntime.java:109)
    at com.itko.lisa.asset.LocalAssetRuntime.openAsset(LocalAssetRuntime.java:100)
    at com.itko.lisa.messaging.asset.JmsProducerAsset.createInstance(JmsProducerAsset.java:106)
    at com.itko.lisa.messaging.asset.JmsProducerAsset.createInstance(JmsProducerAsset.java:29)
    at com.itko.lisa.asset.LocalAssetRuntime$InstanceEntry.open(LocalAssetRuntime.java:1691)
    at com.itko.lisa.asset.LocalAssetRuntime$InstanceEntry.checkOut(LocalAssetRuntime.java:1227)
    at com.itko.lisa.asset.LocalAssetRuntime$RuntimeEntry.checkOut(LocalAssetRuntime.java:660)
    at com.itko.lisa.asset.LocalAssetRuntime.doOpenAsset(LocalAssetRuntime.java:157)
    at com.itko.lisa.asset.LocalAssetRuntime.openAssetInScope(LocalAssetRuntime.java:109)
    at com.itko.lisa.asset.LocalAssetRuntime.openAsset(LocalAssetRuntime.java:100)
    at com.itko.lisa.messaging.jms.JmsSendOperation.doExecute(JmsSendOperation.java:190)
    at com.itko.lisa.messaging.jms.JmsSendOperation.doExecute(JmsSendOperation.java:68)
    at com.itko.lisa.asset.operation.AbstractRuntimeOperation.execute(AbstractRuntimeOperation.java:167)
    at com.itko.lisa.messaging.builder.AbstractSendReceiveOperation.doExecute(AbstractSendReceiveOperation.java:152)
    at com.itko.lisa.asset.operation.AbstractRuntimeOperation.execute(AbstractRuntimeOperation.java:167)
    at com.itko.lisa.asset.operation.AbstractOperationStep.execute(AbstractOperationStep.java:176)
    at com.itko.lisa.asset.operation.AbstractOperationStep.execute(AbstractOperationStep.java:125)
    at com.itko.lisa.asset.operation.AbstractOperationStepEditor$ExecuteTask.run(AbstractOperationStepEditor.java:575)
    at com.itko.lisa.asset.ui.ProgressLog$Worker.doInBackground(ProgressLog.java:116)
    at com.itko.lisa.asset.ui.ProgressLog$Worker.doInBackground(ProgressLog.java:98)
    at javax.swing.SwingWorker$1.call(Unknown Source)
    at java.util.concurrent.FutureTask.run(Unknown Source)
    at javax.swing.SwingWorker.run(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)



  • 8.  Re: JMSSecurityException is thrown, while connecting to Topic EMS JNDI Topic/Queue from JMS Sens/Receive step
    Best Answer

    Posted Aug 25, 2017 01:51 PM

    What's your exact version of DevTest?

     

    Can you try two things for me? 

     1. Give your 'Connection' asset an explicit name, run the step again, and give me the full 'Executing test...' output.

     2. Try creating a 'JMS Producer' asset, making sure it references your request queue and your Connection asset.  Try the test again, and give me the full 'Executing test..' output if it still fails.



  • 9.  Re: JMSSecurityException is thrown, while connecting to Topic EMS JNDI Topic/Queue from JMS Sens/Receive step

    Posted Aug 25, 2017 02:22 PM

    I am working on v9.0.0

     

    you are a Cham Kevin

     

    The second option worked

     

    Try creating a 'JMS Producer' asset, making sure it references your request queue and your Connection asset.



  • 10.  Re: JMSSecurityException is thrown, while connecting to Topic EMS JNDI Topic/Queue from JMS Sens/Receive step

    Posted Aug 25, 2017 03:46 PM

    Okay.  So when an explicit producer asset isn't present it's auto-configuring one, but for some reason it's also auto-configuring a JMS Connection as well, rather than using the one you created in your config.  I'd have to take a close look at your config, but my guess is there's either something weird about your JMS Connection asset, or this is a bug that has been fixed since v9.0.0.



  • 11.  Re: JMSSecurityException is thrown, while connecting to Topic EMS JNDI Topic/Queue from JMS Sens/Receive step

    Posted Aug 25, 2017 04:11 PM

    Hi Kevin,

     

    We have run into a new issue, now I am able to publish the message to the Topic, however JMS Send-Receive step is not passing the Properties that I have set in Custom Properties editor.



  • 12.  Re: JMSSecurityException is thrown, while connecting to Topic EMS JNDI Topic/Queue from JMS Sens/Receive step

    Posted Aug 25, 2017 04:56 PM

    When you execute in the step editor, do the custom properties appear in the middle 'Request' tab?  This shows the request message object as it was actually sent.



  • 13.  Re: JMSSecurityException is thrown, while connecting to Topic EMS JNDI Topic/Queue from JMS Sens/Receive step

    Posted Aug 25, 2017 06:00 PM

    Yes it is, infact the message was being received as expected, but was seen at a different place, hence the confusion.

     

    Thanks again for the quick response.

     

    Much appreciated.