EJB2.0 with JBOSS4.0

This is my code.I am using Jboss4.0 and EJB2.0 with myeclipse 6.1 I am getting the following exception.Even i add jbossall-client.jar in buildpath. This is my client code public static void main(String argt[]) throws Exception {

Originally posted by pankaj semwal: This is my code.I am using Jboss4.0 and EJB2.0 with myeclipse 6.1 I am getting the following exception.Even i add jbossall-client.jar in buildpath. This is my client code public static void main(String argt[]) throws Exception {

Exception in thread "main" javax.naming.CommunicationException: Could not obtain connection to any of these urls: jnp://localhost:1099 and discovery failed with error: javax.naming.CommunicationException: Receive timed out [Root exception is java.net.SocketTimeoutException: Receive timed out] [Root exception is javax.naming.CommunicationException: Failed to connect to server jnp:1099 [Root exception is javax.naming.ServiceUnavailableException: Failed to connect to server jnp:1099 [Root exception is java.net.UnknownHostException: jnp: jnp]]] at org.jnp.interfaces.NamingContext.checkRef(NamingContext.java:1562) at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:634) at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:627) at javax.naming.InitialContext.lookup(Unknown Source) at s.Client.main(Client.java:24)