Home > eclipse > Repair eclipse workbench – corrupted eclipse workspace

Repair eclipse workbench – corrupted eclipse workspace

My workbench often gets corrupted, and all good advice on the net does not work, since the hints there are based on the fact, that eclipse starts up. But what happens, if eclipse refuses to start due to the corrupted workbench (the usual situation I have)?

First of all, check the log message. You’ll find your eclispe-log in your workbench-folder. It’s named “.metadata”. In this folder you’ll find a file called “.log”. Open this file and see if you can get some usefull information from there. Here is the file I just got today:

!ENTRY org.eclipse.osgi 4 0 2009-06-25 18:56:21.330
!MESSAGE Application error
!STACK 1
org.apache.commons.lang.exception.NestableError: Java Model Exception: Java Model Status [src/net/project/windows [in project] does not exist]
	at com.instantiations.designer.core.utils.execution.ExecutionUtils.runRethrow(ExecutionUtils.java:66)
	at com.instantiations.designer.core.editor.DesignPage.initialize(DesignPage.java:96)
	at com.instantiations.designer.core.editor.multi.MultiMode.create(MultiMode.java:74)
	at com.instantiations.designer.core.editor.multi.MultiPagesMode.create(MultiPagesMode.java:63)
	at com.instantiations.designer.core.editor.multi.MultiPageEditor.createPartControl(MultiPageEditor.java:57)
	at org.eclipse.ui.internal.EditorReference.createPartHelper(EditorReference.java:661)
	at org.eclipse.ui.internal.EditorReference.createPart(EditorReference.java:428)
	at org.eclipse.ui.internal.WorkbenchPartReference.getPart(WorkbenchPartReference.java:594)
	at org.eclipse.ui.internal.PartPane.setVisible(PartPane.java:306)
	at org.eclipse.ui.internal.presentations.PresentablePart.setVisible(PresentablePart.java:180)
	at org.eclipse.ui.internal.presentations.util.PresentablePartFolder.select(PresentablePartFolder.java:270)
	at org.eclipse.ui.internal.presentations.util.LeftToRightTabOrder.select(LeftToRightTabOrder.java:65)
	at org.eclipse.ui.internal.presentations.util.TabbedStackPresentation.selectPart(TabbedStackPresentation.java:473)
	at org.eclipse.ui.internal.PartStack.refreshPresentationSelection(PartStack.java:1256)
	at org.eclipse.ui.internal.PartStack.handleDeferredEvents(PartStack.java:1224)
	at org.eclipse.ui.internal.LayoutPart.deferUpdates(LayoutPart.java:400)
	at org.eclipse.ui.internal.PartSashContainer.handleDeferredEvents(PartSashContainer.java:1401)
	at org.eclipse.ui.internal.LayoutPart.deferUpdates(LayoutPart.java:400)
	at org.eclipse.ui.internal.WorkbenchPage.handleDeferredEvents(WorkbenchPage.java:1383)
	at org.eclipse.ui.internal.WorkbenchPage.deferUpdates(WorkbenchPage.java:1373)
	at org.eclipse.ui.internal.WorkbenchPage.access$14(WorkbenchPage.java:1364)
	at org.eclipse.ui.internal.WorkbenchPage$15.runWithException(WorkbenchPage.java:3261)
	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:133)
	at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:3342)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3071)
	at org.eclipse.ui.application.WorkbenchAdvisor.openWindows(WorkbenchAdvisor.java:803)
	at org.eclipse.ui.internal.Workbench$27.runWithException(Workbench.java:1363)
	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:133)
	at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:3342)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3071)
	at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2295)
	at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2200)
	at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:495)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:288)
	at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:490)
	at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
	at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:113)
	at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:193)
	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:386)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
	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:585)
	at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:549)
	at org.eclipse.equinox.launcher.Main.basicRun(Main.java:504)
	at org.eclipse.equinox.launcher.Main.run(Main.java:1236)
