[omniORB] java and omniNames

Heinrich Götzger goetzger@gmx.net
Sun Nov 17 20:46:01 2002


On Fri, 15 Nov 2002, Warren Brown wrote:

>It seems that jdk1.3 has a bug in it.
>>From the bug list
>"After digging deeper in the problem (thanks to the "genior" utility provided
>with omniORB 3.0, I could generate many different kinds of IORs), I discovered
>that the problem comes from the length of the Object Key ("NameService"),
>whenever the IOR contains an object key which size is not multiple of 4, I get
>that exception."
>
>It seems that the solution to my problem is either to use jdk1.2.2 or jdk1.4.

hmm, I'm using Java Visibroker 4.5.1 with JDK 1.3.1_06 under Linux being
served by a C++ Server with omniOrb 4.x using omniNames.

excerpt from my Java client:
[...]
    System.setProperty("ORBInitRef"
,"NameService=corbaname::SERVERHOST:2809");
    System.setProperty("org.omg.CORBA.ORBClass",
"com.inprise.vbroker.orb.ORB");
    System.setProperty("org.omg.CORBA.ORBSingletonClass",
"com.inprise.vbroker.orb.ORBSingleton");

    NamingContextExt nc;

    try {
      // Initialize the ORB.
      orb = ORB.init( (String[])null, System.getProperties() );

      // Obtain the root context.
      nc = NamingContextExtHelper.narrow(
        orb.resolve_initial_references("NameService"));
    } catch (Exception e) {
        e.printStackTrace();
    }
[...]

in ominORB.cfg:
InitRef = NameService=corbaname::SERVERHOST


regards

Heinrich