Eclipse startup error

24,839

Solution 1

This problem was caused by older versions of the m2e plugin for Eclipse.

Newer versions no longer transfer the remote index automatically, so the first recommended solution is to upgrade to the latest version of m2e. If that is not possible then follow the instructions below.


This problem is caused by the M2Eclipse plugin transferring remote indexes from a Nexus ( or compatible ) repository.

  1. Disconnect from the network;
  2. Start Eclipse.
  3. Uncheck the preference Maven -> Download repository index updates on startup.

You can now reconnect to the network and should restart Eclipse to verify that this has indeed fixed the problem.

Solution 2

If you are running into this error recently, it may be due to an issue with Luna (eclipse 4.4.0) and m2e (1.4.1). The solution is to uninstall m2e 1.4.1 and install m2e 1.5.0 under Help-->Install new Software-->All Available Sites. Official eclipse bug report.

Solution 3

Are there other m2e cache directories? Some bug reports on this issue propose to delete ~/.m2/repository/.cache/m2e. Generally, for me it seems to be a maven / nexus problem (maybe m2e).

Solution 4

Try increasing the memory in the .ini file to:

Xms256m Xmx768m

Solution 5

Keep the larger memory already suggested.

Try starting from the command line with a "clean" argument.

eclipse.exe -clean

From the command line you may also specify which workspace to open with the -data argument. Perhaps start with an alternative, small workspace until your IDE is back on its feet.

Share:
24,839
jasalguero
Author by

jasalguero

Software engineer specialized in java and web application development, currently living and working in Berlin

Updated on July 20, 2020

Comments

  • jasalguero
    jasalguero almost 4 years

    Today when I started eclipse I got the following error message:

    An internal error occurred during: "Updating indexes". Java heap space

    When I checked the log, there is this exception:

    !ENTRY org.eclipse.core.jobs 4 2 2011-06-14 13:44:26.546
    !MESSAGE An internal error occurred during: "Updating indexes".
    !STACK 0
    java.lang.OutOfMemoryError: Java heap space
    at org.sonatype.nexus.index.updater.IndexDataReader.readUTF(IndexDataReader.java:132)
    at org.sonatype.nexus.index.updater.IndexDataReader.readField(IndexDataReader.java:122)
    at org.sonatype.nexus.index.updater.IndexDataReader.readDocument(IndexDataReader.java:96)
    at org.sonatype.nexus.index.updater.IndexDataReader.readIndex(IndexDataReader.java:63)
    at org.sonatype.nexus.index.updater.DefaultIndexUpdater.unpackIndexData(DefaultIndexUpdater.java:564)
    at org.sonatype.nexus.index.updater.DefaultIndexUpdater.loadIndexDirectory(DefaultIndexUpdater.java:252)
    at org.sonatype.nexus.index.updater.DefaultIndexUpdater.access$300(DefaultIndexUpdater.java:74)
    at org.sonatype.nexus.index.updater.DefaultIndexUpdater$LuceneIndexAdaptor.setIndexFile(DefaultIndexUpdater.java:815)
    at org.sonatype.nexus.index.updater.DefaultIndexUpdater.fetchAndUpdateIndex(DefaultIndexUpdater.java:995)
    at org.sonatype.nexus.index.updater.DefaultIndexUpdater.fetchAndUpdateIndex(DefaultIndexUpdater.java:159)
    at org.maven.ide.eclipse.internal.index.NexusIndexManager.updateRemoteIndex(NexusIndexManager.java:1085)
    at org.maven.ide.eclipse.internal.index.NexusIndexManager.updateIndex(NexusIndexManager.java:1025)
    at org.maven.ide.eclipse.internal.index.NexusIndexManager$1.run(NexusIndexManager.java:632)
    at org.maven.ide.eclipse.internal.index.IndexUpdaterJob.run(IndexUpdaterJob.java:71)
    at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
    !SESSION 2011-06-14 13:46:30.734 -----------------------------------------------
    eclipse.buildId=M20100909-0800
    java.version=1.6.0_23
    java.vendor=Sun Microsystems Inc.
    BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=en_GB
    Framework arguments:  -product org.eclipse.epp.package.jee.product
    Command-line arguments:  -os win32 -ws win32 -arch x86 -product org.eclipse.epp.package.jee.product
    

    I tried the following with no success:

    • Increase the memory in the .ini file in eclipse:

      -Xms128m
      -Xmx512m
      -XX:MaxPermSize=256m
      
    • Create the environment variable "MAVEN_OPTS:-Xmx256m"

    • Delete the ~/.cache/m2e directoy

    Does anyone have another idea?

  • jasalguero
    jasalguero almost 13 years
    Yes, I had tried before to put 1024, but didn't solve anything, so I put back 512
  • jasalguero
    jasalguero almost 13 years
    The problem is my machine only has 2Gb, so with that configuration fails because there is not enough memory to startup the jvm.
  • jasalguero
    jasalguero almost 13 years
    I tried to increase the limit until the maximum my machine was able to allocate (it has only 2 GB) and nothing... Anyway, it's difficult to believe that it needs more than 1.5 GB just to update some indexes...
  • talnicolas
    talnicolas almost 13 years
    No that's right, the problem is somewhere else. Do you have a lot of projects open in Eclipse?
  • talnicolas
    talnicolas almost 13 years
    Do you use the subclipse plugin?
  • talnicolas
    talnicolas almost 13 years
    I found that uninstalling and reinstalling the subclipse plugin has resolved the problem for someone.
  • jasalguero
    jasalguero almost 13 years
    Nothing, I tried uninstalling both subclipse and m2e plugins :(
  • talnicolas
    talnicolas almost 13 years
    Well then...I'm running out of idea sorry. Maybe you should open a bug ticket here
  • damjan
    damjan almost 9 years
    It's even easier to update the m2e plugin from Help -> Installation Details -> Click the m2e row -> "Update...."