由于加载系统包时出现异常,更新后Eclipse(STS)无法启动

由于加载系统包时出现异常,更新后Eclipse(STS)无法启动,eclipse,sts-springsourcetoolsuite,Eclipse,Sts Springsourcetoolsuite,我今天收到了Eclipse(STS版本3.3.0)的更新。更新要求eclipse重新启动,但eclipse始终无法启动。在检查GUI错误消息中提到的日志文件后,我发现: !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

我今天收到了Eclipse(STS版本3.3.0)的更新。更新要求eclipse重新启动,但eclipse始终无法启动。在检查GUI错误消息中提到的日志文件后,我发现:

!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

在仔细研究了几个小时之后,我发现我的插件目录中有多个
org.eclipse.osgi_uuxxxxxxxxxxxxx.jar
文件。我删除了
org.eclipse.osgi_3.9.1.v20130814-1242.jar
(这是我以前的最新版本),并保留了
org.eclipse.osgi_3.9.1.v201410-1610.jar
,因为版本号与stacktrace中提到的版本号匹配。在那之后,Eclipse似乎正常启动。

经过更多的研究之后,似乎使用
-clean
选项运行
Eclipse.exe
也可以解决问题。但是,我无法再重现这个问题来测试这个理论。

我使用Eclipse-inst-win64.exe安装了Eclipse,这为我解决了这个问题:


你好。我试过了,但不起作用。。。即使是“刷新”也不行。我必须删除该文件,在我的例子中是v20140110。。。版本(比我要离开的版本更新,所以我不太高兴)@icordoba Bummer。我发现,当我使用另一种解决方案(删除文件)时,一旦我通过删除文件使Eclipse正常启动,我就可以将所有内容放回原处,并且它仍然可以正常启动。一旦Eclipse再次成功启动,您可能希望尝试将较新的jar放回原处,看看它是否继续启动…@mattforsyth这里也是一样的…我能够将另一个放回原处,它仍然可以工作。这意味着我也无法重现原始错误。我有相同的org.eclipse.osgi重复版本,但删除较旧的20130814会导致以下情况:java.lang.ClassNotFoundException:org.eclipse.core.runtime.adapter.EclipseStarter位于java.net.URLClassLoader$1.run(URLClassLoader.java:366)位于java.net.URLClassLoader$1.runjava.net.URLClassLoader.findClass(URLClassLoader.java:354)java.lang.ClassLoader.loadClass(ClassLoader.java:425)java.lang.ClassLoader.loadClass(ClassLoader.java:358)的java.security.AccessController.doPrivileged(本机方法)……而且,这似乎不是一个好主意。@lmsurprenant当然不是一个好主意。:)但这确实比死在水里要好。您是否尝试过使用另一个答案中提到的-clean选项运行?另外,试着把20130814罐子放回原处,然后取下新的。我只是怀疑它与Eclipse中正在进行的某种版本缓存有关,您只需要做一些事情来触发刷新。这只是一种预感,谢谢马特。我确实尝试了-clean选项,但没有运气(但只是在我移除了那个罐子之后)。下一步,我把20130814一个放回,删除了新的一个,它工作了!这对于Eclipse安装来说并不太复杂,因此我想我会尝试复制错误并打开错误报告…如果我成功,会将更新放在这里。这里也没有运气…无法复制。@LMSUPPRENANT这太糟糕了-很高兴跟踪到这一点并与他们一起记录。我喜欢那些间歇性的问题。谢谢你的努力。。。