Problems with Spark-Plugin development

Hello .*,

I am trying do develop a Plugin for spark using The SparkPlug Kit (version 2.0.7)[1]. But not getting along verry well so far.

Here is what I did:

I created a File ExamplePlugin.java and put the class ExamplePlugin provided in the sparkplugs/sparkplug_dev_guide.html documentation. I change the parameter of the plugin.xml to “org.jivesoftware.spark.examples.ExamplePlugin” and run the build file with “ant jar”. A jar-file is build and I copy it into the plugins folder of a Spark (version 2.6.0-rc1)[2]. After starting Spark the Plugin shows up in the List of installed plugins. But the function initialize() of the plugin has a System.out.println(“Welcome To Spark”); and I would suspect it to print this rigt out to the console but nothing appears. Any hints on this? Did I forget something? Is there anything else to be considered while developing a plugin?

When I try to build and run the plugin with “ant run” it throws an Error[3] and hangs.

I am using version 2.6.0-rc1 because with version 2.5.8 the login at the Server is just not working.

[1] http://www.igniterealtime.org/projects/spark/sparkplug-kit.jsp

[2] http://www.igniterealtime.org/downloads/beta.jsp

[3] [java] MAIN_IMAGE not found.
[java] Exception in thread “AWT-EventQueue-0” java.lang.NullPointerException
[java] at org.jivesoftware.LoginDialog$ImagePanel.getPreferredSize(LoginDialog.java:815)
[java] at java.awt.GridBagLayout.GetLayoutInfo(GridBagLayout.java:1109)
[java] at java.awt.GridBagLayout.getLayoutInfo(GridBagLayout.java:910)
[java] at java.awt.GridBagLayout.preferredLayoutSize(GridBagLayout.java:730)
[java] at java.awt.Container.preferredSize(Container.java:1665)
[java] at java.awt.Container.getPreferredSize(Container.java:1650)
[java] at javax.swing.JComponent.getPreferredSize(JComponent.java:1636)
[java] at javax.swing.JRootPane$RootLayout.preferredLayoutSize(JRootPane.java:911)
[java] at java.awt.Container.preferredSize(Container.java:1665)
[java] at java.awt.Container.getPreferredSize(Container.java:1650)
[java] at javax.swing.JComponent.getPreferredSize(JComponent.java:1636)
[java] at java.awt.BorderLayout.preferredLayoutSize(BorderLayout.java:719)
[java] at java.awt.Container.preferredSize(Container.java:1665)
[java] at java.awt.Container.getPreferredSize(Container.java:1650)
[java] at java.awt.Window.pack(Window.java:700)
[java] at org.jivesoftware.LoginDialog.invoke(LoginDialog.java:155)
[java] at org.jivesoftware.Spark.(Spark.java:55)
[java] at org.jivesoftware.Spark.(Spark.java:39)
[java] at org.jivesoftware.Spark$1.run(Spark.java:151)
[java] at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:226)
[java] at java.awt.EventQueue.dispatchEvent(EventQueue.java:602)
[java] at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:27 5)
[java] at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:200)
[java] at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:19 0)
[java] at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:185)
[java] at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:177)
[java] at java.awt.EventDispatchThread.run(EventDispatchThread.java:138)

This mean that you haven’t main image. Try to build spark using “ant development” command.

Did you add the scrip

2.0.6

in plugin.xml after

com.jivesoftware.spark.examples.ExamplePlugin,if not there would nothing appears.