[omniORB] No_resources exception

vaibhav jha vaibhav1jha@rediffmail.com
Thu Jun 20 12:13:03 2002


I tried to run the following client code note that CORBA.ORB_init 
is done twice :

import sys
 from omniORB import CORBA
import Example,CosNaming

orb = CORBA.ORB_init(sys.argv, CORBA.ORB_ID)
sys.argv.extend(("-ORBInitRef", 
"NameService=corbaname::172.20.5.165"))#localhost"))
orb = CORBA.ORB_init(sys.argv, CORBA.ORB_ID)
name_service_obj = orb.resolve_initial_references("NameService")
name_service_root = 
name_service_obj._narrow(CosNaming.NamingContext)

EchoObj_name = [CosNaming.NameComponent("MyServers", "EchoObj")]
try:
     EchoObj_server = name_service_root.resolve(EchoObj_name)
except CosNaming.NamingContext.NotFound, msg:
     print "Could not find EchoObj object"
     sys.exit(1)
if EchoObj_server is None:
 	print "Object reference is not an Example::Echo"
 	sys.exit(1)

message = "Hello !! How are u?"
result =EchoObj_server.echoString(message)

print "I said ",message, "\n The object said " ,result

I got the following exception :

D:\CORBA>client1.py
Traceback (most recent call last):
   File "D:\CORBA\client1.py", line 8, in ?
     name_service_obj = 
orb.resolve_initial_references("NameService")
   File "d:\omni\lib\python\CORBA.py", line 486, in 
resolve_initial_references
     sys.modules["CORBA"] = omniORB.CORBA
omniORB.CORBA.NO_RESOURCES: Minor: 0, Completed: COMPLETED_NO.

Can you please explain the cause.
Thanking you in advance.
Yours faithfuly,
Vaibhav Jha

_________________________________________________________
There is always a better job for you at Monsterindia.com.
Go now http://monsterindia.com/rediffin/