powered by Jive Software

java.lang.NullPointerException at org.jivesoftware.openfire.Message Router.routingFailed(Message Router.java:193)

I see the below error message in the open fire server lof files:

2012.06.28 18:29:31 Closing connection due to error while processing message: <?xml version=“1.0” encoding=“utf-8”?><CommunicationMessage xmlns:xsi=“http://www.w3.org/2001/XMLSchema-instance” xmlns:xsd=“http://www.w3.org/2001/XMLSchema” MessageId=“886886a6-0102-4a7f-a65b-c27e49aa29a2” TrackingId=“e682e946-315e-47a5-8259-6bdad0c7c504” From=“xyz123” To=“1168003” Version="" PayloadType=“xyz.ReliableMessaging.PendingMessagesNotification” IsAckRequired=“false” IsTTLEnforced=“false” TTL="" OriginationTimestamp=“2012-06-29T01:29:30.5080497Z” SendTimestamp=“0001-01-01T00:00:00” ReceivedTimestamp=“0001-01-01T00:00:00” xmlns=“http://tempuri.org/Message.xsd” />

java.lang.NullPointerException

at org.jivesoftware.openfire.MessageRouter.routingFailed(MessageRouter.java:193)

at org.jivesoftware.openfire.MessageRouter.route(MessageRouter.java:108)

at org.jivesoftware.openfire.spi.PacketRouterImpl.route(PacketRouterImpl.java:80)

at org.jivesoftware.openfire.net.StanzaHandler.processMessage(StanzaHandler.java:3 73)

at org.jivesoftware.openfire.net.ClientStanzaHandler.processMessage(ClientStanzaHa ndler.java:107)

at org.jivesoftware.openfire.net.StanzaHandler.process(StanzaHandler.java:227)

at org.jivesoftware.openfire.net.StanzaHandler.process(StanzaHandler.java:194)

at org.jivesoftware.openfire.nio.ConnectionHandler.messageReceived(ConnectionHandl er.java:169)

at org.apache.mina.common.support.AbstractIoFilterChain$TailFilter.messageReceived (AbstractIoFilterChain.java:570)

at org.apache.mina.common.support.AbstractIoFilterChain.callNextMessageReceived(Ab stractIoFilterChain.java:299)

at org.apache.mina.common.support.AbstractIoFilterChain.access$1100(AbstractIoFilt erChain.java:53)

at org.apache.mina.common.support.AbstractIoFilterChain$EntryImpl$1.messageReceive d(AbstractIoFilterChain.java:648)

at org.apache.mina.common.IoFilterAdapter.messageReceived(IoFilterAdapter.java:80)

at org.apache.mina.common.support.AbstractIoFilterChain.callNextMessageReceived(Ab stractIoFilterChain.java:299)

at org.apache.mina.common.support.AbstractIoFilterChain.access$1100(AbstractIoFilt erChain.java:53)

at org.apache.mina.common.support.AbstractIoFilterChain$EntryImpl$1.messageReceive d(AbstractIoFilterChain.java:648)

at org.apache.mina.filter.codec.support.SimpleProtocolDecoderOutput.flush(SimplePr otocolDecoderOutput.java:58)

at org.apache.mina.filter.codec.ProtocolCodecFilter.messageReceived(ProtocolCodecF ilter.java:185)

at org.apache.mina.common.support.AbstractIoFilterChain.callNextMessageReceived(Ab stractIoFilterChain.java:299)

at org.apache.mina.common.support.AbstractIoFilterChain.access$1100(AbstractIoFilt erChain.java:53)

at org.apache.mina.common.support.AbstractIoFilterChain$EntryImpl$1.messageReceive d(AbstractIoFilterChain.java:648)

at org.apache.mina.filter.executor.ExecutorFilter.processEvent(ExecutorFilter.java :239)

at org.apache.mina.filter.executor.ExecutorFilter$ProcessEventsRunnable.run(Execut orFilter.java:283)

at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)

at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)

at org.apache.mina.util.NamePreservingRunnable.run(NamePreservingRunnable.java:51)

at java.lang.Thread.run(Unknown Source)

Below is the code snippet from the MessageRouter.java where the exception is being thrown:

try {

// Deliver stanza to requestedroute

               routingTable.routePacket(recipientJID, packet, **false**);

           }

catch (Exception e) {

               routingFailed(recipientJID, packet);

           }

I somehow have a feeling that recipientJID parameter is null which is causing an exception when routePacket method is called and then on catching the exception the routingFailed method throws the exception again. Can somebody please let me know why or how the recipientJID is being set.

NOTE: The message is in the log entry above.

**We are using OpenFire Server version 3.7.0
**

Anybody knows what might be causing the above reported issue?

Do you have From=“xyz123” To=“1168003” in your users db?