[jboss-user] [JBoss Messaging] - Sending to a remote JMS queue - [ConnectionAspect] Caught ex

bport do-not-reply at jboss.com
Thu Sep 7 13:46:30 EDT 2006


Hello.

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
java.lang.NullPointerException
        at org.jboss.remoting.ConnectionValidator.run(ConnectionValidator.java:1
14)
        at java.util.TimerThread.mainLoop(Timer.java:512)
        at java.util.TimerThread.run(Timer.java:462)

My remoting-server.xml is the default:
<server>
  | 
  |    <mbean code="org.jboss.remoting.transport.Connector"
  |           name="jboss.messaging:service=Connector,transport=socket"
  |           display-name="Socket transport Connector">
  |       <attribute name="Configuration">
  |          <config>
  |             <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>
  |             </invoker>
  |             <handlers>
  |                <handler subsystem="JMS">org.jboss.jms.server.remoting.JMSServerInvocationHandler</handler>
  |             </handlers>
  |          </config>
  |       </attribute>
  |       <depends>jboss.messaging:service=NetworkRegistry</depends>
  |    </mbean>
  | 
  |    <!-- TODO: Do I need this> -->
  |    <mbean code="org.jboss.remoting.network.NetworkRegistry"
  |           name="jboss.messaging:service=NetworkRegistry"/>
  | 
  | </server>
  | 
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();
  |                     obj.setObject(theLog);
  |                     remoteSender.send(obj);
  |                 }
  |                 finally {
  |                     if (cnn != null) {
  |                         cnn.close();
  |                     }
  |                 }
  | 
 - where remoteFactory has been looked up from an InitialContext with an environment pointing it to the remote server.


Thanks for any help!

-brad


View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3970150#3970150

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3970150



More information about the jboss-user mailing list