igniterealtime/openfire-pushnotification-plugin

Unable to get the plugin running on Openfire < 4.3.0

GoodOldGamer opened this issue · 2 comments

I've been trying to get the plugin in version 0.7 running on my local OpenFire installation. I've installed it via the OpenFire admin console. The jar-file is in the plugin directory and so it should be deployed automatically as stated in the readme.

But when I retrieve the discovery info from the server, features don't contain "urn:xmpp:push:0" and if I try to enable push notifications I also just get an error back from the server.
What also is odd is that in the plugins section of the OpenFire admin console I can restart every installed plugin - except the pushnotification plugin. Is this normal?

I'm using OpenFire 4.2.3. Yes, I know it's outdated, but that's the version provided by my OpenSuse 15.1 installation and I don't wanted to waste time building the current version.

What also is odd is that in the plugins section of the OpenFire admin console I can restart every installed plugin - except the pushnotification plugin. Is this normal?

This is an indication that the push notification plugin was not loaded properly. Although it does not list a minimum version of Openfire, it is possible that it's not compatible (we do not test against older versions)

I've installed a vanilla 4.2.3 instance of Openfire, and have attempted to load release 0.7 of the plugin.

The log files show this error:

2020.07.01 17:29:18 ERROR [pool-26-thread-1]: org.jivesoftware.openfire.container.PluginManager - An exception occurred while loading plugin 'pushnotification':
java.lang.NoClassDefFoundError: org/jivesoftware/openfire/disco/UserFeaturesProvider
        at java.lang.ClassLoader.defineClass1(Native Method)
        at java.lang.ClassLoader.defineClass(ClassLoader.java:763)
        at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
        at java.net.URLClassLoader.defineClass(URLClassLoader.java:468)
        at java.net.URLClassLoader.access$100(URLClassLoader.java:74)
        at java.net.URLClassLoader$1.run(URLClassLoader.java:369)
        at java.net.URLClassLoader$1.run(URLClassLoader.java:363)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(URLClassLoader.java:362)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
        at java.lang.Class.getDeclaredConstructors0(Native Method)
        at java.lang.Class.privateGetDeclaredConstructors(Class.java:2671)
        at java.lang.Class.getConstructor0(Class.java:3075)
        at java.lang.Class.newInstance(Class.java:412)
        at org.jivesoftware.openfire.container.PluginManager.loadPlugin(PluginManager.java:531)
        at org.jivesoftware.openfire.container.PluginMonitor$MonitorTask$4.call(PluginMonitor.java:276)
        at org.jivesoftware.openfire.container.PluginMonitor$MonitorTask$4.call(PluginMonitor.java:264)
        at java.util.concurrent.FutureTask.run(FutureTask.java:266)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
        at java.lang.Thread.run(Thread.java:748)
Caused by: java.lang.ClassNotFoundException: org.jivesoftware.openfire.disco.UserFeaturesProvider
        at java.net.URLClassLoader.findClass(URLClassLoader.java:382)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:357)

From what I can tell, the class that cannot be found was added to Openfire in version 4.3.0.

I've also tried to load the plugin version 4.3.0 of Openfire: that worked.

I'm afraid that the solution here is to upgrade Openfire. It is unlikely that we will provide a new version of the plugin that is backwards compatible.

I will add a 'minimum server requirement' to the plugin, to avoid future confusion.

Ah, ok. Thank you. Then I have to upgrade the server.