Ask a Question

Session is closed while sending messages to Tibco EMS queue

scelik
New Contributor

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 6
nmrao
Community Hero

Re: Session is closed while sending messages to Tibco EMS queue

What are the test steps in your test case?
Are you closing connection after each call?


Regards,
Rao.
scelik
New Contributor

Re: Session is closed while sending messages to Tibco EMS queue

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

Re: Session is closed while sending messages to Tibco EMS queue

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.


Regards,
Rao.
scelik
New Contributor

Re: Session is closed while sending messages to Tibco EMS queue

Hi Rao,

 

Thanks for your suggestion. "Close connection after each call" was disabled. Turning it on didn't help 😞

I also tried by setting the "reconnects" property in Hermes Configuration to "0", "1" and "2".

 

Regards,

 

Sinan

nmrao
Community Hero

Re: Session is closed while sending messages to Tibco EMS queue

Ok. Thank you for trying. How frequently the issue is happening?


Regards,
Rao.
scelik
New Contributor

Re: Session is closed while sending messages to Tibco EMS queue

This happens in 90% of the cases when I run this testCase.

 

Regards,

Sinan

cancel
Showing results for 
Search instead for 
Did you mean: