Nov 15, 2007 8:48 AM
Openfire 3.4.1: java.lang.NullPointerException: Domain cannot be null
-
Like (0)
I've seen an exception in error.log. Copied the text here from the web interface. Not sure if there is some problem with the packet. If I remember correctly it was after updating to Openfire 3.4.1.
2007.11.14 18:30:12 [org.jivesoftware.openfire.handler.PresenceUpdateHandler.process(PresenceUpdate Handler.java:162) ] Internal server error. Triggered by packet: <presence type="unavailable" from="avangel@4hul01070/phone"/> java.lang.NullPointerException: Domain cannot be null at org.xmpp.packet.JID.<init>(JID.java:259) at org.jivesoftware.openfire.SessionManager.getActiveSessionCount(SessionManager.j ava:891) at org.jivesoftware.openfire.spi.PresenceManagerImpl.userUnavailable(PresenceManag erImpl.java:226) at org.jivesoftware.openfire.handler.PresenceUpdateHandler.process(PresenceUpdateH andler.java:143) at org.jivesoftware.openfire.handler.PresenceUpdateHandler.process(PresenceUpdateH andler.java:110) at org.jivesoftware.openfire.handler.PresenceUpdateHandler.process(PresenceUpdateH andler.java:174) at org.jivesoftware.openfire.PresenceRouter.handle(PresenceRouter.java:130) at org.jivesoftware.openfire.PresenceRouter.route(PresenceRouter.java:67) at org.jivesoftware.openfire.spi.PacketRouterImpl.route(PacketRouterImpl.java:75) at org.jivesoftware.openfire.SessionManager$ClientSessionListener.onConnectionClos e(SessionManager.java:1115) at org.jivesoftware.openfire.nio.NIOConnection.notifyCloseListeners(NIOConnection. java:181) at org.jivesoftware.openfire.nio.NIOConnection.close(NIOConnection.java:164) at org.jivesoftware.openfire.nio.ConnectionHandler.sessionClosed(ConnectionHandler .java:86) at org.apache.mina.common.support.AbstractIoFilterChain$TailFilter.sessionClosed(A bstractIoFilterChain.java:550) at org.apache.mina.common.support.AbstractIoFilterChain.callNextSessionClosed(Abst ractIoFilterChain.java:269) at org.apache.mina.common.support.AbstractIoFilterChain.access$800(AbstractIoFilte rChain.java:53) at org.apache.mina.common.support.AbstractIoFilterChain$EntryImpl$1.sessionClosed( AbstractIoFilterChain.java:633) at org.apache.mina.filter.codec.ProtocolCodecFilter.sessionClosed(ProtocolCodecFil ter.java:259) at org.apache.mina.common.support.AbstractIoFilterChain.callNextSessionClosed(Abst ractIoFilterChain.java:269) at org.apache.mina.common.support.AbstractIoFilterChain.access$800(AbstractIoFilte rChain.java:53) at org.apache.mina.common.support.AbstractIoFilterChain$EntryImpl$1.sessionClosed( AbstractIoFilterChain.java:633) at org.apache.mina.filter.executor.ExecutorFilter.processEvent(ExecutorFilter.java :250) at org.apache.mina.filter.executor.ExecutorFilter$ProcessEventsRunnable.run(Execut orFilter.java:284) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at java.lang.Thread.run(Unknown Source) |
Hi Attila,
I don't think it's because of the Openfire upgrade. The presence packet <presence type="unavailable" from="avangel@4hul01070/phone"/> sent by your client looks buggy. What client are you using?
Well, the "Domain cannot be null" error message may be a bit misleading. 4hul01070 is not a valid domain name because it starts with a digit. Openfire assumed that it's not a domain name and so reported it as missing or null, instead of invalid domain.
Thanks for the answer. I am using the XMPP library from the iLabs mobile developer toolbox (https://ilabsmobiletoolbox.dev.java.net/) in J2ME. However this domain name was given because it is the name of my (company) laptop. I did not know that this domain name is not valid. I don't really know the specs, I just try to use the library (I just look up something in the specs when needed). I will try to change the domain name. However if it is the case it would be really nice if Openfire validated the domain name at installation time.