Not load plugin

Hi

I’'m triying to develop a simple plugin for learn it with sparkplug. When i make ant run, the plugin is compiled ok, spark start ok, but the plugin is not loaded, this is the error

19-jul-2006 12:38:57 com.jivesoftware.spark.util.log.Logger logError

GRAVE: Unable to load plugin com.jivesoftware.plugin.ProbonPlugin.

java.lang.ClassNotFoundException: com.jivesoftware.plugin.ProbonPlugin

at java.net.URLClassLoader$1.run(URLClassLoader.java:200)

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

at java.net.URLClassLoader.findClass(URLClassLoader.java:188)

at java.lang.ClassLoader.loadClass(ClassLoader.java:306)

at java.lang.ClassLoader.loadClass(ClassLoader.java:251)

at com.jivesoftware.spark.PluginManager.loadPublicPlugin(PluginManager.java:196)

at com.jivesoftware.spark.PluginManager.loadPublicPlugins(PluginManager.java:451)

at com.jivesoftware.spark.PluginManager.loadPlugins(PluginManager.java:126)

at com.jivesoftware.spark.Workspace$4.finished(Workspace.java:221)

at com.jivesoftware.spark.util.SwingWorker$3.run(SwingWorker.java:128)

at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)

at java.awt.EventQueue.dispatchEvent(EventQueue.java:461)

at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java: 242)

at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:16 3)

at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:157)

at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:149)

at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)

Welcome To Spark

and this is my plugin.xml file

What’'s the problem?

Thanks in advance

Regards

Hi dejalatele,

Looks like the problem is that your plugin.xml file you’'ve set your plugin class to be “com.jivesoftware.spark.examples.ProbonPlugin” but it should be “com.jivesoftware.plugin.ProbonPlugin” (assuming ProbonPlugin is the class that implements the Plugin interface).

Hope that helps,

Ryan

Still not working, the build script compile the class ProbonPlugin.class at sparkplugs/builder/build/classes/com/jivesoftware/spark/examples, but when run spark search the plugin at com/jivesoftware/plugin. There are another file to configure?

I’'m forgot to change the first line from ProbonPlugin.java to

package com.jivesoftware.plugin;

for compile the class in com/jivesoftware/plugin, and now the plugin is in this directory but still appear the same error.

Hi dejalatele,

If you changed your package declaration (the first line in ProbonPlugin.java) you also need to change the location of the java file in the directory structure. So, if the first line in ProbonPlugin.java reads “package com.jivesoftware.plugin;” then the ProbonPlugin.java file needs to be in the “sparkplugs/builder/build/src/com/jivesoftware/plugin” directory.

Hope that helps,

Ryan

Set the parameter in your plugin.xml

If you want to run it on New Open Source Version.

Regards

Yes, I’'m added this line in plugin.xml file and the error dont appear.

Thanks