3 Replies Latest reply on Dec 7, 2011 5:48 AM by Christos Vasilakis

    JMS standalone Client - JNDI - JBoss 7.1.0.Beta1

    Christos Vasilakis Newbie

      Hi there,

       

      I am trying to write a simple JMS client that sends a message to the queue. The problem is that the program halts on retrieving the "connectionfactory" from server through jndi.

       

      I get this in the console when I execute the program..

       

      retrieving /RemoteConnectionFactory...

      javax.naming.CommunicationException: Could not obtain connection to any of these urls: casper.rd.forthnet.gr:5445 and discovery failed with error: javax.naming.CommunicationException: Receive timed out [Root exception is java.net.SocketTimeoutException: Receive timed out]

                at org.jnp.interfaces.NamingContext.discoverServer(NamingContext.java:1690

      ....

      ...

      Caused by: java.net.SocketTimeoutException: Receive timed out

      ....

      .....

      [Root exception is javax.naming.CommunicationException: Failed to retrieve stub from server casper.rd.forthnet.gr/212.251.99.190:5445 [Root exception is java.io.EOFException]]

                at org.jnp.interfaces.NamingContext.checkRef(NamingContext.java:1780)

       

       

      On the server console I get this

      [org.hornetq.core.protocol.core.impl.RemotingConnectionImpl] (hornetq-failure-check-thread) Connection failure has been detected: Did not receive data from /212.251.99.190:59054. It is likely the client has exited or crashed without closing its connection, or the network between the server and client has failed. You also might have configured connection-ttl and client-failure-check-period incorrectly. Please check user manual for more information. The connection will now be closed. [code=3]

       

       

       

      My pom file is here

      https://github.com/cvasilak/binsendrecv/blob/master/pom.xml

       

      executed with mvn exec:java -Dexec.mainClass="gr.forthnet.nms.binsendrecv.BinSendRecvExample"

       

      My jndi.properties file

      https://github.com/cvasilak/binsendrecv/blob/master/src/main/resources/jndi.properties

       

      and my java test program

      https://github.com/cvasilak/binsendrecv/blob/master/src/main/java/gr/forthnet/nms/binsendrecv/BinSendRecvExample.java

       

      I am running locally a jboss 7.1.0.Beta1 instance bind to casper.rd.forthnet.gr address.

       

      Am I doing something wrong? Are the libraries included in the pom are in their correct versions to communicate with the JBoss 7.1. instance?

       

      Regards,

      Christow