Monitoring Service - An exception occurred while loading plugin. Review the logs for additional details. Openfire 4.9.0

Hello All!

After updating OpenFire to version 4.9.0, the monitoring service plugin stopped working, displaying the message

An exception occurred while loading plugin. Review the logs for additional details.

The log contains the following information:

<message to="hellen.carvalho@msn.multiloja.com" id="SPFCN-6374" type="chat" from="dsklj059cr02@msn.multiloja.com/Spark">
  <thread>45XM2K</thread>
  <body>boa tarde!</body>
  <x xmlns="jabber:x:event">
    <offline/>
    <composing/>
  </x>
  <active xmlns="http://jabber.org/protocol/chatstates"></active>
</message>
java.lang.NoClassDefFoundError: org/jivesoftware/openfire/archive/ConversationDAO
	at org.jivesoftware.openfire.archive.ConversationManager.processMessage(ConversationManager.java:751) ~[?:?]
	at org.jivesoftware.openfire.archive.ArchiveInterceptor.interceptPacket(ArchiveInterceptor.java:86) ~[?:?]
	at org.jivesoftware.openfire.interceptor.InterceptorManager.invokeInterceptors(InterceptorManager.java:268) ~[xmppserver-4.9.0.jar:4.9.0]
	at org.jivesoftware.openfire.interceptor.InterceptorManager.invokeInterceptors(InterceptorManager.java:230) ~[xmppserver-4.9.0.jar:4.9.0]
	at org.jivesoftware.openfire.MessageRouter.route(MessageRouter.java:170) ~[xmppserver-4.9.0.jar:4.9.0]
	at org.jivesoftware.openfire.spi.PacketRouterImpl.route(PacketRouterImpl.java:79) ~[xmppserver-4.9.0.jar:4.9.0]
	at org.jivesoftware.openfire.net.StanzaHandler.processMessage(StanzaHandler.java:434) ~[xmppserver-4.9.0.jar:4.9.0]
	at org.jivesoftware.openfire.net.ClientStanzaHandler.processMessage(ClientStanzaHandler.java:104) ~[xmppserver-4.9.0.jar:4.9.0]
	at org.jivesoftware.openfire.net.StanzaHandler.process(StanzaHandler.java:258) ~[xmppserver-4.9.0.jar:4.9.0]
	at org.jivesoftware.openfire.net.StanzaHandler.processStanza(StanzaHandler.java:222) ~[xmppserver-4.9.0.jar:4.9.0]
	at org.jivesoftware.openfire.net.StanzaHandler.process(StanzaHandler.java:114) ~[xmppserver-4.9.0.jar:4.9.0]
	at org.jivesoftware.openfire.nio.NettyConnectionHandler.channelRead0(NettyConnectionHandler.java:142) ~[xmppserver-4.9.0.jar:4.9.0]
	at org.jivesoftware.openfire.nio.NettyConnectionHandler.channelRead0(NettyConnectionHandler.java:50) ~[xmppserver-4.9.0.jar:4.9.0]
	at io.netty.channel.SimpleChannelInboundHandler.channelRead(SimpleChannelInboundHandler.java:99) ~[netty-transport-4.1.108.Final.jar:4.1.108.Final]
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:444) ~[netty-transport-4.1.108.Final.jar:4.1.108.Final]
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:420) ~[netty-transport-4.1.108.Final.jar:4.1.108.Final]
	at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:412) ~[netty-transport-4.1.108.Final.jar:4.1.108.Final]
	at io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMessageDecoder.java:346) ~[netty-codec-4.1.108.Final.jar:4.1.108.Final]
	at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:318) ~[netty-codec-4.1.108.Final.jar:4.1.108.Final]
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:444) ~[netty-transport-4.1.108.Final.jar:4.1.108.Final]
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:420) ~[netty-transport-4.1.108.Final.jar:4.1.108.Final]
	at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:412) ~[netty-transport-4.1.108.Final.jar:4.1.108.Final]
	at io.netty.handler.timeout.IdleStateHandler.channelRead(IdleStateHandler.java:289) ~[netty-handler-4.1.108.Final.jar:4.1.108.Final]
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:442) ~[netty-transport-4.1.108.Final.jar:4.1.108.Final]
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:420) ~[netty-transport-4.1.108.Final.jar:4.1.108.Final]
	at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:412) ~[netty-transport-4.1.108.Final.jar:4.1.108.Final]
	at io.netty.handler.traffic.AbstractTrafficShapingHandler.channelRead(AbstractTrafficShapingHandler.java:506) ~[netty-handler-4.1.108.Final.jar:4.1.108.Final]
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:442) ~[netty-transport-4.1.108.Final.jar:4.1.108.Final]
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:420) ~[netty-transport-4.1.108.Final.jar:4.1.108.Final]
	at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:412) ~[netty-transport-4.1.108.Final.jar:4.1.108.Final]
	at io.netty.handler.ssl.SslHandler.unwrap(SslHandler.java:1475) ~[netty-handler-4.1.108.Final.jar:4.1.108.Final]
	at io.netty.handler.ssl.SslHandler.decodeJdkCompatible(SslHandler.java:1338) ~[netty-handler-4.1.108.Final.jar:4.1.108.Final]
	at io.netty.handler.ssl.SslHandler.decode(SslHandler.java:1387) ~[netty-handler-4.1.108.Final.jar:4.1.108.Final]
	at io.netty.handler.codec.ByteToMessageDecoder.decodeRemovalReentryProtection(ByteToMessageDecoder.java:530) ~[netty-codec-4.1.108.Final.jar:4.1.108.Final]
	at io.netty.handler.codec.ByteToMessageDecoder.callDecode(ByteToMessageDecoder.java:469) ~[netty-codec-4.1.108.Final.jar:4.1.108.Final]
	at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:290) ~[netty-codec-4.1.108.Final.jar:4.1.108.Final]
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:444) ~[netty-transport-4.1.108.Final.jar:4.1.108.Final]
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:420) ~[netty-transport-4.1.108.Final.jar:4.1.108.Final]
	at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:412) ~[netty-transport-4.1.108.Final.jar:4.1.108.Final]
	at io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1410) ~[netty-transport-4.1.108.Final.jar:4.1.108.Final]
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:440) ~[netty-transport-4.1.108.Final.jar:4.1.108.Final]
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:420) ~[netty-transport-4.1.108.Final.jar:4.1.108.Final]
	at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:919) ~[netty-transport-4.1.108.Final.jar:4.1.108.Final]
	at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:166) ~[netty-transport-4.1.108.Final.jar:4.1.108.Final]
	at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:788) ~[netty-transport-4.1.108.Final.jar:4.1.108.Final]
	at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:724) ~[netty-transport-4.1.108.Final.jar:4.1.108.Final]
	at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:650) ~[netty-transport-4.1.108.Final.jar:4.1.108.Final]
	at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:562) ~[netty-transport-4.1.108.Final.jar:4.1.108.Final]
	at io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:997) ~[netty-common-4.1.108.Final.jar:4.1.108.Final]
	at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74) ~[netty-common-4.1.108.Final.jar:4.1.108.Final]
	at java.lang.Thread.run(Thread.java:1575) [?:?]
