cancel
Showing results for 
Search instead for 
Did you mean: 

JMSException: hosts (hostname:port) cannot be accessed

madhusudana_reddy2
Contributor
0 Kudos

Hi...all

My scenaro is connecting to the JMS server through the(Servelet) Java Client proxy i am able to connect to local JMS Server but when i tried to connect to the Remote JMS server it's giving error.And also i checked through the Stand alone program in that also giving the same error.stand alone progaram also able to connect to the localserver that is NWDW server

javax.jms.JMSException: The following hosts (hostname:port) cannot be accessed: . Check host names and ports.(host:50110)

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.ConnectionFactory.createConnection(ConnectionFactory.java:244)

at com.sap.jms.client.connection.QueueConnectionFactory.createQueueConnection(QueueConnectionFactory.java:70)

at com.yambay.mach.gatewayjmsbridge.JMSTestClient.initialiseServer(JMSTestClient.java:98)

at com.yambay.mach.gatewayjmsbridge.JMSTestClient.<init>(JMSTestClient.java:66)

at com.yambay.mach.gatewayjmsbridge.JMSTestClient.main(JMSTestClient.java:75)

and my program is

Properties m_JNDIProperties = new Properties();

m_JNDIProperties.put(Context.INITIAL_CONTEXT_FACTORY,"com.sap.engine.services.jndi.InitialContextFactoryImpl");

m_JNDIProperties.put (Context.PROVIDER_URL,"localhost:50004");

m_JNDIProperties.put(Context.SECURITY_PRINCIPAL,"Administrator");

m_JNDIProperties.put(Context.SECURITY_CREDENTIALS,"*****");

/* Create a JNDI API InitialContext object. */

m_Context = new InitialContext(m_JNDIProperties);

queueConnectionFactory = (QueueConnectionFactory) m_Context.lookup("jmsfactory/default/QueueConnectionFactory");

queueConnection = queueConnectionFactory.createQueueConnection();

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Check the <b>host name and the port..</b>

also check weather you have <b>proper authorization</b> to conenct with it.

Regards,

Farooq.

Former Member
0 Kudos

Refer this..hope it may help u:)

Regards,

Farooq.