[omniORB] Java client connect to OmniORB 4 server, error...
Marcus MacWilliam
marcusma@lsl.co.uk
Mon Sep 9 18:09:00 2002
--------------10EDEEAAF32A7CC79070D056
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Hello again,
I have just built my CORBA server using g++ (v3.1) and OmniORB v4.0.b2.
I have a client built using J2SE (SDK) v1.3.1_04.
The Java code I have always used to connect to my server thus:
private static org.omg.CORBA.Object getCORBAObject(String filename)
{
org.omg.CORBA.Object mycobject = null;
try
{
// Corba initialisation
org.omg.CORBA.ORB orb = null;
orb = org.omg.CORBA.ORB.init((String [])null,null);
// Check the file exists
File inputFile = new File( filename );
if (!inputFile.exists())
return null;
// Read the object string contained in one line of the file
BufferedReader in = new BufferedReader(new
FileReader(inputFile));
String ior = in.readLine();
in.close();
// Create a Corba object
if (ior.length() > 0)
mycobject = orb.string_to_object( ior );
}
catch (Exception e)
{
System.out.println("CORBA initialisation exception: "+e);
e.printStackTrace();
}
return mycobject;
}
Is now throwing up the following error messages:
CORBA initialisation exception: 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(CodeSetComponentInfo.java:90)
at
com.sun.corba.se.internal.core.Profile.<init>(Profile.java:109)
at com.sun.corba.se.internal.core.IOR.getProfile(IOR.java:273)
at
com.sun.corba.se.internal.iiop.CDRInputStream.read_Object(CDRInputStream.java:591)
at
com.sun.corba.se.internal.iiop.CDRInputStream.read_Object(CDRInputStream.java:577)
at
com.sun.corba.se.internal.corba.ORB.string_to_object(ORB.java:1070)
at OoApiTest.getCORBAObject(OoApiTest.java:6853)
at OoApiTest.main(OoApiTest.java:11054)
Does anyone know why this has started happening. This code has worked
with the following before:
Client Server
------ ------
JDK 1.2 and VisiBroker v3.3.3.
JDK 1.2.2 and VisiBroker v3.3.4.
JDK 1.3.1 and OmniORB v3.0.4.
JDK 1.3.1 and OmniORB v3.0.5.
Does OmniORB v4.0.b2 write the IOR in a completely different format? It
is
currently writing out the following:
IOR:000000000000002449444c3a676f746869632f636f7265782f476f7468696344617461626173653a312e3000000000010000000000000070000102000000000d3139322e3136382e36302e3
30000a1ec00000019ff6f6f2d746f6f6c6b6974fe3d7cd1229312000100000000000000000000000200000000000000080000000041545400000000010000001c00000000000100010000000105
010001000101090000000100010109
Any help greatly appreciated.
--
Marcus A.T MacWilliam, MSc, CEng, MBCS, BSc(Hons).
Senior Software Engineer, Laser-Scan Ltd, Cambridge, CB4 0FY.
Tel: +44 (0)1223 420414 x213. Mobile: +44 (0)7803 706597.
TravelM8: 09050 505050 (http://www.travelm8.com)
--------------10EDEEAAF32A7CC79070D056
Content-Type: text/html; charset=us-ascii
Content-Transfer-Encoding: 7bit
<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<html>
Hello again,
<p>I have just built my CORBA server using g++ (v3.1) and OmniORB v4.0.b2.
<p>I have a client built using J2SE (SDK) v1.3.1_04.
<p>The Java code I have always used to connect to my server thus:
<p><tt>private static org.omg.CORBA.Object getCORBAObject(String filename)</tt>
<br><tt>{</tt>
<br><tt> org.omg.CORBA.Object mycobject = null;</tt>
<br><tt> try</tt>
<br><tt> {</tt>
<br><tt> // Corba initialisation</tt>
<br><tt> org.omg.CORBA.ORB orb
= null;</tt>
<br><tt> orb = org.omg.CORBA.ORB.init((String
[])null,null);</tt><tt></tt>
<p><tt> // Check the file exists</tt>
<br><tt> File inputFile = new
File( filename );</tt>
<br><tt> if (!inputFile.exists())</tt>
<br><tt>
return null;</tt><tt></tt>
<p><tt> // Read the object string
contained in one line of the file</tt>
<br><tt> BufferedReader in =
new BufferedReader(new FileReader(inputFile));</tt>
<br><tt> String ior = in.readLine();</tt>
<br><tt> in.close();</tt><tt></tt>
<p><tt> // Create a Corba object</tt>
<br><tt> if (ior.length() > 0)</tt>
<br><tt>
mycobject = orb.string_to_object( ior );</tt>
<br><tt> }</tt>
<br><tt> catch (Exception e)</tt>
<br><tt> {</tt>
<br><tt> System.out.println("CORBA
initialisation exception: "+e);</tt>
<br><tt> e.printStackTrace();</tt>
<br><tt> }</tt>
<br><tt> return mycobject;</tt>
<br><tt>}</tt>
<p>Is now throwing up the following error messages:
<p><tt>CORBA initialisation exception: org.omg.CORBA.INV_OBJREF:
minor code: 1398079490 completed: No</tt>
<br><tt>org.omg.CORBA.INV_OBJREF: minor code: 1398079490
completed: No</tt>
<br><tt> at com.sun.corba.se.internal.core.CodeSetComponentInfo.read(CodeSetComponentInfo.java:90)</tt>
<br><tt> at com.sun.corba.se.internal.core.Profile.<init>(Profile.java:109)</tt>
<br><tt> at com.sun.corba.se.internal.core.IOR.getProfile(IOR.java:273)</tt>
<br><tt> at com.sun.corba.se.internal.iiop.CDRInputStream.read_Object(CDRInputStream.java:591)</tt>
<br><tt> at com.sun.corba.se.internal.iiop.CDRInputStream.read_Object(CDRInputStream.java:577)</tt>
<br><tt> at com.sun.corba.se.internal.corba.ORB.string_to_object(ORB.java:1070)</tt>
<br><tt> at OoApiTest.getCORBAObject(OoApiTest.java:6853)</tt>
<br><tt> at OoApiTest.main(OoApiTest.java:11054)</tt>
<p>Does anyone know why this has started happening. This code has worked
<br>with the following before:
<p>Client
Server
<br>------
------
<br>JDK 1.2 and VisiBroker v3.3.3.
<br>JDK 1.2.2 and VisiBroker v3.3.4.
<br>JDK 1.3.1 and OmniORB v3.0.4.
<br>JDK 1.3.1 and OmniORB v3.0.5.
<p>Does OmniORB v4.0.b2 write the IOR in a completely different format?
It is
<br>currently writing out the following:
<p>IOR:000000000000002449444c3a676f746869632f636f7265782f476f7468696344617461626173653a312e3000000000010000000000000070000102000000000d3139322e3136382e36302e3
<br>30000a1ec00000019ff6f6f2d746f6f6c6b6974fe3d7cd1229312000100000000000000000000000200000000000000080000000041545400000000010000001c00000000000100010000000105
<br>010001000101090000000100010109
<p>Any help greatly appreciated.
<br>--
<br> Marcus A.T MacWilliam, MSc, CEng, MBCS, BSc(Hons).
<br> Senior Software Engineer, Laser-Scan Ltd, Cambridge, CB4 0FY.
<br> Tel: +44 (0)1223 420414 x213. Mobile: +44 (0)7803 706597.
<br> TravelM8: 09050 505050 (<A HREF="http://www.travelm8.com">http://www.travelm8.com</A>)
<br> </html>
--------------10EDEEAAF32A7CC79070D056--