on 10-27-2005 8:27 AM
Hi,
I am trying to write a simple Java Standalone application that talks to a MessageDrivenBean sitting inside my J2EE application in SAP WAS. I have done all that is required in terms of the right descriptors, deploying my application ear etc.
<b>This is the code in my Standalone client;</b>
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();
Everything works fine but the last line of code which throws the following exception:
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.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)
I have spent 5 hrs now trying different stuff but for the love of god just can;t get past that last line.
I would greatly appreciate any sugestions that might fix this problem.
Thanks
Dushy
hi .............
We are also getting the same error please tell me how you resolved that problem we would be greatly appreciate you ..from last week we are facing this problem please tell me that solutions
with warm regards
syamprasad.p
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
May I know how did you resolved it,
Regards
Agasthuri Doss
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
85 | |
10 | |
10 | |
9 | |
6 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.