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 Error when using Sun's JRE when trying to send JMS messages to MQ Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
JavaRanch » Java Forums » Products » Websphere
Bookmark "Error when using Sun Watch "Error when using Sun New topic
Author

Error when using Sun's JRE when trying to send JMS messages to MQ

Amit Rosner
Greenhorn

Joined: Dec 03, 2001
Posts: 22
Hello,

I'm writing a standalone java application that should send and receive
messages to MQ using the JMS interfaces.

I have included the following JAR files in my classpath:
-------------------------------------------------------
j2ee.jar, messagingClient.jar, naming.jar, namingClient.jar, ecutils.jar, ras.jar, wsexception.jar, bootstrap.jar, iwsorb.jar, ffdc.jar, idl.jar, utils.jar, com.ibm.mq.jar, com.ibm.mq.jms.jar

I'm using the following jndi.properties file:
---------------------------------------------
java.naming.factory.initial = com.ibm.websphere.naming.WsnInitialContextFactory
java.naming.provider.url = iiop://ip_address:2809

When I'm using IBM's JRE, all works fine. I establish the connection and
send and receive message from the queue.

But the problem begins when I try to use Sun's JRE instead if IBM's.
Then I receive the following exception's stack trace:
-----------------------------------------------------
javax.naming.NamingException: Failed to initialize the ORB [Root exception is org.omg.CORBA.INITIALIZE: can't instantiate default ORB implementation com.ibm.CORBA.iiop.ORB vmcid: 0x0 minor code: 0 completed: No]
at com.ibm.ws.naming.util.Helpers.getOrb(Helpers.java:293)
at com.ibm.ws.naming.util.WsnInitCtxFactory.getInitialContextInternal(WsnInitCtxFactory.java:366)
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:347)
at com.try.jms.Connection.<init>(Connection.java:45)
at com.try.jms.Connection.<clinit>(Connection.java:33)
at com.try.jms.Sender.sendMessage(Sender.java:30)
at com.try.Screen.doUnload(Screen.java:242)
at com.try.Screen.access$1(Screen.java)
at com.try.Screen$2.mouseClicked(Screen.java:194)
at java.awt.AWTEventMulticaster.mouseClicked(AWTEventMulticaster.java:212)
at java.awt.Component.processMouseEvent(Component.java:5103)
at java.awt.Component.processEvent(Component.java:4897)
at java.awt.Container.processEvent(Container.java:1569)
at java.awt.Component.dispatchEventImpl(Component.java:3615)
at java.awt.Container.dispatchEventImpl(Container.java:1627)
at java.awt.Component.dispatchEvent(Component.java:3477)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:3483)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3207)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3128)
at java.awt.Container.dispatchEventImpl(Container.java:1613)
at java.awt.Window.dispatchEventImpl(Window.java:1606)
at java.awt.Component.dispatchEvent(Component.java:3477)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:480)
at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:201)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:151)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:145)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:137)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:100)
Caused by: org.omg.CORBA.INITIALIZE: can't instantiate default ORB implementation com.ibm.CORBA.iiop.ORB vmcid: 0x0 minor code: 0 completed: No
at org.omg.CORBA.ORB.create_impl(ORB.java:297)
at org.omg.CORBA.ORB.init(ORB.java:336)
at com.ibm.ws.orb.GlobalORBFactory.init(GlobalORBFactory.java:77)
at com.ibm.ejs.oa.EJSORBImpl.initializeORB(EJSORBImpl.java:174)
at com.ibm.ejs.oa.EJSClientORBImpl.<init>(EJSClientORBImpl.java:98)
at com.ibm.ejs.oa.EJSClientORBImpl.<init>(EJSClientORBImpl.java:74)
at com.ibm.ejs.oa.EJSORB.init(EJSORB.java:386)
at com.ibm.ws.naming.util.Helpers.getOrb(Helpers.java:284)
... 30 more
Caused by: java.lang.UnsatisfiedLinkError: registerNatives
at com.ibm.jvm.ExtendedSystem.registerNatives(Native Method)
at com.ibm.jvm.ExtendedSystem.<clinit>(ExtendedSystem.java:181)
at com.ibm.rmi.util.JDKBridge.setCodebaseProperties(JDKBridge.java:227)
at com.ibm.rmi.util.JDKBridge.<clinit>(JDKBridge.java:206)
at com.ibm.rmi.util.RepositoryId.<clinit>(RepositoryId.java:127)
at com.ibm.rmi.iiop.CDROutputStream.<clinit>(CDROutputStream.java:1127)
at com.ibm.rmi.corba.ORB.<init>(ORB.java:260)
at com.ibm.rmi.iiop.ORB.<init>(ORB.java:181)
at com.ibm.CORBA.iiop.ORB.<init>(ORB.java:559)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
at java.lang.reflect.Constructor.newInstance(Constructor.java:274)
at java.lang.Class.newInstance0(Class.java:308)
at java.lang.Class.newInstance(Class.java:261)
at org.omg.CORBA.ORB.create_impl(ORB.java:295)
... 37 more
java.lang.NullPointerException
at com.try.jms.Sender.sendMessage(Sender.java:31)
at com.try.Screen.doUnload(Screen.java:242)
at com.try.Screen.access$1(Screen.java)
at com.try.Screen$2.mouseClicked(Screen.java:194)
at java.awt.AWTEventMulticaster.mouseClicked(AWTEventMulticaster.java:212)
at java.awt.Component.processMouseEvent(Component.java:5103)
at java.awt.Component.processEvent(Component.java:4897)
at java.awt.Container.processEvent(Container.java:1569)
at java.awt.Component.dispatchEventImpl(Component.java:3615)
at java.awt.Container.dispatchEventImpl(Container.java:1627)
at java.awt.Component.dispatchEvent(Component.java:3477)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:3483)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3207)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3128)
at java.awt.Container.dispatchEventImpl(Container.java:1613)
at java.awt.Window.dispatchEventImpl(Window.java:1606)
at java.awt.Component.dispatchEvent(Component.java:3477)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:480)
at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:201)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:151)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:145)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:137)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:100)

I understand the some native library was not loaded, but I can't understand which one.

Can anyone help me with this one?

[ November 17, 2005: Message edited by: Amit Rosner ]

[ November 17, 2005: Message edited by: Amit Rosner ]

[ November 17, 2005: Message edited by: Amit Rosner ]
[ November 17, 2005: Message edited by: Amit Rosner ]
 
jQuery in Action, 2nd edition
 
subject: Error when using Sun's JRE when trying to send JMS messages to MQ