Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Naming Service: InvalidName Exception

Naming Service: InvalidName Exception

Naming Service: InvalidName Exception

Naming Service:
I am using visibroker for java and i am working with the naming service right now. I have implemented a simple time-date example. After compiling the code, I started osagent and then the Naming Service with the command 'nameserv'.
In the server code I have used the method:
           orb.resolve_initial_references("NameService") to get the intial naming context.
But a run time exception is raised which is shown below :
at   com.inprise.vbroker.orb.ORB.resolve_initial_references(ORB.java:712)
at GoodDayServer.main(GoodDayServer.java:39)

Can anyone tell me why this is happening. I feel that I have done this as it is said in the Naming Service documentation of Visibroker.
Any help will be of great help.
Thank you

RE: Naming Service: InvalidName Exception

I have had the same problem I think. The only way I found to get round this to do the following

final Properties props = new Properties();
orb = ORB.init(args, properties);
obj = orb.resolve_initial_references("NameService");
When you start the Name Service it creates a file ns.ior in your profile directory which contains the IOR. You can open this file and read it at run-time or hard code the value. Every other approach I've tried gives the InvalidName exception you describe.

You could probably use vbj -DORBInitRef=Nameservice=IOR:000.... etc but I haven't tried this.

hope this helps!

RE: Naming Service: InvalidName Exception

Has anyone else run into this, and is the recommended solution the only way around it?  It would be very unfortunate if this was the case...

RE: Naming Service: InvalidName Exception

We do use naming services and do not have this issue, please send your complete source code and I will try to help.


RE: Naming Service: InvalidName Exception

Hya all,

Amol, hope you solved your naming service problem. Indeed, I'm experiencing the same problem under visibroker for C++.
Then, I won't mind any help on it ;).. thanks

By the way if anyone else has the solution to that kind of exception, i'll be happy to hear from you too.
I'm pretty sure it's either a problem when initialazing the ORB or launching the Naming Service (lack of parameters with nameserv.exe)

Many thanks

RE: Naming Service: InvalidName Exception

You must define the ORBInitRef, but it is not the simplest way. You can define it so:

Properties props = new Properties();
props.setProperty("ORBInitRef","NameService=corbaname::<hostName>:<Naming Service Port>/");
orb = ORB.init(args, props);
obj = orb.resolve_initial_references("NameService");

<serverName> is the host where runs the server and the port is the port of the naming service.

You can also define ORBInitRef as a client parameter:

clientApplication -ORBInitRef NameService=corbaname::<hostName>:<Naming Service Port>/

RE: Naming Service: InvalidName Exception


I just got the same error and I have solved it in the following way.

vbj -DSVCnameroot=NameService <client name>

where client name is the name of the client you are launching. NameService is the default name for the visibroker name service. If you have more than one running you can use the option above to specify the particular one you want to bootstrap into


Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close