×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

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

NamingService Unknown Error

NamingService Unknown Error

NamingService Unknown Error

(OP)
Hello,

I am new to Corba Orbix C++. I am working on a small project to get
accquaintance with Corba Client Server 3.3 on Sun systems. When I try
binding name and object, I get into trouble with bind_new_context on the
server.cxx.

....
#include <Namingservice.hh>
int main(argc, argv)
{
     CORBA::Object_var  orb = CORBA::ORB::_init(argc,argv,"Orbix");
     CORBA::Object_var  boa = CORBA::BOA::_init(argc,argv,"Orbix_BOA");

    CORBA::Object_var  name_service=

CORBA::ORB::resolve_inital_reference("NameService");
    CosNaming::NamingContext_var  root_context  =

CosNaming::NamingContext::_narrow(name_service);

    CosNaming::Name_var   name= new CosNaming::Name(1);
    name->length( 1 );
    name[0].id   = CORBA::string_dup("Hello");
    name[0].kind = CORBA::string_dup("");

    try
   {
          CosNaming::NamingContext_var   next_context =
                                root_context->bind_new_context(name);
    }catch(CosNaming::NamingContext::AlreadyBound &ex) {
            cerr << "AlreadyBound...." << endl;
            ......code to rebind...
    }

}

When I run the server*, bind_new_context fail but error is not trapped in
the 'AlreadyBound'. So I change the code to catch with SystemException:

    catch(CORBA::SystemException &ex) {
            cerr << "Error : " << ex << endl;
            ......code to rebind...
    }

 then the error comes out like this:

 Error: 12000 -- Unknown Error Code : 12003

Anyone knows what the problem is, please let me know.
Thanks,
Don N

Please write to me at : dononeness@netscape.net
Replies continue below

Recommended for you

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