97

When I launch Eclipse, it does not start.
An error appears and tells me to see the log file.
"See the log file: /Users/max/work/projects/.metadata/.log"

OS: MacOS 10.7.4
Eclipse: 4.2 Juno
ADT: 20

My old version of Eclipse starts without issue.

!SESSION 2012-07-03 16:22:48.261 -----------------------------------------------
eclipse.buildId=I20120608-1400
java.version=1.6.0_33
java.vendor=Apple Inc.
BootLoader constants: OS=macosx, ARCH=x86_64, WS=cocoa, NL=ru_RU
Framework arguments:  -product org.eclipse.epp.package.java.product -keyring /Users/max/.eclipse_keyring -showlocation
Command-line arguments:  -os macosx -ws cocoa -arch x86_64 -product org.eclipse.epp.package.java.product -keyring /Users/max/.eclipse_keyring -showlocation

!ENTRY org.eclipse.core.resources 2 10035 2012-07-03 16:22:50.101
!MESSAGE The workspace exited with unsaved changes in the previous session; refreshing workspace to recover changes.

!ENTRY org.eclipse.equinox.preferences 4 2 2012-07-03 16:22:56.457
!MESSAGE Problems occurred when invoking code from plug-in: "org.eclipse.equinox.preferences".
!STACK 0
java.lang.ExceptionInInitializerError
at org.eclipse.wb.internal.core.preferences.PreferenceInitializer.initializeDefaultPreferences(    PreferenceInitializer.java:50)
at org.eclipse.core.internal.preferences.PreferenceServiceRegistryHelper$1.run(PreferenceServiceRegistryHelper.java:300)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
at org.eclipse.core.internal.preferences.PreferenceServiceRegistryHelper.runInitializer(PreferenceServiceRegistryHelper.java:303)
at org.eclipse.core.internal.preferences.PreferenceServiceRegistryHelper.applyRuntimeDefaults(PreferenceServiceRegistryHelper.java:131)
at org.eclipse.core.internal.preferences.PreferencesService.applyRuntimeDefaults(PreferencesService.java:368)
at org.eclipse.core.internal.preferences.DefaultPreferences.applyRuntimeDefaults(DefaultPreferences.java:166)
at org.eclipse.core.internal.preferences.DefaultPreferences.load(DefaultPreferences.java:237)
at org.eclipse.core.internal.preferences.EclipsePreferences.create(EclipsePreferences.java:410)
at org.eclipse.core.internal.preferences.EclipsePreferences.internalNode(EclipsePreferences.java:663)
at org.eclipse.core.internal.preferences.EclipsePreferences.node(EclipsePreferences.java:805)
at org.eclipse.core.internal.preferences.AbstractScope.getNode(AbstractScope.java:38)
at org.eclipse.core.runtime.preferences.DefaultScope.getNode(DefaultScope.java:76)
at org.eclipse.ui.preferences.ScopedPreferenceStore.getDefaultPreferences(ScopedPreferenceStore.java:250)
at org.eclipse.ui.preferences.ScopedPreferenceStore.getPreferenceNodes(ScopedPreferenceStore.java:285)
at org.eclipse.ui.preferences.ScopedPreferenceStore.internalGet(ScopedPreferenceStore.java:475)
at org.eclipse.ui.preferences.ScopedPreferenceStore.getBoolean(ScopedPreferenceStore.java:387)
at org.eclipse.wb.internal.core.editor.describer.JavaSourceUiDescriber.isGUISource(JavaSourceUiDescriber.java:65)
at org.eclipse.wb.internal.core.editor.describer.JavaSourceUiDescriber.describe(JavaSourceUiDescriber.java:52)
at org.eclipse.core.internal.content.ContentTypeCatalog.describe(ContentTypeCatalog.java:218)
at org.eclipse.core.internal.content.ContentTypeCatalog.collectMatchingByContents(ContentTypeCatalog.java:190)
at org.eclipse.core.internal.content.ContentTypeCatalog.internalFindContentTypesFor(ContentTypeCatalog.java:403)
at org.eclipse.core.internal.content.ContentTypeCatalog.internalFindContentTypesFor(ContentTypeCatalog.java:450)
at org.eclipse.core.internal.content.ContentTypeCatalog.getDescriptionFor(ContentTypeCatalog.java:346)
at org.eclipse.core.internal.content.ContentTypeCatalog.getDescriptionFor(ContentTypeCatalog.java:360)
at org.eclipse.core.internal.content.ContentTypeMatcher.getDescriptionFor(ContentTypeMatcher.java:86)
at org.eclipse.core.internal.resources.ContentDescriptionManager.readDescription(ContentDescriptionManager.java:445)
at org.eclipse.core.internal.resources.ContentDescriptionManager.getDescriptionFor(ContentDescriptionManager.java:355)
at org.eclipse.core.internal.resources.File.internalGetCharset(File.java:246)
at org.eclipse.core.internal.resources.File.getCharset(File.java:207)
at org.eclipse.core.internal.resources.File.getCharset(File.java:194)
at org.eclipse.jdt.internal.core.util.Util.getResourceContentsAsCharArray(Util.java:1156)
at org.eclipse.jdt.internal.core.builder.SourceFile.getContents(SourceFile.java:79)
at org.eclipse.jdt.internal.compiler.ReadManager.run(ReadManager.java:173)
at java.lang.Thread.run(Thread.java:680)
Caused by: org.eclipse.swt.SWTException: Invalid thread access
at org.eclipse.swt.SWT.error(SWT.java:4361)
at org.eclipse.swt.SWT.error(SWT.java:4276)
at org.eclipse.swt.SWT.error(SWT.java:4247)
at org.eclipse.swt.widgets.Display.error(Display.java:1068)
at org.eclipse.swt.widgets.Display.checkDevice(Display.java:621)
at org.eclipse.swt.graphics.Device.getSystemFont(Device.java:476)
at org.eclipse.jface.preference.PreferenceConverter.<clinit>(PreferenceConverter.java:84)
... 35 more

