Problem in executing Java Program on Sun's JRE


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 2 of 2

Thread: Problem in executing Java Program on Sun's JRE

  1. #1
    Join Date
    Jan 2006
    Posts
    1

    Problem in executing Java Program on Sun's JRE

    I have a java program(accessing remote methods of EJB on Websphere Applicaton Developer) which is compiled using IBM Websphere JDK.

    The program works fine, if executed using the IBM's JRE.

    I have to use the java program in PeopleSoft, and PeopleSoft only allows Sun's JDK.

    But if the same program is executed using the Sun's JRE, then it throws the following exception.



    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.(Connection.java:45)
    at com.try.jms.Connection.(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.(EJSClientORBImpl.java:98)
    at com.ibm.ejs.oa.EJSClientORBImpl.(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.(ExtendedSystem.java:181)
    at com.ibm.rmi.util.JDKBridge.setCodebaseProperties(JDKBridge.java:227)
    at com.ibm.rmi.util.JDKBridge.(JDKBridge.java:206)
    at com.ibm.rmi.util.RepositoryId.(RepositoryId.java:127)
    at com.ibm.rmi.iiop.CDROutputStream.(CDROutputStream.java:1127)
    at com.ibm.rmi.corba.ORB.(ORB.java:260)
    at com.ibm.rmi.iiop.ORB.(ORB.java:181)
    at com.ibm.CORBA.iiop.ORB.(ORB.java:559)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:3 9)
    at

    sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImp l.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)




    I conclude here that the problem is only becuase of the Sun's JRE. But can there be any workaround to this? I have also found out about Pluggable Application Client that allows programs to access Websphere resources thoruhg Sun's JRE. more Info : http://www-128.ibm.com/developerwork...09_bhogal.html

    Kindly help me out with this.

  2. #2
    Join Date
    Oct 2005
    Location
    New Jersey
    Posts
    255
    there are two possibile solutions which come to my mind:
    1. you could try adding the jars for the ORB from the IBM JRE in the classpath. the packages are not available in the Sun JDK (the package name is different)
    2. you could modify the startup script of your app server to set the "org.omg.CORBA.ORBClass" system property for the JVM to the com.sun.CORBA.iiop.ORB
    it's worth a try.
    Happiness is good health and a bad memory.

Similar Threads

  1. Java Applet Compiler problem?
    By mdl in forum Java
    Replies: 3
    Last Post: 03-07-2005, 03:34 AM
  2. I need someone to write a java program for me!
    By Dan in forum java.announcements
    Replies: 1
    Last Post: 01-15-2002, 05:55 PM
  3. Replies: 0
    Last Post: 11-13-2001, 09:07 PM
  4. Replies: 3
    Last Post: 08-30-2000, 10:15 AM
  5. Replies: 1
    Last Post: 06-23-2000, 09:17 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center