[omniORB] Using onmiNames with a Java client.

Duncan Grisby dgrisby@uk.research.att.com
Tue, 04 May 1999 14:19:37 +0100


On Tuesday 4 May, Mark Howells wrote:

> What I'm trying to do is use the javaORB client side with omninames.
> javaOrb uses a config file to resolve initial refs where the entry for the
> NameService is as follows.
> 
> NamingService   Host(mark),
> ObjectId(IDL:omg.org/CosNaming/NamingContext:1.0), Key(NamingRoot),
> Port(12345)

I assume from this that you've started omniNames on a machine called
"mark", on port 12345. Are you sure that the ObjectId field is meant
to contain the RepoID of the object?  Maybe it's meant to contain the
object's object key, which you can see using catior.

Unless javaORB knows about the bootstrapping mechanism described in
section 4.6 of the omniORB manual, you haven't given it enough
information to find the object. Sun's JavaIDL does use this mechanism.

> The error I get back from omniNames is 'org.omg.CORBA.OBJECT_NOT_EXIST' when
> I attempt to narrow the NamingContext.

This would be consistent with javaORB trying to use the ObjectId field
as an object key.

> My understanding of the IOR printed by omniNames when it starts up is that
> it can change  from invocation to invocation making installation a pain so I
> can't do this.  

If you re-start omniNames given an existing log file, it will use
exactly the same IOR. Any differences you see in the printed output
are just uninitialised padding bytes, and make no difference.

Cheers,

Duncan.

-- 
 -- Duncan Grisby  \  Research Engineer  --
  -- AT&T Laboratories Cambridge          --
   -- http://www.uk.research.att.com/~dpg1 --