Caused by: Java Model Exception: Java Model Status [src/net/siteduke/windows [in SiteDuke] does not exist]
	at org.eclipse.jdt.internal.core.JavaElement.newNotPresentException(JavaElement.java:491)
	at org.eclipse.jdt.internal.core.PackageFragmentRoot.getUnderlyingResource(PackageFragmentRoot.java:678)
	at org.eclipse.jdt.internal.core.PackageFragment.getUnderlyingResource(PackageFragment.java:337)
	at org.eclipse.jdt.internal.core.Openable.getUnderlyingResource(Openable.java:333)
	at org.eclipse.jdt.internal.core.CompilationUnit.getUnderlyingResource(CompilationUnit.java:916)
	at com.instantiations.designer.core.editor.UndoManager.<init>(UndoManager.java:62)
	at com.instantiations.designer.core.editor.DesignPage$2.run(DesignPage.java:99)
	at com.instantiations.designer.core.utils.execution.ExecutionUtils.runRethrow(ExecutionUtils.java:64)
	... 52 more
 
!ENTRY org.eclipse.osgi 2 0 2009-06-25 18:56:21.409
!MESSAGE The following is a complete list of bundles which are not resolved, see the prior log entry for the root cause if it exists:
!SUBENTRY 1 org.eclipse.osgi 2 0 2009-06-25 18:56:21.409
!MESSAGE Bundle reference:file:plugins/org.eclipse.jdt.apt.pluggable.core_1.0.101.R34x_v20081108-1950.jar [216] was not resolved.
!SUBENTRY 2 org.eclipse.jdt.apt.pluggable.core 2 0 2009-06-25 18:56:21.410
!MESSAGE Missing imported package org.eclipse.jdt.internal.compiler.tool_0.0.0.
!SUBENTRY 2 org.eclipse.jdt.apt.pluggable.core 2 0 2009-06-25 18:56:21.410
!MESSAGE Missing imported package org.eclipse.jdt.internal.compiler.apt.dispatch_0.0.0.
!SUBENTRY 2 org.eclipse.jdt.apt.pluggable.core 2 0 2009-06-25 18:56:21.410
!MESSAGE Missing imported package org.eclipse.jdt.internal.compiler.apt.model_0.0.0.
!SUBENTRY 2 org.eclipse.jdt.apt.pluggable.core 2 0 2009-06-25 18:56:21.411
!MESSAGE Missing imported package org.eclipse.jdt.internal.compiler.apt.util_0.0.0.
!SUBENTRY 1 org.eclipse.osgi 2 0 2009-06-25 18:56:21.411
!MESSAGE Bundle reference:file:plugins/org.eclipse.jdt.compiler.apt_1.0.101.R34x_v20090114-1205.jar [218] was not resolved.
!SUBENTRY 2 org.eclipse.jdt.compiler.apt 2 0 2009-06-25 18:56:21.412
!MESSAGE Missing imported package org.eclipse.jdt.internal.compiler.tool_0.0.0.
!SUBENTRY 1 org.eclipse.osgi 2 0 2009-06-25 18:56:21.412
!MESSAGE Bundle reference:file:plugins/org.eclipse.jdt.compiler.tool_1.0.100.v_894_R34x.jar [219] was not resolved.
!SUBENTRY 1 org.eclipse.osgi 2 0 2009-06-25 18:56:21.412
!MESSAGE Bundle reference:file:plugins/com.instantiations.designer.swing.java6_7.0.0.200905010653.jar [417] was not resolved.

The usefull information in this special case is: org.apache.commons.lang.exception.NestableError: Java Model Exception: Java Model Status [src/net/project/windows [in project] does not exist] for any reason, eclipse can not open a special file on the workbench. After several tries I found a way to solve this problem:

  • Make a backup of your “.metadata“-folder (very important!!)
  • navigate into the “.plugins“-folder located inside “.metadata
  • delete the folder “org.eclipse.ui.workbench
  • startup eclipse again and check if there is still everything you need

Hint: BackUp your complete workbench often!

Please keep in mind: You use this advice at your very own risk ;)

