Omnievents 2.1.2 EventChannelFactory problem.

[email protected] Fri, 18 Jul 2003 12:36:36 +0200
Newsgroups gmane.comp.corba.omniorb.devel
Message-ID <OF9C535BDF.4AE4C26A-ONC1256D67.00395B95-C1256D67.003A419C@bancaimi.it>
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