启动时出现Eclipse错误

时间:2014-08-20 06:17:50

标签: eclipse eclipse-kepler

Eclipse意外停机后,Eclipse无法正常工作。这是与我尝试运行Eclipse时写入的日志文件相对应的错误。

!SESSION 2014-08-20 14:05:14.763 -----------------------------------------------
eclipse.buildId=4.3.0.M20130911-1000
java.version=1.7.0_45
java.vendor=Oracle Corporation
BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=en_US
Framework arguments:  -product org.eclipse.epp.package.jee.product
Command-line arguments:  -os win32 -ws win32 -arch x86 -product        
org.eclipse.epp.package.jee.product

!ENTRY org.eclipse.osgi 4 0 2014-08-20 14:05:18.319
!MESSAGE An error occurred while automatically activating bundle       
org.eclipse.core.resources (82).
!STACK 0
org.osgi.framework.BundleException: Exception in org.eclipse.core.resources.ResourcesPlugin.start() of bundle org.eclipse.core.resources.
    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.BundleHost.startWorker(BundleHost.java:381)
    at org.eclipse.osgi.framework.internal.core.AbstractBundle.start(AbstractBundle.java:300)
    at org.eclipse.osgi.framework.util.SecureAction.start(SecureAction.java:478)
    at org.eclipse.osgi.internal.loader.BundleLoader.setLazyTrigger(BundleLoader.java:263)
    at org.eclipse.core.runtime.internal.adaptor.EclipseLazyStarter.postFindLocalClass(EclipseLazyStarter.java:109)
    at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLocalClass(ClasspathManager.java:469)
    at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.findLocalClass(DefaultClassLoader.java:216)
    at org.eclipse.osgi.internal.loader.BundleLoader.findLocalClass(BundleLoader.java:395)
    at org.eclipse.osgi.internal.loader.SingleSourcePackage.loadClass(SingleSourcePackage.java:35)
    at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:461)
    at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:421)
    at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:412)
    at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:107)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:125)
    at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
    at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
    at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:354)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:181)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    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.eclipse.core.internal.resources.ResourceException: Problems reading project tree.
    at org.eclipse.core.internal.resources.WorkspaceTreeReader_2.readTree(WorkspaceTreeReader_2.java:125)
    at org.eclipse.core.internal.resources.SaveManager.restoreTree(SaveManager.java:1000)
    at org.eclipse.core.internal.resources.SaveManager.restore(SaveManager.java:687)
    at org.eclipse.core.internal.resources.SaveManager.startup(SaveManager.java:1530)
    at org.eclipse.core.internal.resources.Workspace.startup(Workspace.java:2503)
    at org.eclipse.core.internal.resources.Workspace.open(Workspace.java:2252)
    at org.eclipse.core.resources.ResourcesPlugin.start(ResourcesPlugin.java:439)
    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)
    ... 28 more
Caused by: java.io.IOException: Unknown format.
    at org.eclipse.core.internal.watson.ElementTreeReader.getReader(ElementTreeReader.java:76)
    at org.eclipse.core.internal.watson.ElementTreeReader.readDelta(ElementTreeReader.java:85)
    at org.eclipse.core.internal.watson.ElementTreeReaderImpl_1.readDeltaChain(ElementTreeReaderImpl_1.java:88)
    at org.eclipse.core.internal.watson.ElementTreeReader.readDeltaChain(ElementTreeReader.java:110)
    at org.eclipse.core.internal.resources.WorkspaceTreeReader_1.readTrees(WorkspaceTreeReader_1.java:233)
    at org.eclipse.core.internal.resources.WorkspaceTreeReader_2.readTree(WorkspaceTreeReader_2.java:104)
    ... 37 more
