Eclipse error upon start up

☆樱花仙子☆ 提交于 2020-01-23 05:44:04

问题


Eclipse won't work after my PC shutdown unexpectedly. Here is the error that corresponds to the log file written when I tried to run 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

回答1:


Try changing the workspace if that works. To force change workspace prompt, make following change.

<Eclipse_root_dir>\configuration\.settings\org.eclipse.ui.ide.prefs and set SHOW_WORKSPACE_SELECTION_DIALOG to true
  1. If that works, go to workspace\.metadata\.plugins\org.eclipse.core.resources and delete .snap file.

  2. If #2 does not work, try deleting workspace\.metadata\.plugins\org.eclipse.core.resources folder. Make sure you back it up, just in case it is needed in future.




回答2:


After about 30-45 minutes of heat n trials i found out there was a file in %eclipse_workspace%.metadata.plugins\org.eclipse.core.resources.root by extension ".tree". I removed it and it i could restart eclipse. Though all projects in my workspace got deleted




回答3:


Try deleting .snap folder created in plugins under .metadata folder. e.g. my workspace is at location -> C:\RawWorkspace\ .metadata will be at C:\RawWorkspace.metadata

You might need to delete .snap from below plugin - C:\RawWorkspace.metadata.plugins\org.eclipse.core.resources

I got error for Resource plugin. So I deleted .snap from resource plugin.




回答4:


I face the same issue and try many but one of the following worked in my case:

  1. just navigate to WorkSpace.metadata.plugins\org.eclipse.core.resources.root
  2. delete the *.tree file

Hopefully it work in your case - good luck.




回答5:


Deleting the .snap file works for me when i got the same issue as mentioned in the original post. workspace.metadata.plugins\org.eclipse.core.resources and delete .snap file.

Thanks!




回答6:


I had this same problem, option 1 from user1401472s answer worked for me Restoring the projects from the corrupted workspace was as simple as re-importing them from the old workspace into the new workspace via: file -> import -> General -> "Existing Projects From Workspace" and selecting the old workspace folder as the root-directory.

EDIT: this was on windows 10



来源:https://stackoverflow.com/questions/25397914/eclipse-error-upon-start-up

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!