!ENTRY org.eclipse.osgi 4 0 2012-07-03 16:22:59.978
!MESSAGE Application error
!STACK 1
java.lang.NoClassDefFoundError: Could not initialize class org.eclipse.jface.preference.PreferenceConverter
at org.eclipse.ui.internal.themes.ThemeElementHelper.installFont(ThemeElementHelper.java:103)
at org.eclipse.ui.internal.themes.ThemeElementHelper.populateRegistry(ThemeElementHelper.java:59)
at org.eclipse.ui.internal.Workbench$27.runWithException(Workbench.java:1550)
at org.eclipse.ui.internal.StartupThreading$StartupRunnable.run(StartupThreading.java:31)
at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35)
at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:135)
at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:3944)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3621)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2478)
at org.eclipse.ui.internal.Workbench.access$7(Workbench.java:2386)
at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:583)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:540)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:124)
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:353)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:180)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:629)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:584)
at org.eclipse.equinox.launcher.Main.run(Main.java:1438)

!ENTRY org.eclipse.core.jobs 4 2 2012-07-03 16:23:05.824
!MESSAGE An internal error occurred during: "Android Library Update".
!STACK 0
java.lang.NullPointerException
at com.android.ide.eclipse.adt.AdtPlugin.getOutStream(AdtPlugin.java:1714)
at com.android.ide.eclipse.adt.internal.project.LibraryClasspathContainerInitializer.allocateLibraryContainer(LibraryClasspathContainerInitializer.java:264)
at com.android.ide.eclipse.adt.internal.project.LibraryClasspathContainerInitializer.updateProjects(LibraryClasspathContainerInitializer.java:81)
at com.android.ide.eclipse.adt.internal.sdk.Sdk$3$1.run(Sdk.java:1197)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)

!ENTRY com.android.ide.eclipse.adt 4 0 2012-07-03 16:23:05.998
!MESSAGE parseSdkContent failed
!STACK 0
java.lang.NullPointerException
at com.android.ide.eclipse.adt.AdtPlugin.getDisplay(AdtPlugin.java:334)
at com.android.ide.eclipse.adt.AdtPlugin$7.run(AdtPlugin.java:1422)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)

!ENTRY org.eclipse.core.jobs 2 2 2012-07-03 16:23:06.504
!MESSAGE Job found still running after platform shutdown.  Jobs should be canceled by the plugin that scheduled them during shutdown: com.android.ide.eclipse.adt.internal.sdk.Sdk$5

!ENTRY org.eclipse.core.jobs 2 2 2012-07-03 16:23:06.505
!MESSAGE Job found still running after platform shutdown.  Jobs should be canceled by the plugin that scheduled them during shutdown: com.android.ide.eclipse.adt.internal.sdk.Sdk$5
5
  • Have you updated your eclipse ?
    – Amit
    Jul 3, 2012 at 12:34
  • I'm in a new folder, install a new Eclipse: /Application/eclipse - old /Application/eclipse4 - new Jul 3, 2012 at 12:36
  • go to the help menu and click on "Check for updates", update it and than try... That worked for me...But since it is not even starting for you.. I think you need to re install it...
    – Amit
    Jul 3, 2012 at 12:39
  • 4
    Please carefully read my question - eclipse does not start. Jul 3, 2012 at 12:46
  • I have this bug too. It makes me want to switch to M$. I am on windows, so the OS does nto seem to matter. Jul 17, 2012 at 8:11

13 Answers 13

203

that fixed it for me:

rm YOUR_WORKSPACE/.metadata/.plugins/org.eclipse.core.resources/.snap

credit: http://www.metod.si/job-found-still-running-after-platform-shutdown-eclipse/

