Eclipse “An error has occurred. See the log file .metadata/.log.”

I am currently using Eclipse Indigo Service Release 1 and out of a sudden received a strange error message when trying to open my workspace, or in fact any workspace:

An error has occurred. See the log file [WORKSPACE-DIR]/.metadata/.log.

Inspecting the log file, it seems that this behaviour was caused by an OutOfMemoryError error in a subpackage of org.eclipse.core which is somewhat strange, as I have plenty of memory available for the VM. A Google search for the error, suggested to invoke Eclipse via the command line with the -clean option:

eclipse/dir> eclipse -clean

Eclipse successfully started again and subsequently also without the -clean option. However, an interesting message was writen into the log file:

!MESSAGE The -clean (osgi.clean) option was not successful. Unable to clean the storage area: C:\eclipse-dir\eclipse\configuration\org.eclipse.osgi.

Nevertheless, Eclipse is working fine again and I am not experiencing any problems while programming, so I guess that inspite of the log message, the -clean option works.

About these ads


  1. Anonymous

    clean is also giving the same error

  2. Hi,

    by “the same error”, do you mean the clean command does not help and you still get “An error has occurred. See the log file [WORKSPACE-DIR]/.metadata/.log.“ or do you mean the message printed in the log file?

  3. Lito Juliano

    Hi, I had tried the above method but seems not working in my case.
    Until I use this and it works. First you need to know what version of Eclipse you are trying to run and what version of JRE you currently using.
    In my case, i used 3.2.2 eclipse and jr37 (this will not work!). you should use use j2sdk1.4.2_16 it works fine.

  4. Hi,
    as I said in the post, I was using Eclipse Indigo. I no longer have the installation available (Juno is here), and I was using jdk1.7, but I don’t know which revision exactly was the most recent at the time.

    I would suggest you to use the most recent stable versions of Eclipse (Juno, 4.2) and Java (7u5). Java 1.4.2 is already a decade old. If you use a jdk which is that outdated, you should have very strong and specific reasons for doing so.

    • Anonymous

      Strangely enough, I was having the “error has occured” message on Eclipse Juno, JDK 1.7. The log has a lot of traces from MercurialEclipse, so perhaps that’s part of the problem. Ironically, I was thinking it was nice to have the latest Eclipse and JDK easily installed on Windows, but my Ubuntu setup doesn’t have these problems, using the (slightly outdated) version in the repositories.

      • Hehe, true ;-) But I think that this error is a quite generic one that reoccurs over distributions and operation systems and is also caused by a variety of reasons. I don’t really know where it came from in my case and I don’t really know whether the fix I proposed is the right one. Using an outdated version of Eclipse or Java may save you from some errors, but then again you also can’t use all those pretty new features :-)

  5. BB

    Have same problem

  6. suneeshsaleen

    Answer :
    Delete: /YOUR PATH TO WORKSPACE/.metadata/.plugins/org.eclipse.core.resources

  7. Anonymous

    Hey Jörg, I found your info very fruitful for another programm which seems to be very dependend on eclipse. I am talking about XMind Pro 3.3 for Linux. After the upgrade to the Pro version I suddenly could not start XMind anymore and got the same error message in the box. The log file messages may have been different, but no matter what I tried the problem stayed, until I found you tip.

    So for all XMind user who face this problem, just type
    “[path to xmind dir/XMind -clean]” in the terminal.

    Thanks a lot!
    Cheers, Bauer

    • Hi,
      nice to hear it helped! According to Wikipedia, XMind is based on Eclipse RCP, which explains why the clean command did the trick. Hopefully, your comment will help future XMind users!
      Regards, Jörg

  8. george mantoufeh

    i tried the -clean method
    and the Delete: /YOUR PATH TO WORKSPACE/.metadata/.plugins/org.eclipse.core.resources

    but neither worked
    what should i do?

  9. Christian Darsi

    same problem .. It worked when i deleted this…workspace path/.metadata/.plugins/org.eclipse.core.resources

  10. Anonymous

    it absolutely doesn’t work -.-.

  11. Anonymous

    delete .snap file inside org.spring.core.resource=>.plugins

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s


Get every new post delivered to your Inbox.

Join 36 other followers