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

    jndi browser problem

    cassidpp

      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.

        • 1. jndi Browser is a good utility
          ipozeng

          I need such a tool now but i cannot help you resolve your problem :(
          If you finish it please let me know :)


          Thanks in advance!

          • 2. Re: jndi Browser is a good utility
            pazu

            You can view the JBoss JNDI tree from the JMX management console. Once JBoss is started, point your browser to http://localhost:8082 and select the JNDIBrowser JMX, then click the "list" button. Tada, threre is your JNDI View.

            BTW, if your JBoss is not running on the local machine, substitute 'localhost' for the machine where JBoss is running on the above URL.

            • 3. Re: jndi browser problem
              cassidpp

              Thanks for that. However, i still need to be able to use a windows prompt jndi browser as i am working with batch files...so any other ideas on getting a starting point in the registry :-(