Root exception:
org.eclipse.core.internal.resources.ResourceException(null)[567]: java.io.IOException: Unknown format.
    at org.eclipse.core.internal.watson.ElementTreeReader.getReader(ElementTreeReader.java:76)
    at org.eclipse.core.internal.watson.ElementTreeReader.readDelta(ElementTreeReader.java:85)
    at org.eclipse.core.internal.watson.ElementTreeReaderImpl_1.readDeltaChain(ElementTreeReaderImpl_1.java:88)
    at org.eclipse.core.internal.watson.ElementTreeReader.readDeltaChain(ElementTreeReader.java:110)
    at org.eclipse.core.internal.resources.WorkspaceTreeReader_1.readTrees(WorkspaceTreeReader_1.java:233)
    at org.eclipse.core.internal.resources.WorkspaceTreeReader_2.readTree(WorkspaceTreeReader_2.java:104)
    at org.eclipse.core.internal.resources.SaveManager.restoreTree(SaveManager.java:1000)
    at org.eclipse.core.internal.resources.SaveManager.restore(SaveManager.java:687)
    at org.eclipse.core.internal.resources.SaveManager.startup(SaveManager.java:1530)
    at org.eclipse.core.internal.resources.Workspace.startup(Workspace.java:2503)
    at org.eclipse.core.internal.resources.Workspace.open(Workspace.java:2252)
    at org.eclipse.core.resources.ResourcesPlugin.start(ResourcesPlugin.java:439)
    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)
    at org.eclipse.osgi.framework.internal.core.BundleContextImpl.start(BundleContextImpl.java:683)
    at org.eclipse.osgi.framework.internal.core.BundleHost.startWorker(BundleHost.java:381)
    at org.eclipse.osgi.framework.internal.core.AbstractBundle.start(AbstractBundle.java:300)
    at org.eclipse.osgi.framework.util.SecureAction.start(SecureAction.java:478)
    at org.eclipse.osgi.internal.loader.BundleLoader.setLazyTrigger(BundleLoader.java:263)
    at org.eclipse.core.runtime.internal.adaptor.EclipseLazyStarter.postFindLocalClass(EclipseLazyStarter.java:109)
    at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLocalClass(ClasspathManager.java:469)
    at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.findLocalClass(DefaultClassLoader.java:216)
    at org.eclipse.osgi.internal.loader.BundleLoader.findLocalClass(BundleLoader.java:395)
    at org.eclipse.osgi.internal.loader.SingleSourcePackage.loadClass(SingleSourcePackage.java:35)
    at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:461)
    at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:421)
    at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:412)
    at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:107)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:125)
    at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
    at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
    at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:354)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:181)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    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)

!ENTRY org.eclipse.osgi 4 0 2014-08-20 14:05:18.336
!MESSAGE Application error
!STACK 1
java.lang.NoClassDefFoundError: org/eclipse/core/resources/IContainer
    at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:125)
    at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
    at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
    at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:354)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:181)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    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.eclipse.core.runtime.internal.adaptor.EclipseLazyStarter$TerminatingClassNotFoundException: An error occurred while automatically activating bundle org.eclipse.core.resources (82).
    at org.eclipse.core.runtime.internal.adaptor.EclipseLazyStarter.postFindLocalClass(EclipseLazyStarter.java:124)
    at org.eclipse.osgi.baseadaptor.loader.ClasspathManager.findLocalClass(ClasspathManager.java:469)
    at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.findLocalClass(DefaultClassLoader.java:216)
    at org.eclipse.osgi.internal.loader.BundleLoader.findLocalClass(BundleLoader.java:395)
    at org.eclipse.osgi.internal.loader.SingleSourcePackage.loadClass(SingleSourcePackage.java:35)
    at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:461)
    at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:421)
    at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:412)
    at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:107)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    ... 13 more
