NullPointer in

Hi there,

I’'ve found a lot of NullPointers in my logs (on average about 250-300 a day) pointing to The problem seems to lie in the sending of an error packet, where the child element is copied to the error packet. If the original packet does not have a child element, a nullpointer exception is thrown.

While an IQ stanza without a child element is odd (especially one that passes through IQ.createResultIQ()), it apparently does happen with some frequency. I’'d like it if the full packet XML were given on route failures.

A stacktrace is given below. The patch would be a simple check for null before attempting to call createCopy() on the childelement.

2006.11.30 14:26:35 org.jivesoftware.wildfire.IQRouter.handle( Could not route packet


at org.jivesoftware.wildfire.IQRouter.sendErrorPacket(

at org.jivesoftware.wildfire.IQRouter.handle(

at org.jivesoftware.wildfire.IQRouter.route(

at org.jivesoftware.wildfire.spi.PacketRouterImpl.route(




at 62)