Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-4469524

NamingContext can't resolve objects from TAO nameservice anymore

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Cannot Reproduce
    • Icon: P4 P4
    • None
    • 1.4.0
    • other-libs
    • x86
    • windows_nt



      Name: bsC130419 Date: 06/13/2001


      java version "1.4.0-beta"
      Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.0-beta-b65)
      Java HotSpot(TM) Client VM (build 1.4.0-beta-b65, mixed mode)

      I have a problem with resolving objects in java-1.4-beta from a TAO nameservice. The TAO-nameservice can be connected correctly, but I can't resolve any objects from it. I use the same code as I used with jdk-1.2.2, and there it worked fine. I also assured myself of the right hierarchy of the NameComponents on the TAO server side.
      The problem can be reproduced running the code once with jdk-1.2.2 and classes generated by good old idltojava, there it works fine. Then delete all generated classes, recreate them with the newer idlj from the jdk-1.4-beta package and recompile it with jdk-1.4. Afterwards it will produce a NotFound-Exception.

      Here is the relevant part of the code (client side):

      else if (NAMESERVICE_IOR_FILEPATH != null) {
      // For use with TAO Orb, C++ Server, nameservice over ior-File, naming-context by nameservice
      String filename = NAMESERVICE_IOR_FILEPATH + NAMESERVICE_IOR_FILE;
      FileInputStream fis = new FileInputStream(filename);
      BufferedReader reader = new BufferedReader (new InputStreamReader(fis));
      String ior = reader.readLine();
      org.omg.CORBA.Object obj = orb.string_to_object(ior);
      NamingContext ncRef = NamingContextHelper.narrow(obj);

      // get the reference of the remote object
      NameComponent nc1 = new NameComponent("RTServer", "");
      NameComponent nc2 = new NameComponent ("RollerTable", "");
      NameComponent path[] = {nc1, nc2};
      Object resolvedContext = ncRef.resolve(path); // here the exception is thrown
      rollerTableRemoteObject = RollerTableIDLHelper.narrow(ncRef.resolve(path));
      } // if nameservice by ior

      The TAO nameservice is referenced by an unique IOR, stored in a file. This works fine (don't mix this up with earlier bugs from jdk-1.3x!). It can narrow the NamingContext. The NameComponents are also correct, as the C++ server registers its services under the name "RollerTable", the executable's name is "RTServer" which leads TAO to create the domain "RTServer" and put "RollerTable" beneath.
      As the upper code snipped worked fine with jdk-1.2.2, it can't be so wrong just because I try jdk-1.4? Therefore I guess it's a bug!

      The complete error messagage generated using jdk-1.4 is:
      Client ORB-Object: com.sun.corba.se.internal.Interceptors.PIORB@337d0f

      org.omg.CosNaming.NamingContextPackage.NotFound: IDL:omg.org/CosNaming/NamingContext/NotFound:1.0

      at org.omg.CosNaming.NamingContextPackage.NotFoundHelper.read(NotFoundHelper.java:76)

      at org.omg.CosNaming._NamingContextStub.resolve(_NamingContextStub.java:250)

      at rollertable_corba_example.RollerTableClient.initialize(RollerTableClient.java:80)

      RollerTable server error: org.omg.CosNaming.NamingContextPackage.NotFound: IDL:omg.org/CosNaming/NamingContext/NotFound:1.0



      at rollertable_corba_example.RollerTableClient.<init>(RollerTableClient.java:35)

      at rollertable_corba_example.RollerTableClient.main(RollerTableClient.java:159)
      (Review ID: 126137)
      ======================================================================

            hputtaswsunw Hemanth Puttaswamy (Inactive)
            bstrathesunw Bill Strathearn (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: