• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Tim Cooke
  • Jeanne Boyarsky
  • Liutauras Vilda
Sheriffs:
  • Frank Carver
  • Henry Wong
  • Ron McLeod
Saloon Keepers:
  • Tim Moores
  • Frits Walraven
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Piet Souris
  • Himai Minh

What did I do wront? JMS communication exception

 
Ranch Hand
Posts: 37
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I got the following exception. What does this mean? This is my first time to use JMS from application client model. I'm using the MQ simulator in WSAD 5.1.
javax.naming.CommunicationException: A communication failure occurred while attempting to obtain an initial context with the provider URL: "corbaloc:iiop:myhost". Make sure that any bootstrap address information in the URL is correct and that the target name server is running. A bootstrap address with no port specification defaults to port 2809. Possible causes other than an incorrect bootstrap address or unavailable name server include the network environment and workstation network configuration. Root exception is org.omg.CORBA.COMM_FAILURE: WRITE_ERROR_SEND_1 minor code: 49421050 completed: No
at com.ibm.ws.orbimpl.transport.HTTPOutputStream.write(Unknown Source)
at com.ibm.rmi.iiop.IIOPOutputStream.writeTo(IIOPOutputStream.java:283)
at com.ibm.rmi.iiop.Connection.send(Connection.java:1483)
at com.ibm.rmi.iiop.Connection._locate(Connection.java:263)
at com.ibm.rmi.iiop.Connection.locate(Connection.java:242)
at com.ibm.rmi.iiop.GIOPImpl.locate(GIOPImpl.java:184)
at com.ibm.rmi.corba.Corbaloc.locateUsingINS(Corbaloc.java:305)
at com.ibm.rmi.corba.Corbaloc.resolve(Corbaloc.java:367)
at com.ibm.rmi.corba.ORB.string_to_object(ORB.java:2929)
at com.ibm.ws.naming.util.WsnInitCtxFactory.stringToObject(WsnInitCtxFactory.java:1254)
at com.ibm.ws.naming.util.WsnInitCtxFactory.mergeWsnNSProperties(WsnInitCtxFactory.java:1105)
at com.ibm.ws.naming.util.WsnInitCtxFactory.getRootContextFromServer(WsnInitCtxFactory.java:677)
at com.ibm.ws.naming.util.WsnInitCtxFactory.getRootJndiContext(WsnInitCtxFactory.java:605)
at com.ibm.ws.naming.util.WsnInitCtxFactory.getInitialContextInternal(WsnInitCtxFactory.java:480)
at com.ibm.ws.naming.util.WsnInitCtx.getContext(WsnInitCtx.java:102)
at com.ibm.ws.naming.util.WsnInitCtx.getContextIfNull(WsnInitCtx.java:408)
at com.ibm.ws.naming.util.WsnInitCtx.lookup(WsnInitCtx.java:131)
at javax.naming.InitialContext.lookup(InitialContext.java:359)
at PointToPoint.<init>(PointToPoint.java:27)
at PointToPoint.main(PointToPoint.java:90)
at java.lang.reflect.Method.invoke(Native Method)
at com.ibm.websphere.client.applicationclient.launchClient.createContainerAndLaunchApp(launchClient.java:616)
at com.ibm.websphere.client.applicationclient.launchClient.main(launchClient.java:420)
at java.lang.reflect.Method.invoke(Native Method)
at com.ibm.ws.bootstrap.WSLauncher.main(WSLauncher.java:94)
 
