[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>&nbsp;&nbsp;&nbsp; org.omg.CORBA.Object mycobject = null;</tt>
<br><tt>&nbsp;&nbsp;&nbsp; try</tt>
<br><tt>&nbsp;&nbsp;&nbsp; {</tt>
<br><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; // Corba initialisation</tt>
<br><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; org.omg.CORBA.ORB orb
= null;</tt>
<br><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; orb = org.omg.CORBA.ORB.init((String
[])null,null);</tt><tt></tt>
<p><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; // Check the file exists</tt>
<br><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; File inputFile = new
File( filename );</tt>
<br><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if (!inputFile.exists())</tt>
<br><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
return null;</tt><tt></tt>
<p><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; // Read the object string
contained in one line of the file</tt>
<br><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; BufferedReader in =
new BufferedReader(new FileReader(inputFile));</tt>
<br><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; String ior = in.readLine();</tt>
<br><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; in.close();</tt><tt></tt>
<p><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; // Create a Corba object</tt>
<br><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if (ior.length() > 0)</tt>
<br><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
mycobject = orb.string_to_object( ior );</tt>
<br><tt>&nbsp;&nbsp;&nbsp; }</tt>
<br><tt>&nbsp;&nbsp;&nbsp; catch (Exception e)</tt>
<br><tt>&nbsp;&nbsp;&nbsp; {</tt>
<br><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; System.out.println("CORBA
initialisation exception: "+e);</tt>
<br><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; e.printStackTrace();</tt>
<br><tt>&nbsp;&nbsp;&nbsp; }</tt>
<br><tt>&nbsp;&nbsp;&nbsp; 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:&nbsp;&nbsp;
minor code: 1398079490&nbsp; completed: No</tt>
<br><tt>org.omg.CORBA.INV_OBJREF:&nbsp;&nbsp; minor code: 1398079490&nbsp;
completed: No</tt>
<br><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at com.sun.corba.se.internal.core.CodeSetComponentInfo.read(CodeSetComponentInfo.java:90)</tt>
<br><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at com.sun.corba.se.internal.core.Profile.&lt;init>(Profile.java:109)</tt>
<br><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at com.sun.corba.se.internal.core.IOR.getProfile(IOR.java:273)</tt>
<br><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at com.sun.corba.se.internal.iiop.CDRInputStream.read_Object(CDRInputStream.java:591)</tt>
<br><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at com.sun.corba.se.internal.iiop.CDRInputStream.read_Object(CDRInputStream.java:577)</tt>
<br><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at com.sun.corba.se.internal.corba.ORB.string_to_object(ORB.java:1070)</tt>
<br><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at OoApiTest.getCORBAObject(OoApiTest.java:6853)</tt>
<br><tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 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&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
Server
<br>------&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
------
<br>JDK 1.2&nbsp;&nbsp;&nbsp; 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>&nbsp;Marcus A.T MacWilliam, MSc, CEng, MBCS, BSc(Hons).
<br>&nbsp;Senior Software Engineer, Laser-Scan Ltd, Cambridge, CB4 0FY.
<br>&nbsp;Tel: +44 (0)1223 420414 x213. Mobile: +44 (0)7803 706597.
<br>&nbsp;TravelM8: 09050 505050 (<A HREF="http://www.travelm8.com">http://www.travelm8.com</A>)
<br>&nbsp;</html>

--------------10EDEEAAF32A7CC79070D056--