File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
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 Murach's Java Servlets and JSP this week in the Servlets 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.
 
Consider Paul's rocket mass heater.
 
subject: Standalone JMS Client problem hetting the connection - Please Advice
 
Similar Threads
Strange behaviour in Exception delivery for JMS connection
JMS queue in Websphere 5.0 - Class Cast Exception!
JMS client on WAS V6.1
JMS Issue: Unable to send message from stand alone application to WebSphere JMS queue
JMS Question