wood burning stoves 2.0*
The moose likes Websphere and the fly likes Standalone JMS Client problem hetting the connection - Please Advice Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Products » Websphere
Bookmark "Standalone JMS Client problem hetting the connection - Please Advice" Watch "Standalone JMS Client problem hetting the connection - Please Advice" New topic
Author

Standalone JMS Client problem hetting the connection - Please Advice

Xavier George
Ranch Hand

Joined: Jul 29, 2005
Posts: 39
I am wracking my brain for the past 2 days to figure out how to fix this error. I googled and looked into the forum but all efforts were in vain.

I am trying to run standalone JMS Client to put the message into the queue.

Environment - RAD 6.0

Configuration
----------------
JMS Providers -> Default Messaging -> Configured Connection Factory and associated with the BUS.
JMS Providers -> Default Messaging -> Configured Queue


Service Integration -> Bus -> Configured a Bus
Buses > mybus > Bus members > Messaging engines - Started

Now, configuration is done.

My client program
--------------------

private void putMessage()
{

try
{
Hashtable env = new Hashtable();
env.put(Context.INITIAL_CONTEXT_FACTORY,"com.ibm.websphere.naming.WsnInitialContextFactory");
env.put(Context.PROVIDER_URL, "iiop://localhost:2809");

Context initialContext = new InitialContext(env);

ConnectionFactory connectionFactory = (ConnectionFactory)initialContext.lookup("myconnectionfactory");
Queue queue = (Queue)initialContext.lookup("myqueue");

Connection conn = connectionFactory.createConnection();
conn.start();

Session session = conn.createSession(false, Session.AUTO_ACKNOWLEDGE);

...
...
...


conn.stop();
}
catch(Exception e)
{
// oooooooopss somethign wrong
}
}

It is erroring at Connection conn = connectionFactory.createConnection();

Below is the stack trace
----------------------------

ep 27, 2006 11:40:03 AM com.ibm.ws.sib.utils.ras.SibMessage
SEVERE: SIB_MESSAGE
Sep 27, 2006 11:40:03 AM com.ibm.ws.sib.utils.ras.SibMessage
WARNING: SIB_MESSAGE
javax.jms.JMSException: CWSIA0241E: An exception was received during the call to the method JmsManagedConnectionFactoryImpl.createConnection: com.ibm.websphere.sib.exception.SIResourceException: CWSIT0006E: It is not possible to contact a messaging engine in bus mybus..
at com.ibm.ws.sib.api.jms.impl.JmsManagedConnectionFactoryImpl.createConnection(JmsManagedConnectionFactoryImpl.java:225)
at com.ibm.ws.sib.api.jms.impl.JmsManagedConnectionFactoryImpl.createConnection(JmsManagedConnectionFactoryImpl.java:148)
at JMSTest.getContext(JMSTest.java:122)
at JMSTest.main(JMSTest.java:165)
Caused by: com.ibm.websphere.sib.exception.SIResourceException: CWSIT0006E: It is not possible to contact a messaging engine in bus mybus.
at com.ibm.ws.sib.trm.client.TrmSICoreConnectionFactoryImpl2.remoteBootstrap(TrmSICoreConnectionFactoryImpl2.java:374)
at com.ibm.ws.sib.trm.client.TrmSICoreConnectionFactoryImpl2.createConnection(TrmSICoreConnectionFactoryImpl2.java:147)
at com.ibm.ws.sib.trm.client.TrmSICoreConnectionFactoryImpl2.createConnection(TrmSICoreConnectionFactoryImpl2.java:95)
at com.ibm.ws.sib.api.jmsra.impl.JmsJcaConnectionFactoryImpl.createCoreConnection(JmsJcaConnectionFactoryImpl.java:498)
at com.ibm.ws.sib.api.jmsra.impl.JmsJcaConnectionFactoryImpl.createCoreConnection(JmsJcaConnectionFactoryImpl.java:434)
at com.ibm.ws.sib.api.jmsra.impl.JmsJcaConnectionFactoryImpl.createConnection(JmsJcaConnectionFactoryImpl.java:277)
at com.ibm.ws.sib.api.jms.impl.JmsManagedConnectionFactoryImpl.createConnection(JmsManagedConnectionFactoryImpl.java:195)

I really will appreciate if someone could help.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Standalone JMS Client problem hetting the connection - Please Advice
 
Similar Threads
JMS Issue: Unable to send message from stand alone application to WebSphere JMS queue
Strange behaviour in Exception delivery for JMS connection
JMS Question
JMS client on WAS V6.1
JMS queue in Websphere 5.0 - Class Cast Exception!