powered by Jive Software

Openfire 3.4.1: java.lang.NullPointerException: Domain cannot be null

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 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.

I’m having similar issue but the domain name is valid

2014.10.08 21:24:18 org.jivesoftware.openfire.handler.PresenceUpdateHandler - Internal server error. Triggered by packet:

java.lang.NullPointerException: Domain cannot be null

at org.xmpp.packet.JID.(JID.java:512)

at org.jivesoftware.openfire.SessionManager.getActiveSessionCount(SessionManager.j ava:936)

at org.jivesoftware.openfire.spi.PresenceManagerImpl.userUnavailable(PresenceManag erImpl.java:251)

at org.jivesoftware.openfire.handler.PresenceUpdateHandler.process(PresenceUpdateH andler.java:168)

at org.jivesoftware.openfire.handler.PresenceUpdateHandler.process(PresenceUpdateH andler.java:135)

at org.jivesoftware.openfire.handler.PresenceUpdateHandler.process(PresenceUpdateH andler.java:199)

at org.jivesoftware.openfire.PresenceRouter.handle(PresenceRouter.java:148)

at org.jivesoftware.openfire.PresenceRouter.route(PresenceRouter.java:84)

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

at org.jivesoftware.openfire.SessionManager$ClientSessionListener.onConnectionClos e(SessionManager.java:1164)

at org.jivesoftware.openfire.nio.NIOConnection.notifyCloseListeners(NIOConnection. java:223)

at org.jivesoftware.openfire.nio.NIOConnection.close(NIOConnection.java:206)

at org.jivesoftware.openfire.nio.ConnectionHandler.sessionClosed(ConnectionHandler .java:104)

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.common.IoFilterAdapter.sessionClosed(IoFilterAdapter.java:65)

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 :249)

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)