[omniORB] Java, Python, CORBA

Jakub Moskal jmoskal at ece.neu.edu
Wed Feb 11 11:35:53 GMT 2009


Duncan,

I went after your advice and changed my python client code to:

javaParams =  ["ORBInitialHost", "localhost", "ORBInitialPort", "900",
"ORBInitRef"]
orb = CORBA.ORB_init(javaParams, CORBA.ORB_ID)
obj = orb.resolve_initial_references("NameService")

However, that throws: omniORB.NO_RESOURCES_InitialRefNotFound. I
checked open ports and as the documentation for orbd says, 900 and
1049 are being listened by orbd. So I added the info about hte
InitRef:

javaParams =  ["ORBInitialHost", "localhost", "ORBInitialPort", "900",
"ORBInitRef", "NameService=corbaname::localhost:1049"]

and it still gives me the same error.

I also tried 'orbd -ORBInitialPort 2809" - with the same results, Java
client connects, python throws InitialRefNotFound.

Thanks for help!
Jakub


On Wed, Feb 11, 2009 at 10:18 AM, Duncan Grisby <duncan at grisby.org> wrote:
> On Wednesday 11 February, Jakub Moskal wrote:
>
>> I wrote a server in Java and clients in Java and Python. Clients
>> connect and invoke methods without any problem when the object
>> reference is retrieved from a string. When I use 'orbd' and
>> NameService only the Java client connects, the python clients fails
>> with "omniORB.TRANSIENT_ConnectFailed". I init the ORB in python with
>> parameters "  ["-ORBInitRef", "NameService=corbaname::localhost:900"]
>> ". What is the port on which 'orbd' runs its NameService? I tried some
>> other ports but all gave me the same error.
>
> Java's orbd doesn't support the interoperable naming service, so you
> can't use a corbaname URI to resolve it. The Java ORB uses a proprietary
> bootstrap mechanism invented by Sun. Luckily for you, omniORB supports
> it too. It should work if you use these arguments instead of the
> -ORBInitRef:
>
>  -ORBInitialHost localhost -ORBInitialPort 900
>
>
>> My second question has to do with creating new objects. I wrote an
>> object factory on client that returns new objects which implement my
>> interfaces, e.g.
>
> Everything you've done looks fine, so I don't know why you'd be getting
> such a strange problem. It's definitely nothing to do with the omniORB
> end, though.
>
> Cheers,
>
> Duncan.
>
> --
>  -- Duncan Grisby         --
>  -- duncan at grisby.org     --
>   -- http://www.grisby.org --
>



More information about the omniORB-list mailing list