1 Reply Latest reply on Jul 15, 2003 5:02 PM by Raja

    NameNotFoundException: comp not bound

    tom.purvis Newbie

      I've written a new EJB for managing user information for the login process for my app. I'm dead in the water trying to use it from a tiny test client class.

      Context initContext = new InitialContext();
      UserHomeRemote home = (UserHomeRemote)

      In order to try to break down my problem further, I broke up the lookup into two:

      Context envContext = (Context)initContext.lookup("java:comp/env");
      UserHomeRemote home = (UserHomeRemote) envContext.lookup("ejb/UserHomeRemote");

      Which blows up with the same message on the first lookup. I feel that I must be doing something basically wrong in my client since it's having trouble even finding the environment at all.

      Could anybody sell me a clue about what my problem could be? TIA,

      Tom Purvis

        • 1. Re: NameNotFoundException: comp not bound
          Raja Master

          java:comp/env namespace is available only from within the same VM As Jboss.
          Since you are running a standalone client, you have to give the physical JNDI name (java:/Yourbean) rather than java:comp/env which is a logical name.
          Also set the jndi.properties file for the providerurl, initial context factory and url packages.