[omniORB] omniOrb to Jacorb, using omniMapper

davide.guastella90 at gmail.com davide.guastella90 at gmail.com
Sun Jan 29 20:56:37 GMT 2017


Hello,

I'm trying to use an omniorb/c++ servant from a java/jacorb
application, with no success. I create the servant from the C++ side in
this way:

instance = new dessine_module_Communication_i();

PortableServer::ObjectId_var iid = poa-
>activate_object(instance.data());

CORBA::Object_var ref = instance->_this();
CORBA::String_var sior(orb->object_to_string(ref));
std::cout << "IDL object bytes_transmission::Dessine IOR = '" <<
(char*)sior << "'" << std::endl;
this->ior = QString(sior);

PortableServer::POAManager_var pman = poa->the_POAManager();
pman->activate();

and then i take the IOR and save in a configuration file to be used
with omniMapper:

DESSINE IOR:0001.....

And then run omniMapper on a specific port (1234).
>From the java side, I try to send a request to the C++ application in
this way:

ORB orb = ORB.init(new String[] {}, null);
Properties props = new Properties();
props.put("org.omg.CORBA.ORBInitialPort", clientPort);
props.put("org.omg.CORBA.ORBInitialHost", clientIpAddress);
org.omg.CORBA.Object obj =
orb.string_to_object("corbaloc::"+clientIpAddress+":"+clientPort+"/DESS
INE");
Communication c = CommunicationHelper.narrow(obj);

Running the applications, i got this message from the java side:

ERROR : org.omg.CORBA.OBJECT_NOT_EXIST:   vmcid: OMG  minor code:
1  completed: No
org.omg.CORBA.OBJECT_NOT_EXIST:   vmcid: OMG  minor code: 1  completed:
No

which is obviously clear, but I don't really understand how to fix it.

Any idea??

Thanks,
david



More information about the omniORB-list mailing list