Thursday, January 2, 2014

org.osgi.framework.BundleException: Exception in org.eclipse.core.resources.ResourcesPlugin.start()

Today morning, one of my colleague was reported that, his eclipse is not launching and It throws below error.

MESSAGE An error occurred while automatically activating bundle
org.eclipse.core.resources (26).
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.s tartActivator

I have verified all the plugins, and could not see any issue with them. So where is the problem then?

I could solve the problem with Option (2).

Option 1: Try launching eclipse in clean mode. This did not work in my case, it was throwing an error before it asks for workspace selection.
> eclipse -clean

Option 2: Delete .metadata/.plugins/org.eclipse.core.resources/.snap file workspace directory.

Option 3: Most of the time option (2) will work, if it's not working, try to delete all files from .metadata/  folder.

After launching your eclipse, you will not find your old projects and workspace preference settings, you need to re-import into eclipse workspace and need to configure eclipse preferences.
Why this would have happened?
As per my understanding, this happens if you closed your eclipse forcefully, shutdown the system forcefully before eclipse closes or some files in workspace metadata would have been modified.
What is this .snap files contain ?
*.snap files represent the changes in workspace state of the IDE during the runtime. This is mostly for eclipse crash recovery plan. When a crash happens these files are used to recover the state of eclipse workspace.

While Eclipse is running, information about what has changed in the workspace is incrementally logged into various "snapshot" files (including .snap). On normal Eclipse shutdown, the complete workspace state is saved and the .snap files are deleted. When Eclipse crashes, the snapshot files are used during the next startup to recover from the crash.

No comments:

Post a Comment