Skip to Content

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

JMS:Java Client XAQueueConnectionFactory.createQueueConnection() exception

Team,

Running from stanalone java client. Whe I try to put the message on JMS, it throws the exception. Some other person found the same problem(JMS Exception: hosts (hostname:port) cannot be accessed!).

I can create the initial context, lookup connection factory and look up queue succesfully but after that when I create the connection it throws the exception(listed below)

Same code if I run under jsp running on SAP WS runs fine all the way and put the message on the queue.

javax.jms.JMSException: The following hosts (hostname:port) cannot be accessed:

. Check host names and ports.

at com.sap.jms.client.connection.ConnectionFactory.getSocket(ConnectionF

actory.java:447)

at com.sap.jms.client.connection.ConnectionFactory.createConnection(Conn

ectionFactory.java:300)

at com.sap.jms.client.connection.ConnectionFactory.createConnection(Conn

ectionFactory.java:244)

at com.sap.jms.client.xa.XAQueueConnectionFactory.createQueueConnection(

XAQueueConnectionFactory.java:122)

at QueueSend.main(QueueSend.java:37)

This where I print out the context, cf and queue.

ctx=javax.naming.InitialContext@1833eca

qcf=com.sap.jms.client.xa.XAQueueConnectionFactory@18f5824

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