3 Replies Latest reply on Jul 12, 2002 6:36 AM by Adrian Brock


    Tung Dang Novice


      I wrote the following test client for my bean with the local home and the local object interface:

      Properties p = new Properties();

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

      InitialContext jndiContext = new InitialContext(p);

      Object ref = jndiContext.lookup("TestBean");
      TestLocalHome home = (TestLocalHome) ref;

      While runing the client I got the java.lang.ClassCastException: javax.naming.Reference

      Has any one an idea to cope with the problem?

      Thanks in advance.