3 Replies Latest reply on Dec 18, 2001 9:59 AM by Paul Cassidy

    jndi browser problem

    Paul Cassidy Newbie

      Hi,
      I am trying to create a jndi Browser for JBOSS (as layed out in the book "mastering ejb" by Ed Roman).
      I am getting an java.lang.NullPointerException whenever i try to perform any of the operations. I am getting the initial context ok but i think there is a problem with the way i am getting a starting point in the registry (line 3 below)

      1.parser = ctx.getNameParser("localhost:1099");
      2.parser = ctx.getNameParser("");
      3.currName = parser.parse("");

      the 'currName' variable is passed to the different operations like mkdir (below)

      private void mkdir(String str) throws Exception {
      try{
      System.out.println("Starting mkdir");
      Context currCtx = (Context) ctx.lookup((Name)currName);
      currCtx.createSubcontext(str);
      }

      Has anybody any ideas as to why this isn't working?
      Thanks,
      P.