The startup class is not packaged in a jar file

I use myeclipse to develop spark plug.when I start spark program,everything is normal and there is no information in console.But when I click login out ,there is a problem that The startup class is not packaged in a jar file which was shown in console.I check the folder of lib which is located in target/build,there has a startup.jar file.Here is the detail:

十月 13, 2015 8:44:06 上午 org.jivesoftware.spark.util.log.Log error

严重: The startup class is not packaged in a jar file

Exception in thread “AWT-EventQueue-0” java.lang.NullPointerException

at org.jivesoftware.MainWindow.getCommandPath(MainWindow.java:386)

at org.jivesoftware.MainWindow.restartApplicationWithScript(MainWindow.java:393)

at org.jivesoftware.MainWindow.closeConnectionAndInvoke(MainWindow.java:351)

at org.jivesoftware.MainWindow.logout(MainWindow.java:330)

at org.jivesoftware.MainWindow$3.actionPerformed(MainWindow.java:501)

at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)

at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)

at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)

at javax.swing.DefaultButtonModel.setPressed(Unknown Source)

at javax.swing.AbstractButton.doClick(Unknown Source)

at javax.swing.plaf.basic.BasicMenuItemUI.doClick(Unknown Source)

at javax.swing.plaf.basic.BasicMenuItemUI$Handler.mouseReleased(Unknown Source)

at java.awt.Component.processMouseEvent(Unknown Source)

at javax.swing.JComponent.processMouseEvent(Unknown Source)

at java.awt.Component.processEvent(Unknown Source)

at java.awt.Container.processEvent(Unknown Source)

at java.awt.Component.dispatchEventImpl(Unknown Source)

at java.awt.Container.dispatchEventImpl(Unknown Source)

at java.awt.Component.dispatchEvent(Unknown Source)

at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)

at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)

at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)

at java.awt.Container.dispatchEventImpl(Unknown Source)

at java.awt.Window.dispatchEventImpl(Unknown Source)

at java.awt.Component.dispatchEvent(Unknown Source)

at java.awt.EventQueue.dispatchEventImpl(Unknown Source)

at java.awt.EventQueue.access$300(Unknown Source)

at java.awt.EventQueue$3.run(Unknown Source)

at java.awt.EventQueue$3.run(Unknown Source)

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

at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)

at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)

at java.awt.EventQueue$4.run(Unknown Source)

at java.awt.EventQueue$4.run(Unknown Source)

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

at java.security.ProtectionDomain$1.doIntersectionPrivilege(Unknown Source)

at java.awt.EventQueue.dispatchEvent(Unknown Source)

at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)

at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)

at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)

at java.awt.EventDispatchThread.pumpEvents(Unknown Source)

at java.awt.EventDispatchThread.pumpEvents(Unknown Source)

at java.awt.EventDispatchThread.run(Unknown Source)

So, you run it as a program in Eclipse? maybe this class is only build into a jar when you build Spark, not run it in Eclipse. To build it you haave to run an Ant buildscript and then you can run Spark with /target/build/bin/startup.bat

Anyway, do you have an issue because of this error? Is Spark login window appear after you do a log out? If it does appear, then there is no problem and startup works fine. If it doesn’t appear, then i think it can’t work like this if you run it in Eclipse. Startup.jar is launching Spark after it has exited. If you exit a program which is running in Eclipse it can’t start itself again. I think.

If you still think this error shouldn’t be shown, then do you know how to fix it? You can propose a patch.

Thanks for your answering.For now ,I haven’t met any issues because of this error.I just afraid it may cause some problems.This problem only occurs when I run it in Eclipse.The spark can login or exit out normally when I run startup.bat.I got the point that startup.jar is launching Spark after it has exited.Thanks a lot.