pls change your code protected void output() throws NamingException { Context ctx = new InitialContext(); String parent = "java:/"; NamingEnumeration children = ctx.list(parent);
System.out.println("CHILDREN of " + parent); while (children.hasMore()) { NameClassPair pair = (NameClassPair)children.nextElement(); System.out.println("NAME: " + pair.getName() + " TYPE: " + pair.getClassName()); } change as this test ,good luck protected void output() throws NamingException { Properties prop = new Properties(); prop.put(Context.INITIAL_CONTEXT_FACTORY, "org.jnp.interfaces.NamingContextFactory"); prop.put(Context.PROVIDER_URL, "jnp://localhost:1099"); prop.put(Context.URL_PKG_PREFIXES, "org.jboss.naming.client"); Context ctx = new InitialContext(prop); String parent = "java:/"; NamingEnumeration children = ctx.list(parent); System.out.println("CHILDREN of " + parent); while (children.hasMore()) { NameClassPair pair = (NameClassPair)children.nextElement(); System.out.println("NAME: " + pair.getName() + " TYPE: " + pair.getClassName()); } View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3837659#3837659 Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3837659 ------------------------------------------------------- This SF.Net email is sponsored by the new InstallShield X. >From Windows to Linux, servers to mobile, InstallShield X is the one installation-authoring solution that does it all. Learn more and evaluate today! http://www.installshield.com/Dev2Dev/0504 _______________________________________________ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user