File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Standalone JMS Client problem hetting the connection - Please Advice

 
Xavier George
Ranch Hand
Posts: 39
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Khalid Habib
Greenhorn
Posts: 29
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I also have same problem
can any body guide us ?
 
Marcel Friedmann
Greenhorn
Posts: 6
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Expand Resource > JMS > Queue/Topic Connection Factory > "your factory"
Under Provider endpoints enter the following triplet: <Server-Host-name>:<SIB-Endpoint-Port-of-Server/JVM>:BootstrapBasicMessaging

This is necessary when using external jms clients.

Source:
http://www.devops-insight.com/2014/08/jms-in-websphere.html
 
Khalid Habib
Greenhorn
Posts: 29
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks MR Marcel Friedmann

Let me try it on
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic