Sunday, January 5, 2014

Spring STS doesn't start up after many months of use

The problem:


After many months of using Spring STS IDE, I tried to reload the program but it always fails without any notifications or error messages. Even the "-clean" option failed to work.

When I insepected the log file found in the workspace/.metadata/log I noticed the following error:



 !ENTRY org.eclipse.core.jobs 2 2 2014-01-06 07:44:26.601  
 !MESSAGE Job found still running after platform shutdown. Jobs should be canceled by the plugin that scheduled them during shutdown: org.eclipse.core.internal.refresh.RefreshJob  
 !ENTRY org.eclipse.core.jobs 2 2 2014-01-06 07:44:26.601  
 !MESSAGE Job found still running after platform shutdown. Jobs should be canceled by the plugin that scheduled them during shutdown: org.eclipse.core.internal.refresh.RefreshJob  
 !ENTRY org.eclipse.ui 4 0 2014-01-06 07:44:26.602  
 !MESSAGE Error occurred during status handling  
 !STACK 0  
 java.lang.NullPointerException  
      at org.eclipse.ui.internal.statushandlers.StatusHandlerRegistry.<init>(StatusHandlerRegistry.java:61)  
      at org.eclipse.ui.internal.statushandlers.StatusHandlerRegistry.getDefault(StatusHandlerRegistry.java:91)  
      at org.eclipse.ui.statushandlers.StatusManager.getStatusHandler(StatusManager.java:135)  
      at org.eclipse.ui.statushandlers.StatusManager.handle(StatusManager.java:189)  
      at org.eclipse.ui.statushandlers.StatusManager.handle(StatusManager.java:231)  
      at org.eclipse.ui.statushandlers.StatusManager$StatusManagerLogListener.logging(StatusManager.java:305)  
      at org.eclipse.core.internal.runtime.RuntimeLog.logToListeners(RuntimeLog.java:160)  
      at org.eclipse.core.internal.runtime.PlatformLogWriter.logged(PlatformLogWriter.java:100)  
      at org.eclipse.equinox.log.internal.ExtendedLogReaderServiceFactory.safeLogged(ExtendedLogReaderServiceFactory.java:86)  
      at org.eclipse.equinox.log.internal.ExtendedLogReaderServiceFactory.logPrivileged(ExtendedLogReaderServiceFactory.java:205)  
      at org.eclipse.equinox.log.internal.ExtendedLogReaderServiceFactory.log(ExtendedLogReaderServiceFactory.java:178)  
      at org.eclipse.equinox.log.internal.ExtendedLogServiceFactory.log(ExtendedLogServiceFactory.java:65)  
      at org.eclipse.equinox.log.internal.ExtendedLogServiceImpl.log(ExtendedLogServiceImpl.java:87)  
      at org.eclipse.equinox.log.internal.LoggerImpl.log(LoggerImpl.java:54)  
      at org.eclipse.core.internal.runtime.PlatformLogWriter.logging(PlatformLogWriter.java:43)  
      at org.eclipse.core.internal.runtime.RuntimeLog.log(RuntimeLog.java:96)  
      at org.eclipse.core.internal.jobs.JobManager.doShutdown(JobManager.java:606)  
      at org.eclipse.core.internal.jobs.JobManager.shutdown(JobManager.java:252)  
      at org.eclipse.core.internal.jobs.JobActivator.stop(JobActivator.java:55)  
      at org.eclipse.osgi.framework.internal.core.BundleContextImpl$2.run(BundleContextImpl.java:771)  
      at java.security.AccessController.doPrivileged(Native Method)  
      at org.eclipse.osgi.framework.internal.core.BundleContextImpl.stop(BundleContextImpl.java:764)  
      at org.eclipse.osgi.framework.internal.core.BundleHost.stopWorker(BundleHost.java:510)  
      at org.eclipse.osgi.framework.internal.core.AbstractBundle.suspend(AbstractBundle.java:566)  
      at org.eclipse.osgi.framework.internal.core.Framework.suspendBundle(Framework.java:1206)  
      at org.eclipse.osgi.framework.internal.core.StartLevelManager.decFWSL(StartLevelManager.java:592)  
      at org.eclipse.osgi.framework.internal.core.StartLevelManager.doSetStartLevel(StartLevelManager.java:257)  
      at org.eclipse.osgi.framework.internal.core.StartLevelManager.shutdown(StartLevelManager.java:215)  
      at org.eclipse.osgi.framework.internal.core.InternalSystemBundle.suspend(InternalSystemBundle.java:284)  
      at org.eclipse.osgi.framework.internal.core.Framework.shutdown(Framework.java:692)  
      at org.eclipse.osgi.framework.internal.core.Framework.close(Framework.java:600)  
      at org.eclipse.core.runtime.adaptor.EclipseStarter.shutdown(EclipseStarter.java:400)  
      at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:200)  
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)  
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)  
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)  
      at java.lang.reflect.Method.invoke(Method.java:601)  
      at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:636)  
      at org.eclipse.equinox.launcher.Main.basicRun(Main.java:591)  
      at org.eclipse.equinox.launcher.Main.run(Main.java:1450)  
      at org.eclipse.equinox.launcher.Main.main(Main.java:1426)  

Solution

It appears that it may have gotten itself into a bad state. To reset this persisted state we can use the "-cleanPersistedState" option, when launching the application.


Reference: http://stackoverflow.com/questions/15372023/eclipse-will-not-start-and-i-havent-changed-anything