4

I received an update today for my Eclipse (STS version 3.3.0). The update required eclipse to restart, but Eclipse kept failing to start. After checking the log file mentioned in the error message from GUI, I found this:

!ENTRY org.eclipse.osgi 4 0 2014-04-07 10:31:11.926
!MESSAGE Startup error
!STACK 1
java.lang.RuntimeException: Exception in org.eclipse.osgi.framework.internal.core.SystemBundleActivator.start() of bundle org.eclipse.osgi.
    at org.eclipse.osgi.framework.internal.core.InternalSystemBundle.resume(InternalSystemBundle.java:233)
    at org.eclipse.osgi.framework.internal.core.Framework.launch(Framework.java:656)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.startup(EclipseStarter.java:275)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:177)
    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)
Caused by: org.osgi.framework.BundleException: Exception in org.eclipse.osgi.framework.internal.core.SystemBundleActivator.start() of bundle org.eclipse.osgi.
    at org.eclipse.osgi.framework.internal.core.BundleContextImpl.startActivator(BundleContextImpl.java:734)
    at org.eclipse.osgi.framework.internal.core.BundleContextImpl.start(BundleContextImpl.java:683)
    at org.eclipse.osgi.framework.internal.core.InternalSystemBundle.resume(InternalSystemBundle.java:225)
    ... 10 more
Caused by: java.lang.IllegalStateException: The System Bundle could not be resolved: Another singleton version selected: org.eclipse.osgi_3.9.1.v20140110-1610
    at org.eclipse.osgi.internal.baseadaptor.BaseStorage.checkSystemState(BaseStorage.java:827)
    at org.eclipse.osgi.internal.baseadaptor.BaseStorage.getStateManager(BaseStorage.java:800)
    at org.eclipse.osgi.baseadaptor.BaseAdaptor.getState(BaseAdaptor.java:387)
    at org.eclipse.osgi.internal.baseadaptor.BaseStorage.frameworkStart(BaseStorage.java:923)
    at org.eclipse.osgi.baseadaptor.BaseAdaptor.frameworkStart(BaseAdaptor.java:250)
    at org.eclipse.osgi.framework.internal.core.SystemBundleActivator.start(SystemBundleActivator.java:60)
    at org.eclipse.osgi.framework.internal.core.BundleContextImpl$1.run(BundleContextImpl.java:711)
    at java.security.AccessController.doPrivileged(Native Method)
    at org.eclipse.osgi.framework.internal.core.BundleContextImpl.startActivator(BundleContextImpl.java:702)
    ... 12 more
Andrew Eisenberg
  • 28,387
  • 9
  • 92
  • 148
matt forsythe
  • 3,863
  • 1
  • 19
  • 29

3 Answers3

1

After digging around for a good couple of hours, I found that I had multiple org.eclipse.osgi_XXXXXXXXXXXXXXX.jar files in my plugins directory. I deleted org.eclipse.osgi_3.9.1.v20130814-1242.jar (which was previously my most recent one), and left org.eclipse.osgi_3.9.1.v20140110-1610.jar in place since the version number matched the one mentioned in the stacktrace. After that, Eclipse seems to start normally.

matt forsythe
  • 3,863
  • 1
  • 19
  • 29
  • I had the same duplicate versions of org.eclipse.osgi, but deleting the older 20130814 one lead to this: java.lang.ClassNotFoundException: org.eclipse.core.runtime.adaptor.EclipseStarter at java.net.URLClassLoader$1.run(URLClassLoader.java:366) at java.net.URLClassLoader$1.run(URLClassLoader.java:355) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:354) at java.lang.ClassLoader.loadClass(ClassLoader.java:425) at java.lang.ClassLoader.loadClass(ClassLoader.java:358) ... Also, this doesn't seem like a very good idea. – lmsurprenant Jul 17 '14 at 19:43
  • @lmsurprenant Of course it's not a good idea. :) But it does beat being dead in the water. Did you try running with the -clean option mentioned in the other answer? Also, try putting the 20130814 jar back and remove the new one. I just suspect it has something to do with some sort of version caching going on with Eclipse and you just have to do something to trigger a refresh. That's just a hunch, though... – matt forsythe Jul 17 '14 at 20:16
  • Thanks Matt. I did try the -clean option with no luck (but only after I had removed that jar). Next I put the 20130814 one back in and deleted the newer one and it worked! This was not too complicated of an Eclipse install and so I think I will try to reproduce the error and open bug report...will put update here if I succeed. – lmsurprenant Jul 17 '14 at 21:50
  • No luck here either...couldn't reproduce. – lmsurprenant Jul 17 '14 at 22:03
  • @lmsurprenant That's too bad - would be nice to track this down and get it logged with them. Gotta love those intermittent problems. Thanks for trying... – matt forsythe Jul 17 '14 at 22:05
0

After more research, it also seems likely that running eclipse.exe with the -clean option may clear the problem up as well. However, I can no longer reproduce the problem to test this theory.

matt forsythe
  • 3,863
  • 1
  • 19
  • 29
  • Hello. I tried it and does not work... not even with "-refresh". I had to remove the file, which in my case is the v20140110... version (newer than the one I'm leaving, so I'm not too happy) – icordoba May 23 '14 at 22:48
  • 1
    @icordoba Bummer. I found that when I used the other solution (removing the file) that once I got Eclipse to start normally by removing the file, I could put everything back and it would still start normally. Once you have Eclipse starting successfully again, you may want to try putting your newer jar back and see if it continues to start... – matt forsythe May 27 '14 at 18:14
  • @mattforsythe Same here...I was able to put the other one back in and it still works. Which means I couldn't reproduce the original error either. – lmsurprenant Jul 17 '14 at 22:05
0

I installed Eclipse by using eclipse-inst-win64.exe and that fixed the problem for me:

enter image description here

Jaime Montoya
  • 6,915
  • 14
  • 67
  • 103