Eclipse启动错误
今天,当我启动 eclipse 时,我收到以下错误消息:
“更新索引”期间发生内部错误。 Java堆空间
当我检查日志时,出现了这样的异常:
!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
我尝试了以下操作但没有成功:
增加eclipse中.ini文件中的内存:
<前><代码>-Xms128m -Xmx512米 -XX:MaxPermSize=256m创建环境变量“MAVEN_OPTS:-Xmx256m”
删除~/.cache/m2e 目录
有人还有其他想法吗?
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?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(7)
此问题是由旧版本的 Eclipse m2e 插件引起的。
较新的版本不再自动传输远程索引,因此第一个推荐的解决方案是升级到 m2e 的最新版本。如果不可能,请按照以下说明操作。
此问题是由 M2Eclipse 插件从 Nexus(或兼容)存储库传输远程索引引起的。
Maven ->启动时下载存储库索引更新
。您现在可以重新连接到网络,并且应该重新启动 Eclipse 以验证这确实解决了问题。
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.
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.
如果您最近遇到此错误,可能是由于 Luna (eclipse 4.4.0) 和 m2e (1.4.1) 的问题造成的。解决方案是卸载 m2e 1.4.1 并在
帮助
下安装 m2e 1.5.0 -->安装新软件
-->所有可用站点. 官方 Eclipse 错误报告。
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.还有其他 m2e 缓存目录吗?关于此问题的一些错误报告建议删除
~/.m2/repository/.cache/m2e
。一般来说,对我来说这似乎是一个 Maven / Nexus 问题(也许是 m2e)。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).尝试将.ini文件中的内存增加到:
Xms256m
XMX768米
Try increasing the memory in the .ini file to:
Xms256m
Xmx768m
保留已建议的较大内存。
尝试从命令行使用“clean”参数开始。
在命令行中,您还可以使用 -data 参数指定要打开的工作区。也许可以从一个替代的小型工作区开始,直到您的 IDE 恢复正常。
Keep the larger memory already suggested.
Try starting from the command line with a "clean" argument.
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.
您可以增加内存并尝试使用
-Xmx1024m
Can you increase the memory and try with
-Xmx1024m
尝试使用更多内存:)
Try with even more memory :)