Caused by: org.osgi.framework.BundleException: Exception in org.eclipse.core.resources.ResourcesPlugin.start() of bundle org.eclipse.core.resources.
    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.BundleHost.startWorker(BundleHost.java:381)
    at org.eclipse.osgi.framework.internal.core.AbstractBundle.start(AbstractBundle.java:300)
    at org.eclipse.osgi.framework.util.SecureAction.start(SecureAction.java:478)
    at org.eclipse.osgi.internal.loader.BundleLoader.setLazyTrigger(BundleLoader.java:263)
    at org.eclipse.core.runtime.internal.adaptor.EclipseLazyStarter.postFindLocalClass(EclipseLazyStarter.java:109)
    ... 22 more
Caused by: org.eclipse.core.internal.resources.ResourceException: Problems reading project tree.
    at org.eclipse.core.internal.resources.WorkspaceTreeReader_2.readTree(WorkspaceTreeReader_2.java:125)
    at org.eclipse.core.internal.resources.SaveManager.restoreTree(SaveManager.java:1000)
    at org.eclipse.core.internal.resources.SaveManager.restore(SaveManager.java:687)
    at org.eclipse.core.internal.resources.SaveManager.startup(SaveManager.java:1530)
    at org.eclipse.core.internal.resources.Workspace.startup(Workspace.java:2503)
    at org.eclipse.core.internal.resources.Workspace.open(Workspace.java:2252)
    at org.eclipse.core.resources.ResourcesPlugin.start(ResourcesPlugin.java:439)
    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)
    ... 28 more
Caused by: java.io.IOException: Unknown format.
    at org.eclipse.core.internal.watson.ElementTreeReader.getReader(ElementTreeReader.java:76)
    at org.eclipse.core.internal.watson.ElementTreeReader.readDelta(ElementTreeReader.java:85)
    at org.eclipse.core.internal.watson.ElementTreeReaderImpl_1.readDeltaChain(ElementTreeReaderImpl_1.java:88)
    at org.eclipse.core.internal.watson.ElementTreeReader.readDeltaChain(ElementTreeReader.java:110)
    at org.eclipse.core.internal.resources.WorkspaceTreeReader_1.readTrees(WorkspaceTreeReader_1.java:233)
    at org.eclipse.core.internal.resources.WorkspaceTreeReader_2.readTree(WorkspaceTreeReader_2.java:104)
    ... 37 more

5 个答案:

答案 0 :(得分:9)

如果有效,请尝试更改工作区。要强制更改工作区提示,请进行以下更改。

<Eclipse_root_dir>\configuration\.settings\org.eclipse.ui.ide.prefs and set SHOW_WORKSPACE_SELECTION_DIALOG to true
  1. 如果可行,请转到workspace \ .metadata \ .plugins \ org.eclipse.core.resources并删除.snap文件。

  2. 如果#2不起作用,请尝试删除workspace \ .metadata \ .plugins \ org.eclipse.core.resources文件夹。 请确保备份,以防将来需要。

答案 1 :(得分:2)

经过大约30-45分钟的试验后,我发现%eclipse_workspace%.metadata.plugins \ org.eclipse.core.resources.root中有一个文件,扩展名为#34; .tree&#34;。我删除了它,我可以重新启动eclipse。虽然我的工作区中的所有项目都已删除

答案 2 :(得分:0)

我面临同样的问题并尝试了很多,但以下其中一项工作在我的案例中:

  1. 只是导航到 WorkSpace.metadata.plugins \ org.eclipse.core.resources.root
  2. 删除* .tree文件
  3. 希望它适用于你的情况 - 祝你好运。

答案 3 :(得分:0)

当我遇到与原始帖子中提到的相同的问题时,删除.snap文件对我有用。 workspace.metadata.plugins \ org.eclipse.core.resources并删除.snap文件。

谢谢!

答案 4 :(得分:0)

我遇到了同样的问题,user1401472s答案的选项1对我有用 从损坏的工作区中还原项目就像通过以下方式将它们从旧工作区重新导入到新工作区中一样简单:文件->导入->常规->“现有工作区中的项目”,然后选择旧工作区文件夹作为根目录-目录。

编辑:这是在Windows 10上