Plugin Load errors?

Ok, I’'ve got a way to download and update to a plugin, but i think there is a problem with the PluginManger.addPlugin(PublicPlugin plugin).

It looks like it does not add the correct classpath. I think it has something to do with the PluginClassLoader adding the plugin.jar file, not the plugin.jar/lib/plugin-classes.jar file.

You also get the same error when installing a plugin from the plugin menu item.

ClassNotFoundException is the error you get.

I’'m a bit over my head, does anyone have any insight into this?

Thank you

Brian

hmmm. it should find all the classes in all the jars in the lib directory. I know there is occasionally an issue with certain xml libs etc., but for the most part, everything is loaded via URLClassLoaders.

What is the error you are getting?

Cheers,

Derek

If you install any plugin, you get a class not found. If you restart, everything is ok, it is just loading a new plugin “on the fly”. Looking at the source, there is a difference in how the URLClassLoader is used on startup and “on the fly”.

SEVERE: Unable to load plugin org.jivesoftware.spark.plugins.transfersettings.FileTransferSettingsPlugin.

java.lang.ClassNotFoundException: org.jivesoftware.spark.plugins.transfersettings.FileTransferSettingsPlugin

at java.net.URLClassLoader$1.run(Unknown Source)

at java.security.AccessController.doPrivileged(Native Method)

at java.net.URLClassLoader.findClass(Unknown Source)

at java.lang.ClassLoader.loadClass(Unknown Source)

at java.lang.ClassLoader.loadClass(Unknown Source)

at org.jivesoftware.spark.PluginManager.loadPublicPlugin(PluginManager.java:260)

at org.jivesoftware.spark.PluginManager.addPlugin(PluginManager.java:549)

at org.jivesoftware.sparkimpl.plugin.viewer.PluginViewer$4.run(PluginViewer.java:3 31)

at java.lang.Thread.run(Unknown Source)

Ah. Thanks for the report. I’ve gone ahead and filed SPARK-823 to fix this.

Thank You,

Derek