Caused by: java.lang.ClassNotFoundException: org.jivesoftware.openfire.archive.ConversationDAO
	at java.net.URLClassLoader.findClass(URLClassLoader.java:445) ~[?:?]
	at java.lang.ClassLoader.loadClass(ClassLoader.java:595) ~[?:?]
	at java.lang.ClassLoader.loadClass(ClassLoader.java:528) ~[?:?]
	... 51 more

Does anyone have any clues as to what it could be?

Thanks in advance.

Hi Michael, sorry to hear that you’re running into issues. What version of the Monitoring plugin are you using? Can you try to upgrade to the latest version, if you haven’t done so already?

Hi Guus!
Thank you fot the answer!
We already using the last version of the plugin (2.6.0).
Perhaps can be a java issue ?

What makes you think that this is a Java issue?

Are there any other errors or warnings in the log file, maybe before the one that you already included was logged?

The error suggests that a particular class cannot be found. I cannot explain that from this error alone, as the class certainly is part of the plugin (that was even the case on older versions of the plugin).

Have you tried restarting Openfire? Sometimes, when an old version of a plugin is unloaded, traces of the old plugin get left behind, causing problems like this when a new version of the same plugin is loaded.

You could try to:

  1. Make a backup of all of Openfire
  2. Unload the Monitoring plugin
  3. Shutdown Openfire
  4. Delete the file <OPENFIRE_HOME>/plugins/monitoring.jar if it exists
  5. Delete the directory <OPENFIRE_HOME>/plugins/monitoring/ if it exists
  6. Start Openfire
  7. Re-install the new plugin

That is a very redundant way of making sure that the old plugin is thoroughly deleted from the system.

I mentioned Java because I had to install the JDK for it to work, because with only JRE, the official installer returned an error saying Java was not found on the server (Windows Server 2022). The previous version of openfire was running only with JRE

I have already stopped Openfire, deleted the .jar and the folder and started the service again, and installed the plugin again, but the error persisted.
I try the old version (2.5.0), but … same error.

To be clear, when you say ‘same error’, you are referring to the error that contains this?

java.lang.NoClassDefFoundError: org/jivesoftware/openfire/archive/ConversationDAO

That’s exceptionally weird. It’s almost as if the plugin file is corrupt. Can you try to download it again?

Another cause could perhaps be a file permission issue. All files under <OPENFIRE_HOME> should be readable (and writable) by the same user that’s running the Openfire process.