Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

JAVA IDL (JDK1.3) interoperability Visibroker 4.5 Java

0 views
Skip to first unread message

Xosé Ramón Sousa Vázquez

unread,
May 25, 2001, 7:09:04 AM5/25/01
to
Hi, I am developing an application in CORBA with several services. I have
created the services with POA facilities and Tie mechanism to perform
heritance in the services. In the server part I have been using Visibroker
4.5
On the other side in the client we use JDK 1.3 Java IDL ORB to access to the
objects in the other machine. First of all in the server I write the IOR
object in a file (We extract in this way:
//Server code
// Activate the servant
myPOA.activate_object_with_id("BankManager".getBytes(),
managerServant);

// Obtaining the reference
org.omg.CORBA.Object ref = myPOA.servant_to_reference(managerServant);

// Now write out the IOR
try {
java.io.PrintWriter pw =
new java.io.PrintWriter( new java.io.FileWriter("ior.dat") );
pw.println(orb.object_to_string(ref));
pw.close();
}
catch ( java.io.IOException e ) {
System.out.println("Error writing the IOR to file ior.dat");
return;
}

and read it later from the client ORB and then:
//Client code
//First take from a file and then....

// Destringify and narrow the object
Bank.AccountManager manager =
Bank.AccountManagerHelper.narrow(orb.string_to_object(ior_str));

When JDK ORB executes this part it sends me a message:
ERROR : org.omg.CORBA.INV_OBJREF: minor code: 1398079490 completed: No
org.omg.CORBA.INV_OBJREF: minor code: 1398079490 completed: No
at com.sun.corba.se.internal.core.CodeSetComponentInfo.read(Unknown
Sour
ce)
at com.sun.corba.se.internal.core.Profile.<init>(Unknown Source)
at com.sun.corba.se.internal.core.IOR.getProfile(Unknown Source)
at com.sun.corba.se.internal.iiop.CDRInputStream.read_Object(Unknown
Sou
rce)
at com.sun.corba.se.internal.iiop.CDRInputStream.read_Object(Unknown
Sou
rce)
at com.sun.corba.se.internal.corba.ORB.string_to_object(Unknown
Source)

But when I use the Visibroker ORB all runs OK.

How can I achieve the interoperability between this two ORBs.
It could be a problem defining the IDL or perhaps the facilities provided
from Visibroker makes imposible the interoprability?
Thaks in advance.

--
Posted from mailhost.teleline.es [195.235.113.141] (may be forged)
via Mailgate.ORG Server - http://www.Mailgate.ORG

Stephen Crawley

unread,
May 26, 2001, 9:00:17 AM5/26/01
to
xrs...@alineatel.com (Xosé Ramón Sousa Vázquez) writes:

You didn't show us how you read the IOR from the file on the
client side. It is possible that you have accidentally added
a newline to the end of the IOR. This might cause objectToString
method to fail with INVALID_OBJ_REF.

-- Steve

0 new messages