Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

SAP JMS JNDI Connection Factory issue when N/W hiccup occurs

Hi,

I am connecting to SAP PI v 7.3 JMS Broker using a JNDI Connection Factory. Everything is fine until the network goes down. The connection factory attempts to reconnect indefinitely until the network comes back up. However, after the network heals, I continue to find that SAP JMS Connection Factory is unable to dispense new connections claiming bad network. The following is the exception trace

Currently, the way to resolve is hard restart of the Java application which creates new JNDI context, connection factory etc. However, that is not acceptable solution. Ideally, I would like the connection factory to reissue proper connection when network heals.

Please let me know if this is a known issue or if there is work around for the same.

Thank you!

Ashwin

Caused by: com.sap.engine.services.rmi_p4.P4IOException: No alive connection. Check state of the server

                at com.sap.engine.services.rmi_p4.P4ObjectBrokerClientImpl.getException(P4ObjectBrokerClientImpl.java:824)

                at com.sap.engine.services.rmi_p4.P4ObjectBrokerClientImpl.getException(P4ObjectBrokerClientImpl.java:809)

                at com.sap.engine.services.rmi_p4.ClientConnection.sendRequest(ClientConnection.java:281)

                at com.sap.engine.services.rmi_p4.Call.sendSimpleRequest(Call.java:642)

                at com.sap.engine.services.rmi_p4.reflect.P4InvocationHandler.invokeInternal(P4InvocationHandler.java:125)

                ... 14 more

01:53:16,386 WARN  [DefaultJmsMessageListenerContainer] Could not refresh JMS Connection for destination 'Dev.Provista' - retrying in 5000 ms. Cause: Could not allocate JMS connection due to RMI error.; nested exception is com.sap.engine.services.rmi_p4.P4RuntimeException: Unexpected exception

javax.jms.JMSException: Could not allocate JMS connection due to RMI error.

                at com.sap.jms.client.rmi.RMIConnectionFactory.createConnection(RMIConnectionFactory.java:178)

                at com.sap.jms.client.rmi.RMIConnectionFactory.createConnection(RMIConnectionFactory.java:158)

                at com.sap.jms.client.rmi.RMIConnectionFactory.createConnection(RMIConnectionFactory.java:110)

                at org.springframework.jms.support.JmsAccessor.createConnection(JmsAccessor.java:184)

                at org.springframework.jms.listener.DefaultMessageListenerContainer.refreshConnectionUntilSuccessful(DefaultMessageListenerContainer.java:859)

                at org.springframework.jms.listener.DefaultMessageListenerContainer.recoverAfterListenerSetupFailure(DefaultMessageListenerContainer.java:838)

                at org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.run(DefaultMessageListenerContainer.java:969)

                at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)

                at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)

                at java.lang.Thread.run(Thread.java:662)

01:53:21,474 WARN  [DefaultJmsMessageListenerContainer] Could not refresh JMS Connection for destination 'XXXX' - retrying in 5000 ms. Cause: Could not allocate JMS connection due to RMI error.; nested exception is com.sap.engine.services.rmi_p4.P4RuntimeException: Unexpected exception

javax.jms.JMSException: Could not allocate JMS connection due to RMI error.

                at com.sap.jms.client.rmi.RMIConnectionFactory.createConnection(RMIConnectionFactory.java:178)

                at com.sap.jms.client.rmi.RMIConnectionFactory.createConnection(RMIConnectionFactory.java:158)

                at com.sap.jms.client.rmi.RMIConnectionFactory.createConnection(RMIConnectionFactory.java:110)

                at org.springframework.jms.support.JmsAccessor.createConnection(JmsAccessor.java:184)

                at org.springframework.jms.listener.DefaultMessageListenerContainer.refreshConnectionUntilSuccessful(DefaultMessageListenerContainer.java:859)

                at org.springframework.jms.listener.DefaultMessageListenerContainer.recoverAfterListenerSetupFailure(DefaultMessageListenerContainer.java:838)

                at org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.run(DefaultMessageListenerContainer.java:969)

                at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)

                at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)

                at java.lang.Thread.run(Thread.java:662)

Former Member
Not what you were looking for? View more on this topic or Ask a question