Forum Discussion

scelik's avatar
scelik
New Contributor
8 years ago

Session is closed while sending messages to Tibco EMS queue

Hi,

 

When I send multiple textmessages to a Tibco EMS queue within a loop, I get sometimes the following exception for some messages:

 

  • Thu May 12 13:32:13 CEST 2016:WARN:Error Response
  • javax.jms.IllegalStateException: Session is closed
  • at com.tibco.tibjms.TibjmsxSessionImp.createQueue(TibjmsxSessionImp.java:4551)
  • at hermes.impl.jms.SimpleDestinationManager.createDesintaion(SimpleDestinationManager.java:60)
  • at hermes.impl.jms.SimpleDestinationManager.getDestination(SimpleDestinationManager.java:137)
  • at hermes.impl.jms.AbstractSessionManager.getDestination(AbstractSessionManager.java:387)
  • at hermes.impl.DefaultHermesImpl.getDestination(DefaultHermesImpl.java:323)
  • at com.eviware.soapui.impl.wsdl.submit.transports.jms.JMSConnectionHolder.getQueue(JMSConnectionHolder.java:146)
  • at com.eviware.soapui.impl.wsdl.submit.transports.jms.HermesJmsRequestSendTransport.execute(HermesJmsRequestSendTransport.java:43)
  • at com.eviware.soapui.impl.wsdl.submit.transports.jms.HermesJmsRequestTransport.sendRequest(HermesJmsRequestTransport.java:98)
  • at com.eviware.soapui.impl.wsdl.WsdlSubmit.run(WsdlSubmit.java:119)
  • at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)
  • at java.util.concurrent.FutureTask.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)

 

This exception happens randomly for the messages. When I am lucky I can send them all without exceptions. 

 

I run SoapUI on my local windows machine (laptop) and the Tibco EMS is running on a linux server which can be reached by VPN connection. Maybe the connection is not perfect, but ping time is 10-20ms. The "connect" and "reconnect" property of the queue is set to "2".

Hermes configuration:

provider className="com.tibco.tibjms.TibjmsQueueConnectionFactory">

reconnects="0"

transacted="true"

audit="false"

useConsumerForQueueBrowse="false"

 

Any suggestions?

6 Replies

  • nmrao's avatar
    nmrao
    Champion Level 3
    What are the test steps in your test case?
    Are you closing connection after each call?
    • scelik's avatar
      scelik
      New Contributor

      Hi Rao,

       

      My testcase is:

      - Datasource 1 to read messages from an excel file

      - JDBC call to count the records in a table in the database

      - JMS request to send a message

      - JDBC call to count again and one assertion (result should be +1 relative to the first JDBC call to check the message is processed)

      - Datasource loop (back to "JMS request to send a message"

      - Datasource 2 to read messages from another excel file

      - JMS request with a message from datasource 2

      - JDBC call to make sure some fields are changed

      - Datasource loop (back to  "JMS request with a message from datasource 2")

       

      In the first datasource I send 20 messages and in the second 10 messages. I do not close the connection. I get the exception in both of these JMS request steps. 

      When I change the configuration of my application and SoapUI project to use the EMS server on my local machine (laptop), this exception never occurs.

       

      Regards, 

      Sinan

      • nmrao's avatar
        nmrao
        Champion Level 3
        May be you can try again after setting the below change:
        Go to File -> Preferences ->HttpSettings -> Close connection after each call-> check it and save the preferences.
        And retry your case to see if that is reproducible.