shell Johnson
Ranch Hand
Posts: 37
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I found my answer. I have to start server first before I run the application client. I got different exception this time.(see at the bottom. If you know the answer post here). But it doesn't matter, I switch from QM simulator for java developer to embedded messaging. Then it works. Here are the tips:
1) Be sure to stop server before you change server config. The change won't be saved if you didn't stop it. Restart the server evertime you change server config.
2) Use "server1" as server name in server config, not the name you create.
3) start server.
4) Choosing embedded messaging and be sure to put these two jars in the application client module's run external classpath.
C:\wsad\v5.1\runtimes\base_v5\mqjms\Java\lib\com.ibm.mq.jar
C:\wsad\v5.1\runtimes\base_v5\mqjms\Java\lib\com.ibm.mqjms.jar
5) then run.
The following is the exception I got when I run MQ simulator.
com.ibm.mq.MQException: MQJE001: Completion Code 2, Reason 2012
at com.ibm.mq.MQManagedConnectionJ11.<init>(MQManagedConnectionJ11.java:246)
at com.ibm.mq.MQJDManagedConnectionFactoryJ11._createManagedConnection(MQJDManagedConnectionFactoryJ11.java:128)
at com.ibm.mq.MQJDManagedConnectionFactoryJ11.createManagedConnection(MQJDManagedConnectionFactoryJ11.java:146)
at com.ibm.mq.StoredManagedConnection.<init>(StoredManagedConnection.java:80)
at com.ibm.mq.MQSimpleConnectionManager.allocateConnection(MQSimpleConnectionManager.java:171)
at com.ibm.mq.MQQueueManager.obtainBaseMQQueueManager(MQQueueManager.java:737)
at com.ibm.mq.MQQueueManager.construct(MQQueueManager.java:671)
at com.ibm.mq.MQQueueManager.<init>(MQQueueManager.java:452)
at com.ibm.mq.MQSPIQueueManager.<init>(MQSPIQueueManager.java:52)
at com.ibm.mq.jms.MQConnection.createQM(MQConnection.java:1659)
at com.ibm.mq.jms.MQConnection.createQMNonXA(MQConnection.java:1129)
at com.ibm.mq.jms.MQQueueConnection.<init>(MQQueueConnection.java:170)
at com.ibm.mq.jms.MQQueueConnection.<init>(MQQueueConnection.java:80)
at com.ibm.mq.jms.MQQueueConnectionFactory.createQueueConnection(MQQueueConnectionFactory.java:145)
at PointToPoint.<init>(PointToPoint.java:31)
at PointToPoint.main(PointToPoint.java:90)
at java.lang.reflect.Method.invoke(Native Method)
at com.ibm.websphere.client.applicationclient.launchClient.createContainerAndLaunchApp(launchClient.java:616)
at com.ibm.websphere.client.applicationclient.launchClient.main(launchClient.java:420)
at java.lang.reflect.Method.invoke(Native Method)
at com.ibm.ws.bootstrap.WSLauncher.main(WSLauncher.java:94)
javax.jms.JMSException: MQJMS2005: failed to create MQQueueManager for 'WAS_localhost_server1'
at com.ibm.mq.jms.services.ConfigEnvironment.newException(ConfigEnvironment.java:556)
at com.ibm.mq.jms.MQConnection.createQM(MQConnection.java:1736)
at com.ibm.mq.jms.MQConnection.createQMNonXA(MQConnection.java:1129)
at com.ibm.mq.jms.MQQueueConnection.<init>(MQQueueConnection.java:170)
at com.ibm.mq.jms.MQQueueConnection.<init>(MQQueueConnection.java:80)
at com.ibm.mq.jms.MQQueueConnectionFactory.createQueueConnection(MQQueueConnectionFactory.java:145)
at PointToPoint.<init>(PointToPoint.java:31)
at PointToPoint.main(PointToPoint.java:90)
at java.lang.reflect.Method.invoke(Native Method)
at com.ibm.websphere.client.applicationclient.launchClient.createContainerAndLaunchApp(launchClient.java:616)
at com.ibm.websphere.client.applicationclient.launchClient.main(launchClient.java:420)
at java.lang.reflect.Method.invoke(Native Method)
at com.ibm.ws.bootstrap.WSLauncher.main(WSLauncher.java:94)
 
author
Posts: 181
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
This is documented in the following White Paper:
http://www-106.ibm.com/developerworks/websphere/library/techarticles/0310_barcia/barcia.html
 
I miss the old days when I would think up a sinister scheme for world domination and you would show a little emotional support. So just look at this tiny ad:
the value of filler advertising in 2021
https://coderanch.com/t/730886/filler-advertising
reply
    Bookmark Topic Watch Topic
  • New Topic