igniterealtime / openfire-userStatus-plugin

Automatically saves the last status (presence, IP address, logon and logoff time) per user and resource to userStatus table in the Openfire database
4 stars 6 forks source link

Stack trace when user logs in on Openfire 4.8 #16

Closed guusdk closed 1 year ago

guusdk commented 1 year ago

In Openfire 4.8.0 alpha (and possibly in earlier versions, I did not check), the following stack trace is logged when a user logs in while this plugin (v1.2.3-SNAPSHOT) is loaded:

Exception in thread "httpbind-worker-2" java.lang.NoSuchMethodError: 'boolean org.jivesoftware.openfire.user.UserManager.isRegisteredUser(org.xmpp.packet.JID)'
    at com.reucon.openfire.plugins.userstatus.UserStatusPlugin.sessionCreated(UserStatusPlugin.java:73)
    at org.jivesoftware.openfire.event.SessionEventDispatcher.dispatchEvent(SessionEventDispatcher.java:74)
    at org.jivesoftware.openfire.SessionManager.addSession(SessionManager.java:647)
    at org.jivesoftware.openfire.session.LocalClientSession.setAuthToken(LocalClientSession.java:589)
    at org.jivesoftware.openfire.handler.IQBindHandler.handleIQ(IQBindHandler.java:156)
    at org.jivesoftware.openfire.handler.IQHandler.process(IQHandler.java:62)
    at org.jivesoftware.openfire.IQRouter.handle(IQRouter.java:394)
    at org.jivesoftware.openfire.IQRouter.route(IQRouter.java:106)
    at org.jivesoftware.openfire.spi.PacketRouterImpl.route(PacketRouterImpl.java:74)
    at org.jivesoftware.openfire.SessionPacketRouter.route(SessionPacketRouter.java:106)
    at org.jivesoftware.openfire.SessionPacketRouter.route(SessionPacketRouter.java:65)
    at org.jivesoftware.openfire.http.HttpSession.lambda$sendPendingPackets$2(HttpSession.java:572)
    at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
    at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
    at java.base/java.lang.Thread.run(Thread.java:829)
guusdk commented 1 year ago

This affects Openfire 4.8 and later only. It is caused by removal of deprecated API in Openfire 4.8: https://igniterealtime.atlassian.net/browse/OF-2395