//
you're reading...
Software

How to fix Eclipse and PreferenceConverter exception

I’m running Linux Mint on my desktop and I recently updated my eclipse version to new Juno. After that the Eclipse sometimes doesn’t want to start and I end up with frozen tiny dialog without any content which I’m not able to close and have to kill it. The issue lies somewhere deep in preferences of your workspace when eclipse sometimes can’t load your cached data. If something like this is happening to you as well try to check the log file of your current eclipse profile which you can find in YOUR_WORKSPACE/.metadata/.log – if you see some thing like the error below at the very bottom of this file then you are experiencing the same bug.

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:3529)
 at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3182)
 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)

So how to get rid of this? First of all kill the eclipse if its still running with:

ps -ax | grep eclipse
kill $id

And then delete the file which is breaking Eclipse:

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

That’s it – enjoy coding!

Discussion

5 thoughts on “How to fix Eclipse and PreferenceConverter exception

  1. Thanks!! This saved my time :)

    Posted by devipoo | August 6, 2013, 9:20 am
  2. Thanks for saving my life :)

    Posted by Eric | November 14, 2013, 7:30 am
  3. Hi

    This fixes it in the short term however you get the following error with autosaving:

    “Could not write metadata for ‘xxx/workspace/SMARTBUNDLES/.metadata/.plugins/org.eclipse.core.resources/.projects/v7-12-0_qa/.markers.snap (No such file or directory)”

    Posted by Kiren | December 2, 2014, 11:03 am
  4. It works for me. Thanks.

    Posted by Grzegorz G | January 1, 2015, 11:25 pm
  5. Cool fix. Thank buddy

    Posted by Rahmathullah | May 14, 2015, 1:55 pm

Leave a comment

Your email address will not be published. Required fields are marked *