cancel
Showing results for 
Search instead for 
Did you mean: 

JMS Exception: hosts (hostname:port) cannot be accessed!

Former Member
0 Kudos

We are trying to connect a JMS client to SAP WAS. The SAP WAS installation appears to be ok.

When we try to connect our JMS client we get the following exception [no host name or port is mentioned]. Any suggestions? Has anybody else seen this error?

We can ping the IP Address on which SAP WAS is installed!

Currently when the client tries to connect this exception is received:

"

Logging to file gatewaylog.txt

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

accessed: . Check host names and ports.

at

com.sap.jms.client.connection.ConnectionFactory.getSocket(ConnectionFactory.java:447)

at

com.sap.jms.client.connection.ConnectionFactory.createConnection(ConnectionFactory.java:300)

at

com.sap.jms.client.connection.TopicConnectionFactory.createTopicConnection(TopicConnectionFactory.java:76)

at

ch.softwired.gateway.admin.gateway.AdminDispatcher.initJMS(AdminDispatcher.java:465)

at

ch.softwired.gateway.admin.gateway.AdminDispatcher.connect(AdminDispatcher.java:290)

at

ch.softwired.gateway.admin.gateway.AdminDispatcher.initialize(AdminDispatcher.java:212)

at

ch.softwired.gateway.admin.gateway.AdminDispatcher.setMobileGateway(AdminDispatcher.java:126)

at

ch.softwired.gateway.config.GatewayXmlConfig.loadAdmin(GatewayXmlConfig.java:1407)

at

ch.softwired.gateway.config.GatewayXmlConfig.load(GatewayXmlConfig.java:412)

at ch.softwired.gateway.base.MobileGateway.start(MobileGateway.java:575)

at ch.softwired.gateway.base.MobileGateway.main(MobileGateway.java:421)

java.lang.NullPointerException

at

ch.softwired.gateway.admin.gateway.SystemInformer.initJMS(SystemInformer.java:173)

at

ch.softwired.gateway.admin.gateway.SystemInformer.connect(SystemInformer.java:141)

at

ch.softwired.gateway.admin.gateway.AdminDispatcher.connect(AdminDispatcher.java:294)

at

ch.softwired.gateway.admin.gateway.AdminDispatcher.initialize(AdminDispatcher.java:212)

at

ch.softwired.gateway.admin.gateway.AdminDispatcher.setMobileGateway(AdminDispatcher.java:126)

at

ch.softwired.gateway.config.GatewayXmlConfig.loadAdmin(GatewayXmlConfig.java:1407)

at

ch.softwired.gateway.config.GatewayXmlConfig.load(GatewayXmlConfig.java:412)

at ch.softwired.gateway.base.MobileGateway.start(MobileGateway.java:575)

at ch.softwired.gateway.base.MobileGateway.main(MobileGateway.java:421)

java.lang.NullPointerException

at

ch.softwired.gateway.events.EventPublisher.<init>(EventPublisher.java:70)

at ch.softwired.gateway.events.EventHandler.start(EventHandler.java:202)

at ch.softwired.gateway.base.MobileGateway.start(MobileGateway.java:583)

at ch.softwired.gateway.base.MobileGateway.main(MobileGateway.java:421)

"

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Madhu,

I got it resolved

When you make a standalone java client the connection will be performed by a TCP socket to the server. Your problem is this cannot be achieved. When you do it from JSP your code will interact directly with the JMS on the server. No opening of socket to itself. That's why it works.

I would suggest launching a visual administrator, then going to the "dispatcher" nodes, (not server) and checking the properties of the JMS_provider service. Set up there a valid TCP port (perhaps it is empty or it is not read ?), then try to restart the whole cluster.

Answers (2)

Answers (2)

Former Member
0 Kudos

The problem was easily resolved. SAP VA does not start its JMS Provider from Dispatcher automatically [it is visible by a red cross through the JMS Provider] although it automatically starts the JMS provider for the Server. When the JMS provider is manually started the problem no longer existed. You can also edit this to start automatically.

Former Member
0 Kudos

Madhu,

Did you get anywhere. I have exact same problem. From stand alone java client I can lookup the ConnectionFactory and Queue, I actully made sure I haver right object once I lookedup from JNDI. But I get the same exception when I try to create the connection.

Also If I do the same thing from the JSP running on SAP WS, I do not have porblem. On the same Queue I can put the message without any problem. Do

Thanks,

Sanjay Amin