简体   繁体   English

启动时出现Eclipse错误

[英]Eclipse Error On Startup

Eclipse was running fine last night, but this morning I tried starting it up and I came upon this error: Eclipse昨晚运行良好,但是今天早上我尝试启动它,然后遇到了这个错误:

alt text http://img707.imageshack.us/img707/4416/ss20100407181208.png 替代文字http://img707.imageshack.us/img707/4416/ss20100407181208.png

Here's the log 这是日志

!SESSION 2010-04-07 17:58:37.208 -----------------------------------------------
eclipse.buildId=I20080617-2000
java.version=1.6.0_13
java.vendor=Sun Microsystems Inc.
BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=en_US
Command-line arguments:  -os win32 -ws win32 -arch x86

!ENTRY org.eclipse.osgi 4 0 2010-04-07 17:58:37.457
!MESSAGE Startup error
!STACK 1
java.lang.NumberFormatException: For input string: ""
at java.lang.NumberFormatException.forInputString(Unknown Source)
at java.lang.Integer.parseInt(Unknown Source)
at java.lang.Integer.parseInt(Unknown Source)
at org.eclipse.osgi.storagemanager.StorageManager.updateTable(StorageManager.java:512)
at org.eclipse.osgi.storagemanager.StorageManager.open(StorageManager.java:694)
at org.eclipse.osgi.internal.baseadaptor.BaseStorage.initFileManager(BaseStorage.java:208)
at org.eclipse.osgi.internal.baseadaptor.BaseStorage.initialize(BaseStorage.java:142)
at org.eclipse.osgi.baseadaptor.BaseAdaptor.initializeStorage(BaseAdaptor.java:124)
at org.eclipse.osgi.framework.internal.core.Framework.initialize(Framework.java:180)
at org.eclipse.osgi.framework.internal.core.Framework.<init>(Framework.java:152)
at org.eclipse.osgi.framework.internal.core.OSGi.createFramework(OSGi.java:90)
at org.eclipse.osgi.framework.internal.core.OSGi.<init>(OSGi.java:31)
at org.eclipse.core.runtime.adaptor.EclipseStarter.startup(EclipseStarter.java:286)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:175)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
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)

Any help? 有什么帮助吗? I really need this up and running, and reinstalling and resetting all of my plugins and settings just isn't an option at the moment. 我确实需要启动并运行它,并且目前还无法重新安装和重置所有插件和设置。

I had the same issue. 我遇到过同样的问题。 After some debugging i tried deleting the following folders from my eclipse directory 经过一些调试后,我尝试从eclipse目录中删除以下文件夹

./configuration/org.eclipse.core.runtime/.manager ./configuration/org.eclipse.core.runtime/.manager
./configuration/org.eclipse.osgi/.manager ./configuration/org.eclipse.osgi/.manager

That fixed the issue for me. 那为我解决了这个问题。 No side effects. 没有副作用。 I think this is just a cache because it recreates itself on the fly. 我认为这只是一个缓存,因为它会即时重新创建自己。 The source code doesn't seem to treat it with any special importance if it is not found, but there is a bug that tries to parse an empty string on line 512 . 如果没有找到源代码,它似乎没有什么特别的重要性,但是在第512行有一个试图解析空字符串的错误。

Looking into the source of org.eclipse.osgi it looks like these files are somehow managed with a timestamp, so if you're doing anything that will mess with the timestamps then you'll run into this issue. 查看org.eclipse.osgi的源代码,似乎可以使用时间戳来管理这些文件,因此,如果您做的任何事情都会干扰时间戳,那么您将遇到此问题。 I use git to manage my eclipse installation so i can revert to an earlier version if a newly installed feature starts stepping on my karma. 我使用git管理我的Eclipse安装,因此,如果新安装的功能开始踩我的业力,我可以恢复到早期版本。 Ran into this issue after reverting. 还原后遇到此问题。 Added it to .gitignore. 将其添加到.gitignore。

Try at least to restart eclipse with a -clean option. 至少尝试使用-clean选项重新启动eclipse。
Check also (just in case) your disk space! 还检查(以防万一)您的磁盘空间! That can occur when not enough space is left on the disk, since the code shows it is reading strings (supposed to be Integer) from a file. 当磁盘上没有足够的空间时,可能会发生这种情况,因为代码显示它正在从文件中读取字符串(假定为Integer)。

Try also upgrading your java used to start eclipse to the latest one (u19 instead of u13) 还尝试将用于启动Eclipse的Java升级到最新版本(U19而不是U13)

This error stacktrace has been reported in bug 113596 about some version of Vista: what OS are you using, and has it been updated recently? 错误113596中已报告有关某个版本的Vista的错误堆栈跟踪信息:您使用的是什么操作系统,并且最近进行了更新吗? (by Windows update for instance) (例如,通过Windows更新)

A Best shot would be to use a fresh copy of eclipse and point the workspace location that you were using in the old eclipse. 最好的选择是使用新的Eclipse副本,并指向您在旧Eclipse中使用的工作区位置。 By this way, you will not lose your settings and will 100% avoid the startup error. 通过这种方式,您将不会丢失设置,并且将100%避免启动错误。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM