[omniORB-dev] Omnievents 2.1.2 EventChannelFactory problem.

mirko.cambi at bancaimi.it mirko.cambi at bancaimi.it
Fri Jul 18 13:36:36 BST 2003


I'm tryng to use the omniEvents version 2.1.2 with omniOrb 4.0.1, I builded
both on win2000.

The name service run correctly, but when I try to use the event service, I
got this error: "Cannot find event channel factory !
["EventChannelFactory", "EventChannelFactory"]".

Infact when I debug the program I got the exception when I try to narrow
the factory. Below is the "standard" code that I copied from the examples
in the omniEvents package.

[...]
   // Obtain reference to the Event Channel Factory implementation.
   EventChannelAdmin::EventChannelFactory_ptr factory;
   CosNaming::Name name;
   name.length (1);
   name[0].id = CORBA::string_dup (factoryName.c_str());
   name[0].kind = CORBA::string_dup (factoryKind.c_str());

   try {
     CORBA::Object_var obj = rootContext->resolve(name);
     factory = EventChannelAdmin::EventChannelFactory::_narrow(obj);
     if (CORBA::is_nil(factory))
     {
        throw pdg::Error(2, "Failed to narrow Event Channel Factory
reference.");
     }
   }
   catch (CORBA::COMM_FAILURE& ex) {
      throw pdg::Error(3, "Caught system exception COMM_FAILURE, unable to
contact the naming service.");
   }
   catch (omniORB::fatalException& ex) {
      throw pdg::Error(4, "Caught Fatal Exception");
   }
   catch (...) {
      throw pdg::Error(5, "Cannot find event channel factory ! [\"" +
factoryName + "\", \"" + factoryKind + "\"]");
   }
[...]

does anyone have some suggests?


Thank you,

Mirko Cambi
Product & Business Development  -
Banca IMI - Milan





More information about the omniORB-dev mailing list