If you enjoyed this post, make sure you subscribe to my RSS feed!
Categories: eclipse Tags: , ,
  1. 11:11 AM at 11:11 AM | #1

    Woot!

    This fixed my issue with Eclipse! Thanks for posting this!

    -Rudi

  2. Chris Stephens
    06:06 PM at 06:06 PM | #2

    Awesome thanks. I ran out of memory on my drive and the workspace got corrupted. I did this and it fixed it.

  3. Azadur Rahman
    06:23 AM at 06:23 AM | #3

    It did not work for me… Please be careful

  4. 09:33 AM at 09:33 AM | #4

    @Azadur Rahman
    That is, why I recommended to do a complete backup of your workspace before trying this solution. Is the error-message the same as I described above? Which version of eclipse are you using?

  5. Epo Jemba
    07:01 PM at 07:01 PM | #5

    Thanks!

    That works for me ^_^ !

  6. Thanh Vu LE
    01:36 AM at 01:36 AM | #6

    Thanks a lot ! It works well for me.

  7. Harsha
    08:18 AM at 08:18 AM | #7

    Hi,

    Thanks for posting this.

  8. John Livingstone
    07:49 PM at 07:49 PM | #8

    Thanks for the post – it totally fix my workspace problem!

  9. me
    06:29 PM at 06:29 PM | #9

    Unfortunately this does not fix the problem. All it does is hide the ErrorLog view. The ErrorLog is where this error shows up. So rather than fix the problem, it just hides it. I commend you for trying to find the problem though. :)

  10. 07:31 PM at 07:31 PM | #10

    @me
    Hi – which version of eclipse are you using?

  11. Ross
    09:34 AM at 09:34 AM | #11

    Thanks for your post! It helped med recover a workspace that would freeze when I tried to open it, saved me some time:-)

  12. suffix
    08:43 AM at 08:43 AM | #12

    Dude, thanks a lot! This just resolved my issue (after finding out how to show hidden files under Mac OS X)

  13. Vasant
    01:34 AM at 01:34 AM | #13

    Fantastic. It works !!!!!!!!!!!!!!!

  14. Purvi Patel
    09:06 PM at 09:06 PM | #14

    Thanks a lot, above four steps resolved my issue.

  15. 10:15 AM at 10:15 AM | #15

    It worked partially. I had to reimport all the projects from the workspace, but it’s good to know to backup the workspace dir often to avoid this.
    Thank you

  16. Gustavo
    09:11 PM at 09:11 PM | #16

    Wow! Thanks!!

  17. Ryan C.
    05:18 PM at 05:18 PM | #17

    9-30-11
    Thanks a lot! The following commands solved my problem on linux using eclipse version 3.5.2:

    tar -czvf workspace.backup.tgz workspace
    rm -r workspace/.metadata/.plugins/org.eclipse.ui.workbench
    rm workspace/.metadata/.lock
    eclipse -clean

    All my preferences, plugins and projects were there just as before!

  18. yancyn
    03:08 AM at 03:08 AM | #18

    Close the project and open again may help. Sometimes it is due to the folder in navigator out of sync with the physical one.

  19. Becky
    04:52 PM at 04:52 PM | #19

    thank you!! worked for me and so simple! ;)

  20. dantesan
    08:45 PM at 08:45 PM | #20

    This solution is great! I had been figuring out to solve an IBM RAD hanging with “Building workspace…” and a Websphere server not starting ok. After I used the solution above, no more hanging IBM RAD!

  21. dantesan
    08:46 PM at 08:46 PM | #21

    This solution is great! I had been figuring out how to solve an IBM RAD hanging with “Building workspace…” and a Websphere server not starting ok. After I used the solution above, no more hanging IBM RAD!

  22. Tim
    06:06 PM at 06:06 PM | #22

    Great advice! Thanks.

  23. andy w
    02:47 AM at 02:47 AM | #23

    many thanks. it works for me.

  24. 01:56 AM at 01:56 AM | #24

    Bingo! That worked just perfect for me, than trying the -clean.
    By the way, the few starting lines of exception in the log file was:

    !ENTRY org.eclipse.ui 4 0 2012-09-13 05:13:44.845
    !MESSAGE Unhandled event loop exception
    !STACK 0
    org.eclipse.swt.SWTException: Widget is disposed
    at org.eclipse.swt.SWT.error(SWT.java:4282)
    at org.eclipse.swt.SWT.error(SWT.java:4197)
    at org.eclipse.swt.SWT.error(SWT.java:4168)
    ….

    ..

  1. No trackbacks yet.