powered by Jive Software

Bug - Openfire Admin Show Sessions problem (Hazelcast + Openfire 4.2.x)

Currently, I have found an issues in the Openfire admin screen, show current sessions tab, results in a casting exception.

It works correctly when Hazlecast is disabled/turned off. It failed with a casting exception when Hazlecast is enabled with more than 1 node. The problem seems to have been introduced in 4.2.0 final

The offending line appears to be in session-row.jspf, where it makes an assumption that the session is of the type LocalClientSession and does a cast. This however fails in the clustered scenario, as not all sessions are Local.

LocalClientSession localSession = (LocalClientSession) sess;
if (localSession != null && localSession.isDetached()) { %>

Error Message displayed in Sessions view

java.lang.ClassCastException: org.jivesoftware.openfire.plugin.session.RemoteClientSession cannot be cast to org.jivesoftware.openfire.session.LocalClientSession
	at org.jivesoftware.openfire.admin.session_002dsummary_jsp._jspService(session_002dsummary_jsp.java:536)
	at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)

Please provide the NPE

Thank you. I added details above to original post. Exception was not an NPE but rather Casting exception.

Thank you, OF-1460 has been filed and I alerted @dwd to the issue.

For anyone following this thread, OF-1460 is now fixed in the master branch .