Openfire Cluster behaves unexpectedly on the MUC

Hi @guus. worked on TCP in an incomprehensible way. When using BOSH, I came across an error that is actually the root cause of the error:

java.lang.NullPointerException: null
at org.jivesoftware.openfire.muc.spi.LocalMUCRoom.joinRoom(LocalMUCRoom.java:680) ~[xmppserver-4.4.2.jar:4.4.2]

In fact, in the following code, the joinRole variable is null. (LocalMUCRoom.java)

} else {
    // Grab the existing one.
    joinRole = occupantsByFullJID.get(user.getAddress());
    joinRole.setPresence( presence ); // OF-1581: Use latest presence information.
}

The occupantsByFullJID variable and the occupantsByNickname variable have inconsistent values. Therefore, when the user is in occupantsByNickname, the variable “clientOnlyJoin” becomes “true” but “joinRole” is null because the user is not in “occupantsByFullJID”.

This problem does not occur on the user-joined node. Because these two variables are consistent only then.

1 Like