[omniORB] omniorb C++ client connecting to a Java server

JHJE (Jan Holst Jensen) jhje at novonordisk.com
Tue Jan 27 13:40:17 GMT 2004


> Date: Tue, 27 Jan 2004 03:35:41 -0800
> From: "Nikos Karamessinis" <nightfall_gr at yahoo.com>
> Subject: [omniORB] omniorb C++ client connecting to a Java server
[...]
> orbd and the Java server) it fails at the following line of 
> code: obj = orb->resolve_initial_references("NameService");
> 
> throwing an Exception. I run the orbd, server and client as follows:
> 
> start orbd -ORBInitialPort 1088 -ORBInitialHost 127.0.0.1
> 
> java HelloServer -ORBInitialPort 1088 & 
> 
> client 127.0.0.1 1088  
> 
> Am I running the client with wrong parameters? Am I 
> forgetting something? I will really appreciate any help since 
> I have very little experience in CORBA programming

Sounds like you have not set up your initial references - guess you do
not have an omniorb config file. If you want to set the initial
nameservice ref on the command line, run the client as

  client -ORBInitRef NameService=corbaname::localhost:1088

since I assume that your orbd is running at localhost on port 1088.

Alternatively you can set the initial refs in the config file like this

  [omni at jhje-linux omniORB-4.0.1]$ echo $OMNIORB_CONFIG
  /home/omni/omniORB-4.0.1/corba.cfg
  [omni at jhje-linux omniORB-4.0.1]$ cat corba.cfg
  InitRef = NameService=corbaname::nameserver.domain.com:1088
  [omni at jhje-linux omniORB-4.0.1]$

and just run the client without command line parameters.

Hope this helps

-- Jan Holst Jensen, Novo Nordisk A/S, Denmark



More information about the omniORB-list mailing list