[omniORB] [omniORBpy] omniORB.CORBA.TRANSIENT: CORBA.TRANSIENT(omniORB.TRANSIENT_ConnectFailed, CORBA.COMPLETED_NO)

loretta loretta at vol.at
Tue Nov 11 07:51:39 GMT 2008


Dear omniORB Users,


when I run code similar to that in the tutorial (chapter 2.6.3 "Server code") 
shown below, I get this error:

Traceback (most recent call last):
  File "sensors_server.py", line 38, in <module>
    root_context = obj._narrow( CosNaming.NamingContext)
  File "/usr/lib/python2.5/site-packages/omniORB/CORBA.py", line 787, in 
_narrow
    return _omnipy.narrow(self, repoId, 1)
omniORB.CORBA.TRANSIENT: CORBA.TRANSIENT(omniORB.TRANSIENT_ConnectFailed, 
CORBA.COMPLETED_NO)

The code is 


from omniORB import CORBA, PortableServer
import CosNaming, Sensors, Sensors__POA


class Sensor4DistancesImplementation(Sensors__POA.Sensor4Distances):

    def current_value( self):
        return time.time()


orb = CORBA.ORB_init( ["-ORBInitRef", "NameService=corbaname::localhost"], 
CORBA.ORB_ID)
poa = orb.resolve_initial_references( "RootPOA")

sensor_imp = Sensor4DistancesImplementation()
sensor_ref = sensor_imp._this()

obj = orb.resolve_initial_references( "NameService")
root_context = obj._narrow( CosNaming.NamingContext)
if root_context is None:
    print "Failed to narrow the root naming context!"
    sys.exit( 1)


The exception occurs in #_narrow:

    def _narrow(self, dest):
        repoId = dest._NP_RepositoryId
        try:
            dest_objref = omniORB.objrefMapping[repoId]
            if isinstance(self, dest_objref):
                return self
        except KeyError:
            pass
        return _omnipy.narrow(self, repoId, 1) # <= Exception is raised here


There seems a part of a program not running, which my program wants to connect 
to. Any pointers? 

As I am new to this CORBA stuff, please let me know what additional info I 
could provide to nail the problem down.

I am on Linux (Ubuntu 8.04), Python is of version 2.5.2:

Python 2.5.2 (r252:60911, May  7 2008, 15:19:09) 
[GCC 4.2.3 (Ubuntu 4.2.3-2ubuntu7)]
Type "help", "copyright", "credits" or "license" for more information.
>>> 


Kind regards
loretta



More information about the omniORB-list mailing list