0 Replies Latest reply on Mar 6, 2003 10:29 AM by Alexandr Ishutin

    JBoss & CORBA NamingService lookup

    Alexandr Ishutin Newbie

      Hi.
      Excuse my horrible english :)

      We use server jboss-3.2.0RC2_tomcat.4.1.18.
      My problem: I cann't list root context of NamingService.

      I get IOR from jboss log and try to list NamingService root context:

      String namingIOR = "IOR:000000000000002B49444C3A6F6D672E6F72672F436F734E616D696E672F4E616D696E67436F6E746578744578743A312E30000000000002000000000000006C000102000000000F3231322E34382E3135302E32333500000DC80000000000114A426F73732F4E616D696E672F726F6F74000000000000020000000000000008000000004A414300000000010000001C00000000000100010000000105010001000101090000000105010001000000010000002C0000000000000001000000010000001C00000000000100010000000105010001000101090000000105010001";

      Properties p = System.getProperties();
      p.setProperty(Context.INITIAL_CONTEXT_FACTORY,
      "com.sun.jndi.cosnaming.CNCtxFactory");
      p.setProperty(Context.PROVIDER_URL, namingIOR);
      p.put("org.omg.CORBA.ORBClass",
      "org.jacorb.orb.ORB");
      p.put("org.omg.CORBA.ORBSingletonClass",
      "org.jacorb.orb.ORBSingleton");

      Context ic = new InitialContext();
      NamingEnumeration nen = ic.list("/");
      while (nen.hasMore()) {
      System.out.println(nen.next());
      }
      .....

      Nothing happines. No exceptions, and no content.

      But server conslol shows exception:
      18:24:49,160 ERROR [STDERR] java.lang.NullPointerException
      18:24:49,160 ERROR [STDERR] at org.jacorb.naming.NamingContextImpl.list(NamingContextImpl.java:459)
      18:24:49,160 ERROR [STDERR] at org.omg.CosNaming.NamingContextExtPOA._invoke(NamingContextExtPOA.java:451)
      18:24:49,160 ERROR [STDERR] at org.jacorb.poa.RequestProcessor.invokeOperation(RequestProcessor.java:247)
      18:24:49,160 ERROR [STDERR] at org.jacorb.poa.RequestProcessor.process(RequestProcessor.java:477)
      18:24:49,160 ERROR [STDERR] at org.jacorb.poa.RequestProcessor.run(RequestProcessor.java:604)

      Using debugger I'v found: variable rootPOA in org.jacorb.naming.NamingContextImpl is null

      Oops!