NPE in LocalMUCRoom.java

In OF v4.5.2 w/cluster enabled we’re getting an NPE as follows:

2021.02.27 15:18:56 org.jivesoftware.openfire.muc.spi.MultiUserChatServiceImpl - Internal server error
java.lang.NullPointerException: null
        at org.jivesoftware.openfire.muc.spi.LocalMUCRoom.joinRoom(LocalMUCRoom.java:676) ~[xmppserver-4.5.2.jar:4.5.2]
        at org.jivesoftware.openfire.muc.spi.LocalMUCUser.process(LocalMUCUser.java:485) ~[xmppserver-4.5.2.jar:4.5.2]
        at org.jivesoftware.openfire.muc.spi.LocalMUCUser.process(LocalMUCUser.java:180) ~[xmppserver-4.5.2.jar:4.5.2]

If the same method in LocalMUCRoom v4.6.2 is called with the same state/parameters, then the NPE will be thrown at https://github.com/igniterealtime/Openfire/blob/3acceb064aeb3e6a2b3306ec35ceebc1e3cc8c8f/xmppserver/src/main/java/org/jivesoftware/openfire/muc/spi/LocalMUCRoom.java#L676

NPE will still be thrown. There are other code paths in OF sourcecode that expect non-null values and throw NPEs instead of degrading gracefully.

Can the community report this in a bug-reporting system? Is there a writeup on unit testing and debugging Openfire sourcecode?

This issue seems to be a direct result of a larger problem that is specific to the combination of ‘clustering’ and ‘MUC’. To resolve this problem, a partial rewrite will be performed (this issue is being tracked in OF-2219). The solution is scheduled to be available in Openfire 4.7.0.