6 Replies Latest reply on Aug 16, 2007 9:48 AM by Guillaume Soing

    Sending to a remote JMS queue - [ConnectionAspect] Caught ex

    Brad Porter Newbie


      I realize this may be a JBoss Remoting issue, please tell me if it is, but I decided to post here because it may be an issue with the config for JBoss Messaging (the lines get blurry).

      I have just upgraded my jboss-4.0.4.GA installations with jboss-messaging-1.0.1.CR4. I have used the default installation configuration - with one caveat - I had to remove the jboss-aop.jar file from the SAR, as I was getting ClassCast exceptions, since I already had jboss-aop from the ejb3 install.

      My scenario is this: I send a message to a queue on a remote server that is configured as above. (The client is an app running from within JBoss). The message is received, and everything appears to be sucessful. A few seconds later, I receive the following message in the server.log:

      ERROR [ConnectionAspect] Caught exception from connection
      at org.jboss.remoting.ConnectionValidator.run(ConnectionValidator.java:1
      at java.util.TimerThread.mainLoop(Timer.java:512)
      at java.util.TimerThread.run(Timer.java:462)

      My remoting-server.xml is the default:

       <mbean code="org.jboss.remoting.transport.Connector"
       display-name="Socket transport Connector">
       <attribute name="Configuration">
       <invoker transport="socket">
       <attribute name="marshaller" isParam="true">org.jboss.jms.server.remoting.JMSWireFormat</attribute>
       <attribute name="unmarshaller" isParam="true">org.jboss.jms.server.remoting.JMSWireFormat</attribute>
       <attribute name="serializationtype" isParam="true">jboss</attribute>
       <attribute name="dataType" isParam="true">jms</attribute>
       <attribute name="socket.check_connection" isParam="true">false</attribute>
       <attribute name="timeout">0</attribute>
       <attribute name="serverBindAddress">${jboss.bind.address}</attribute>
       <attribute name="serverBindPort">4457</attribute>
       <attribute name="leasePeriod">20000</attribute>
       <handler subsystem="JMS">org.jboss.jms.server.remoting.JMSServerInvocationHandler</handler>
       <!-- TODO: Do I need this> -->
       <mbean code="org.jboss.remoting.network.NetworkRegistry"

      and the code making the call looks like:
      QueueConnection cnn = null;
       try {
       cnn = remoteFactory.createQueueConnection();
       QueueSession remoteSess =
       cnn.createQueueSession(false, QueueSession.AUTO_ACKNOWLEDGE);
       QueueSender remoteSender = remoteSess.createSender(remoteQueue);
       ObjectMessage obj = remoteSess.createObjectMessage();
       finally {
       if (cnn != null) {

      - where remoteFactory has been looked up from an InitialContext with an environment pointing it to the remote server.

      Thanks for any help!