powered by Jive Software

Sparkplug development error

When i type “ant run” into the command line, myplugin.jar is built successfully.

However, when the script tries to deploy the plugin within spark to test out its functionality, i get the following error.


Copying 1 file to /Users/michaelbotsakos/Desktop/spark/target/sparkplugs/spark/plugins

Exception in thread “main” java.lang.NoSuchMethodError: main

Java Result: 1

Any ideas…



Hi Michael,

Without seeing your build.xml file it’‘s hard to know exactly what the problem is but I would suspect that the classname you’'re pointing to does not have the main method for Spark. Below is the target we use for our sparkplug development:

<target name="run" depends="jar" description="Makes a plugin jar and starts Spark with that plugin">
       <copy todir="${basedir}/../spark/plugins"
           file="${plug.dir}/${plugin.name}"></copy>        <property name="sparklib" value="${basedir}/../spark/lib"></property>
       <java fork="true" classname="org.jivesoftware.launcher.Startup" dir="${basedir}/../spark/bin">
               <fileset dir="${sparklib}">
                   <include name="**/*.jar"></include>
                   <include name="**/*.exe"></include>
                   <include name="**/*.dll"></include>
               <pathelement location="${basedir}/../spark/resources"></pathelement>
            <fileset dir="${spark.home}/lib" includes="**/*.jar, **/*.zip"></fileset>
                        <!-- for OSX
               <pathelement location="/System/Library/Java" />
           <jvmarg value="-Dappdir=${basedir}/../spark"></jvmarg>

Hope that helps,


1 Like