Sending to a remote JMS queue - [ConnectionAspect] Caught ex
bport Sep 7, 2006 1:46 PMHello.
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