9
  • 1
    Huge:~ max$ ls -la work/projects/.metadata/.plugins/org.eclipse.core.resources/.snap ls: work/projects/.metadata/.plugins/org.eclipse.core.resources/.snap: No such file or directory Jul 3, 2012 at 13:16
  • very strange - can you do a ls -la work/projects/.metadata ?
    – ligi
    Jul 3, 2012 at 13:19
  • Huge:~ max$ ls -la work/projects/.metadata total 2368 drwxr-xr-x 8 max staff 272 3 июл 15:18 . drwxr-xr-x 14 max staff 476 30 июн 00:54 .. -rw-r--r-- 1 max staff 1029117 3 июл 15:18 .bak_0.log -rw-r--r-- 1 max staff 0 15 июн 21:27 .lock -rw-r--r-- 1 max staff 172551 3 июл 17:17 .log drwxr-xr-x 7 max staff 238 3 июл 16:52 .mylyn drwxr-xr-x 37 max staff 1258 29 июн 15:29 .plugins -rw-r--r-- 1 max staff 26 3 июл 17:16 version.ini Jul 3, 2012 at 13:37
  • 1
    This works for me, but I don't really understand why. What is this .snap file?
    – Ida
    Feb 26, 2013 at 4:29
  • 1
    I think ist kind of a snapshot file which sometimes is corrupted
    – ligi
    Feb 26, 2013 at 10:08
158

Deleting .metadata/.plugins/org.eclipse.e4.workbench/workbench.xmi solved the problem in my case.

4
  • 4
    this worked for me (removing org.eclipse.core.resources resulted in eclipse still not opening), but what information have i lost by removing this file, and is there a way to recover it from the file?
    – inor
    Oct 10, 2012 at 5:55
  • Thanks a lot..Works for me :) Even I dint have .snap file..Thanks a ton
    – aasha
    Mar 15, 2013 at 6:11
  • 2
    .Snap file exists only while Eclipse is opened. If the file still there when eclipse is closed, you have to remove it. If you remove workbench file, you will lose the Eclipse layout. Anyway, removing workbench.xmi solves the problem.
    – Milton
    Mar 27, 2013 at 12:00
  • 1
    Genius! Fixed my Kepler SR1 (4.3?) after my sleeping computer lost power over the Thanksgiving weekend.
    – Eric L.
    Dec 2, 2013 at 13:09
40

I had to delete both of the following files as suggested in other answers to solve my issue,

  • .metadata/.plugins/org.eclipse.core.resources/.snap
  • .metadata/.plugins/org.eclipse.e4.workbench/workbench.xmi
2
  • 2
    This worked for me on a Win7 box. Java 1.6u43. How much does IntelliJ cost again? ;-) Mar 13, 2013 at 14:54
  • This work for me in win7 and Kepler Service Release 2 Mar 31, 2015 at 20:10
27

Running eclipse from the command line with the -clearPersistedState switch fixed it for me:

$> eclipse -clearPersistedState
3
  • worked for me as well, however I deleted folders mentioned in: stackoverflow.com/a/13620144/1581069 first (not sure if that was required as well) Nov 13, 2014 at 10:54
  • Deleting the folders aren't required. Just plug this flag into the command line, and you have your Eclipse set up. You still need to reorganize your Eclipse perspectives. Oct 20, 2020 at 0:50
  • worked for me as well!! Jun 20, 2022 at 15:20
10

Unfortunately, it did not work for me since I did not have .snap under

<home>/.metadata/.plugins/org.eclipse.core.resources

I ended up with the following sequence:

cd <home>/.metadata
mv .plugins .plugins.failing
<start eclipse>
<exit eclipse>  <--- builds fresh .plugins
cp -r .plugins.failing/org.eclipse.core.resources .plugins/org.eclipse.core.resources  <-- restores existing projects
1
  • I too didn't had .snap folder in my workspace.. This solved the issue for me for sometimes.. It again props up often.. Oct 18, 2012 at 3:37
4

Here's what helped me solve my problem:

https://bugs.eclipse.org/bugs/show_bug.cgi?id=389738

1
  • Thanks. This worked for me too for eclipse Juno available with Android SDK download.
    – prashant
    Jan 6, 2013 at 11:46
1

I had a similar problem but on Win7 - 64. Deleting the .snap file allowed me into Eclipse and then I had to refresh my resource file via File-->Refresh.

The snap file is located: YOUR_PROJECT_DIR/.metadata/.plugins/org.eclipse.core.resources/.snap

0
1

I had the same problem twice on Windows: Eclipse didn't start because of the ADT plugin.

I removed temporary files and cleaned up Registry using CCleaner. Then it worked.

0

I had to reinstall my mercurial plugin, that was the underlying issue for me.

0

With me, the loader froze on MyLyn. Finding another issue somewhere said to try deleting the stuff .metadata/.mylyn under the workspace directory gave me the ability to load my workspace again

0

I just did a restart to the system and it started working fine.

0

If you look in the eclipse.app content check if there is still eclipse.ini found that some updates destroy this file...

That was the reason on my system, copied it from a new version and it worked again...

1
  • Alright I'm getting bored of this - please remove the salutations from your questions and answers, they are just noise on SO.
    – jonrsharpe
    Mar 17, 2015 at 17:04
-3

rm -f ~/.eclipse/ is what worked for me!

1
  • 1
    Please describe what this does and how it solves the problem. Without doing so, this would only be suitable as a comment, not an answer. Nov 27, 2013 at 0:28

Not the answer you're looking for? Browse other questions tagged or ask your own question.