2 Replies Latest reply on Jun 26, 2003 12:27 PM by zischler

    javax.naming.NameNotFoundException: myBean not found in Jbos

    zischler

      I was using still now a Jboss 3.2.1, deployed the EAR files under the <jboss_home>server\default\deploy directory and the EJB client could access the deployed Bean.
      Today I installed a Jboss 4.0 and anfter deployment of the EAR file, I tryed to run the same EJB client and get a javax.naming.NameNotFoundException: myBean not found in Jboss 4.0.

      Are there other connection parameters for the new version or should I deploy the package in another path?

        • 1. Source code to connect the bean
          zischler

          Hashtable env = new Hashtable();

          env.put(Context.INITIAL_CONTEXT_FACTORY, "org.jnp.interfaces.NamingContextFactory");
          env.put(Context.PROVIDER_URL, "jnp://localhost:1099");
          env.put(Context.URL_PKG_PREFIXES, "org.jboss.naming:org.jnp.interfaces");

          Context context = new InitialContext(env);

          JbossModuleHome jBossHome = (JbossModuleHome)PortableRemoteObject.narrow(context.lookup("JbossModuleBMBean"), JbossModuleHome.class);

          • 2. JNDI tree
            zischler

            How can I check the existing JNDI tree?