Failed to initialize the ORB
2 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Devendra_Rawat
Posted On:   Friday, March 17, 2006 02:39 AM

Iam trying to run a simple java client using WAS but iam facing problem. 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:294) at com.ibm.ws.naming.util.WsnInitCtxFactory.getInitialContextInternal(WsnInitCtxFactory.java:373) at com.ibm.ws.naming.util.WsnInitCtx.getContext(WsnInitCtx.java:112) at com.ibm.ws.naming.util.WsnInitCtx.getContextIfNull(WsnInitCtx.java:422) at com.ibm.ws.naming.util.WsnInitCtx.lookup(WsnInitCtx.java:143) at javax.naming.InitialContext.lookup(Unknown S   More>>

Iam trying to run a simple java client using WAS but iam facing problem.

			

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:294)
at com.ibm.ws.naming.util.WsnInitCtxFactory.getInitialContextInternal(WsnInitCtxFactory.java:373)
at com.ibm.ws.naming.util.WsnInitCtx.getContext(WsnInitCtx.java:112)
at com.ibm.ws.naming.util.WsnInitCtx.getContextIfNull(WsnInitCtx.java:422)
at com.ibm.ws.naming.util.WsnInitCtx.lookup(WsnInitCtx.java:143)
at javax.naming.InitialContext.lookup(Unknown Source)
at client.com.example.HelloWorld.main(HelloWorld.java:28)
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(Unknown Source)
at org.omg.CORBA.ORB.init(Unknown Source)
at com.ibm.ws.orb.GlobalORBFactory.init(GlobalORBFactory.java:82)
at com.ibm.ejs.oa.EJSORBImpl.initializeORB(EJSORBImpl.java:174)
at com.ibm.ejs.oa.EJSClientORBImpl. (EJSClientORBImpl.java:97)
at com.ibm.ejs.oa.EJSClientORBImpl. (EJSClientORBImpl.java:73)
at com.ibm.ejs.oa.EJSORB.init(EJSORB.java:386)
at com.ibm.ws.naming.util.Helpers.getOrb(Helpers.java:285)
... 6 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(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
at java.lang.reflect.Constructor.newInstance(Unknown Source)
at java.lang.Class.newInstance0(Unknown Source)
at java.lang.Class.newInstance(Unknown Source)
... 14 more


			

Client Code


Properties p = new Properties();
p.put(Context.PROVIDER_URL, "iiop://localhost:2809");
p.put("org.omg.CORBA.ORBClass","com.ibm.CORBA.iiop.ORB");
p.put("org.omg.CORBA.ORBSingletonClass","com.ibm.rmi.corba.ORBSingleton");
p.put("javax.rmi.CORBA.UtilClass","com.ibm.rmi.javax.rmi.CORBA.Util");
p.put("javax.rmi.CORBA.StubClass","com.ibm.rmi.javax.rmi.CORBA.StubDelegateImpl");
p.put("javax.rmi.CORBA.PortableRemoteObjectClass","com.ibm.rmi.javax.rmi.PortableRemoteObject");
p.put("java.naming.factory.url.pkgs","com.ibm.ws.naming");

p.put(Context.INITIAL_CONTEXT_FACTORY,"com.ibm.websphere.naming.WsnInitialContextFactory");
InitialContext ctx = new InitialContext( p );
System.out.println("Hello");
Object obj = ctx.lookup("Hello");


HelloHome ejbHome = (HelloHome)
PortableRemoteObject.narrow(obj,HelloHome.class);
HelloObject ejbObject = ejbHome.create();

String message = ejbObject.sayHello();
System.out.println( message );

I have set the these jar files in the classpath txClientPrivate.jar,naming.jar,ras.jar,naming.jar,ras.jar,bootstrap.jar,wsexception.jar,emf.jar,tools.jar,wssec.jar,naming.jar,namingclient.jar,lmproxy.jar,sas.jar,ecutils.jar,ibmorb.jar,iwsorb.jar,ffdc.jar,core.jar,marshall.jar,messagingClient.jar,idl.jar & j2ee.jar
Please tell me what else needs to be done to rectify this problem.    <<Less

Re: Failed to initialize the ORB

Posted By:   Anonymous  
Posted On:   Friday, March 31, 2006 01:58 AM

Hi Devendra,

I´ve had the same problem and searched a few days for that error.
When you want to use SUN JDK anymore (I imply the fact that you currently use it), it is possible to take the Sun CORBA implementation to access JNDI.
The best way in my opinion is to switch to IBM JRE, delivered with Websphere. That´s work fine

Re: Failed to initialize the ORB

Posted By:   ankush_purwar  
Posted On:   Friday, March 17, 2006 02:55 PM

I think your are using web-sphere server.
It means you must have the tutorial for EJB.
Have a look on the tutorial and see what required information you need to pass in the properties.
About | Sitemap | Contact