5 Replies Latest reply on Mar 31, 2008 11:03 AM by R B

    urgent .. help needed in javax.naming.CommunicationException

    deepali bhosale Newbie

      Hi All,
      I have created one small EJB application to learn EJB with JBoss. I have deployed the BookBean.jar file in the JBOS.
      the foloowing message i get while starting the JBoss server.
      11:47:30,312 INFO [EjbModule] Deploying BookBean
      11:47:30,609 INFO [EJBDeployer] Deployed: file:/C:/JBOSS/jboss-4.0.2/jboss-4.0.2/server/default/deploy/book.jar

      Which mean my ejb is deployed successfully.

      now i have a BookClient.java file whcih when i run using command java BookClient it gives me following error
      javax.naming.CommunicationException: Receive timed out [Root exception is java.net.SocketTimeoutException: Receive timed
      out]
      at org.jnp.interfaces.NamingContext.discoverServer(NamingContext.java:1302)
      at org.jnp.interfaces.NamingContext.checkRef(NamingContext.java:1382)
      at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:579)
      at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:572)
      at javax.naming.InitialContext.lookup(Unknown Source)
      at BookClient.main(BookClient.java:20)
      Caused by: java.net.SocketTimeoutException: Receive timed out
      at java.net.PlainDatagramSocketImpl.receive0(Native Method)
      at java.net.PlainDatagramSocketImpl.receive(Unknown Source)
      at java.net.DatagramSocket.receive(Unknown Source)
      at org.jnp.interfaces.NamingContext.discoverServer(NamingContext.java:1272)
      ... 5 more

      and when i try

      java -classpath %LIBDIR%\jnp-client.jar;%LIBDIR%\jboss-common-client.jar;%LIBDIR%\jboss-j2ee.jar;%LIBDIR%\jboss-net-client.jar;%LIBDIR%\jbossall-client.jar;;%LIBDIR%\jnet.jar;C:\Books; BookClient

      then i get the following error.
      javax.naming.CommunicationException: Receive timed out [Root exception is java.net.SocketTimeoutException: Receive timed
      out]
      at org.jnp.interfaces.NamingContext.discoverServer(NamingContext.java:1302)
      at org.jnp.interfaces.NamingContext.checkRef(NamingContext.java:1382)
      at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:579)
      at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:572)
      at javax.naming.InitialContext.lookup(Unknown Source)
      at BookClient.main(BookClient.java:20)
      Caused by: java.net.SocketTimeoutException: Receive timed out
      at java.net.PlainDatagramSocketImpl.receive0(Native Method)
      at java.net.PlainDatagramSocketImpl.receive(Unknown Source)
      at java.net.DatagramSocket.receive(Unknown Source)
      at org.jnp.interfaces.NamingContext.discoverServer(NamingContext.java:1272)
      ... 5 more
      I have created the jndi.properties file and put that in C:\Books. the same path is in my classpath as well as in path varaible of the system. Whats the problem. Plz help