Google 网上论坛不再支持新的 Usenet 帖子或订阅项。历史内容仍可供查看。

JAVA IDL (JDK1.3) interoperability Visibroker 4.5 Java

已查看 0 次
跳至第一个未读帖子

Xosé Ramón Sousa Vázquez

未读,
2001年5月25日 07:09:042001/5/25
收件人
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

未读,
2001年5月26日 09:00:172001/5/26
收件人
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 个新帖子