[omniORB] problem with registering a servant at te Name Service

I Q wing_4711@yahoo.de
Fri Aug 9 12:32:01 2002


Hello everybody,

I have a problem getting the servant registered at the
Name Service.

This problems already arises in the example
eg3_tieimpl:

I have set omniORB.cfg as described and have set the
environment variable OMNIORB_CONFIG accordingly, but
the example didn't run.

I have added some output in order to figure out where
the programme crashes:


>>>>>>>>>>
static CORBA::Boolean
bindObjectToName(CORBA::ORB_ptr orb, CORBA::Object_ptr
objref)
{
  CosNaming::NamingContext_var rootContext;

  try {
    // Obtain a reference to the root context of the
Name service:
    CORBA::Object_var obj;
    obj =
orb->resolve_initial_references("NameService");
    cout <<"before narrow" << endl;
    // Narrow the reference returned.
    rootContext =
CosNaming::NamingContext::_narrow(obj);
    cout <<"after narrow" << endl;
    if( CORBA::is_nil(rootContext) ) {
      cerr << "Failed to narrow the root naming
context." << endl;
      return 0;
    }
  }
  catch(CORBA::ORB::InvalidName& ex) {
    // This should not happen!
    cerr << "Service required is invalid [does not
exist]." << endl;
    return 0;
  }

<<<<<<<<<<<<<<

This is the programme's output:

>>>>>>>>>>>>>>
[echo] $eg3_tieimpl
before narrow
omniORB: ERROR -- A servant has been deleted that is
still activated.
      id: root<0>
Caught CORBA::SystemException.
[echo] $
<<<<<<<<<<<<<<


i.e. the crash arises at the attempt of narrowing the
reference at line:
rootContext = CosNaming::NamingContext::_narrow(obj);



Wing

__________________________________________________________________

Gesendet von Yahoo! Mail - http://mail.yahoo.de
Möchten Sie mit einem Gruß antworten? http://grusskarten.yahoo.de