我目前正在学习Java,使用Head First Java书和Eclipse的组合。直到今晚,一切都很顺利!
当我今晚开始使用Eclipse时,我看到了一条错误消息,我没注意(我知道!我知道!)并且确认之后项目资源管理器是空的,它曾用于包含我的Head First项目!
快速“google”后,我找到了workspace.metadata.log,错误如下所示。
我使用的Eclipse版本是:20100218-1602,我使用的唯一插件是egit。
非常感谢任何帮助。
!SESSION 2010-06-08 19:24:33.841 -----------------------------------------------
eclipse.buildId=unknown
java.version=1.5.0_22
java.vendor=Sun Microsystems Inc.
BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=en_GB
Framework arguments: -product org.eclipse.epp.package.java.product
Command-line arguments: -os win32 -ws win32 -arch x86 -product org.eclipse.epp.package.java.product
!ENTRY org.eclipse.ui.workbench 4 2 2010-06-08 19:24:36.475
!MESSAGE Problems occurred when invoking code from plug-in: "org.eclipse.ui.workbench".
!STACK 1
org.eclipse.ui.WorkbenchException: Content is not allowed in prolog.
at org.eclipse.ui.XMLMemento.createReadRoot(XMLMemento.java:121)
at org.eclipse.ui.XMLMemento.createReadRoot(XMLMemento.java:64)
at org.eclipse.ui.internal.Workbench$49.run(Workbench.java:1895)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
at org.eclipse.ui.internal.Workbench.restoreState(Workbench.java:1890)
at org.eclipse.ui.internal.WorkbenchConfigurer.restoreState(WorkbenchConfigurer.java:183)
at org.eclipse.ui.application.WorkbenchAdvisor$1.run(WorkbenchAdvisor.java:781)
Caused by: org.xml.sax.SAXParseException: Content is not allowed in prolog.
at com.sun.org.apache.xerces.internal.parsers.DOMParser.parse(DOMParser.java:264)
at com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderImpl.parse(DocumentBuilderImpl.java:292)
at org.eclipse.ui.XMLMemento.createReadRoot(XMLMemento.java:94)
... 6 more
!SUBENTRY 1 org.eclipse.ui 4 0 2010-06-08 19:24:36.475
!MESSAGE Content is not allowed in prolog.
!STACK 0
org.xml.sax.SAXParseException: Content is not allowed in prolog.
at com.sun.org.apache.xerces.internal.parsers.DOMParser.parse(DOMParser.java:264)
at com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderImpl.parse(DocumentBuilderImpl.java:292)
at org.eclipse.ui.XMLMemento.createReadRoot(XMLMemento.java:94)
at org.eclipse.ui.XMLMemento.createReadRoot(XMLMemento.java:64)
at org.eclipse.ui.internal.Workbench$49.run(Workbench.java:1895)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
at org.eclipse.ui.internal.Workbench.restoreState(Workbench.java:1890)
at org.eclipse.ui.internal.WorkbenchConfigurer.restoreState(WorkbenchConfigurer.java:183)
at org.eclipse.ui.application.WorkbenchAdvisor$1.run(WorkbenchAdvisor.java:781)
!SUBENTRY 1 org.eclipse.ui 4 0 2010-06-08 19:24:36.475
!MESSAGE Content is not allowed in prolog.
!STACK 0
org.xml.sax.SAXParseException: Content is not allowed in prolog.
at com.sun.org.apache.xerces.internal.parsers.DOMParser.parse(DOMParser.java:264)
at com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderImpl.parse(DocumentBuilderImpl.java:292)
at org.eclipse.ui.XMLMemento.createReadRoot(XMLMemento.java:94)
at org.eclipse.ui.XMLMemento.createReadRoot(XMLMemento.java:64)
at org.eclipse.ui.internal.Workbench$49.run(Workbench.java:1895)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
at org.eclipse.ui.internal.Workbench.restoreState(Workbench.java:1890)
at org.eclipse.ui.internal.WorkbenchConfigurer.restoreState(WorkbenchConfigurer.java:183)
at org.eclipse.ui.application.WorkbenchAdvisor$1.run(WorkbenchAdvisor.java:781)
!ENTRY org.eclipse.jdt.ui 4 10001 2010-06-08 19:24:41.442
!MESSAGE Internal Error
!STACK 1
org.eclipse.jdt.internal.ui.JavaUIException: Problems reading information from XML 'OpenTypeHistory.xml'
at org.eclipse.jdt.internal.corext.util.History.createException(History.java:70)
at org.eclipse.jdt.internal.corext.util.History.load(History.java:257)
at org.eclipse.jdt.internal.corext.util.History.load(History.java:166)
at org.eclipse.jdt.internal.corext.util.OpenTypeHistory.<init>(OpenTypeHistory.java:199)
at org.eclipse.jdt.internal.corext.util.OpenTypeHistory.getInstance(OpenTypeHistory.java:185)
at org.eclipse.jdt.internal.ui.JavaPlugin.initializeAfterLoad(JavaPlugin.java:381)
at org.eclipse.jdt.internal.ui.InitializeAfterLoadJob$RealJob.run(InitializeAfterLoadJob.java:36)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
Caused by: org.xml.sax.SAXParseException: Content is not allowed in prolog.
at com.sun.org.apache.xerces.internal.parsers.DOMParser.parse(DOMParser.java:264)
at com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderImpl.parse(DocumentBuilderImpl.java:292)
at org.eclipse.jdt.internal.corext.util.History.load(History.java:255)
... 6 more
!SUBENTRY 1 org.eclipse.jdt.ui 4 4 2010-06-08 19:24:41.442
!MESSAGE Problems reading information from XML 'OpenTypeHistory.xml'
!STACK 0
org.xml.sax.SAXParseException: Content is not allowed in prolog.
at com.sun.org.apache.xerces.internal.parsers.DOMParser.parse(DOMParser.java:264)
at com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderImpl.parse(DocumentBuilderImpl.java:292)
at org.eclipse.jdt.internal.corext.util.History.load(History.java:255)
at org.eclipse.jdt.internal.corext.util.History.load(History.java:166)
at org.eclipse.jdt.internal.corext.util.OpenTypeHistory.<init>(OpenTypeHistory.java:199)
at org.eclipse.jdt.internal.corext.util.OpenTypeHistory.getInstance(OpenTypeHistory.java:185)
at org.eclipse.jdt.internal.ui.JavaPlugin.initializeAfterLoad(JavaPlugin.java:381)
at org.eclipse.jdt.internal.ui.InitializeAfterLoadJob$RealJob.run(InitializeAfterLoadJob.java:36)
at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
!ENTRY org.eclipse.jdt.ui 4 10001 2010-06-08 19:24:50.435
!MESSAGE Internal Error
!STACK 1
org.eclipse.jdt.internal.ui.JavaUIException: Problems reading information from XML 'QualifiedTypeNameHistory.xml'
at org.eclipse.jdt.internal.corext.util.History.createException(History.java:70)
at org.eclipse.jdt.internal.corext.util.History.load(History.java:257)
at org.eclipse.jdt.internal.corext.util.History.load(History.java:166)
at org.eclipse.jdt.internal.corext.util.QualifiedTypeNameHistory.<init>(QualifiedTypeNameHistory.java:33)
at org.eclipse.jdt.internal.corext.util.QualifiedTypeNameHistory.getDefault(QualifiedTypeNameHistory.java:26)
at org.eclipse.jdt.internal.ui.JavaPlugin.stop(JavaPlugin.java:602)
at org.eclipse.osgi.framework.internal.core.BundleContextImpl$2.run(BundleContextImpl.java:843)
at java.security.AccessController.doPrivileged(Native Method)
at org.eclipse.osgi.framework.internal.core.BundleContextImpl.stop(BundleContextImpl.java:836)
at org.eclipse.osgi.framework.internal.core.BundleHost.stopWorker(BundleHost.java:474)
at org.eclipse.osgi.framework.internal.core.AbstractBundle.suspend(AbstractBundle.java:546)
at org.eclipse.osgi.framework.internal.core.Framework.suspendBundle(Framework.java:1098)
at org.eclipse.osgi.framework.internal.core.StartLevelManager.decFWSL(StartLevelManager.java:593)
at org.eclipse.osgi.framework.internal.core.StartLevelManager.doSetStartLevel(StartLevelManager.java:261)
at org.eclipse.osgi.framework.internal.core.StartLevelManager.shutdown(StartLevelManager.java:216)
at org.eclipse.osgi.framework.internal.core.InternalSystemBundle.suspend(InternalSystemBundle.java:266)
at org.eclipse.osgi.framework.internal.core.Framework.shutdown(Framework.java:685)
at org.eclipse.osgi.framework.internal.core.Framework.close(Framework.java:583)
at org.eclipse.core.runtime.adaptor.EclipseStarter.shutdown(EclipseStarter.java:409)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:200)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:592)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:559)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:514)
at org.eclipse.equinox.launcher.Main.run(Main.java:1311)
Caused by: org.xml.sax.SAXParseException: Content is not allowed in prolog.
at com.sun.org.apache.xerces.internal.parsers.DOMParser.parse(DOMParser.java:264)
at com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderImpl.parse(DocumentBuilderImpl.java:292)
at org.eclipse.jdt.internal.corext.util.History.load(History.java:255)
... 25 more
!SUBENTRY 1 org.eclipse.jdt.ui 4 4 2010-06-08 19:24:50.435
!MESSAGE Problems reading information from XML 'QualifiedTypeNameHistory.xml'
!STACK 0
org.xml.sax.SAXParseException: Content is not allowed in prolog.
at com.sun.org.apache.xerces.internal.parsers.DOMParser.parse(DOMParser.java:264)
at com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderImpl.parse(DocumentBuilderImpl.java:292)
at org.eclipse.jdt.internal.corext.util.History.load(History.java:255)
at org.eclipse.jdt.internal.corext.util.History.load(History.java:166)
at org.eclipse.jdt.internal.corext.util.QualifiedTypeNameHistory.<init>(QualifiedTypeNameHistory.java:33)
at org.eclipse.jdt.internal.corext.util.QualifiedTypeNameHistory.getDefault(QualifiedTypeNameHistory.java:26)
at org.eclipse.jdt.internal.ui.JavaPlugin.stop(JavaPlugin.java:602)
at org.eclipse.osgi.framework.internal.core.BundleContextImpl$2.run(BundleContextImpl.java:843)
at java.security.AccessController.doPrivileged(Native Method)
at org.eclipse.osgi.framework.internal.core.BundleContextImpl.stop(BundleContextImpl.java:836)
at org.eclipse.osgi.framework.internal.core.BundleHost.stopWorker(BundleHost.java:474)
at org.eclipse.osgi.framework.internal.core.AbstractBundle.suspend(AbstractBundle.java:546)
at org.eclipse.osgi.framework.internal.core.Framework.suspendBundle(Framework.java:1098)
at org.eclipse.osgi.framework.internal.core.StartLevelManager.decFWSL(StartLevelManager.java:593)
at org.eclipse.osgi.framework.internal.core.StartLevelManager.doSetStartLevel(StartLevelManager.java:261)
at org.eclipse.osgi.framework.internal.core.StartLevelManager.shutdown(StartLevelManager.java:216)
at org.eclipse.osgi.framework.internal.core.InternalSystemBundle.suspend(InternalSystemBundle.java:266)
at org.eclipse.osgi.framework.internal.core.Framework.shutdown(Framework.java:685)
at org.eclipse.osgi.framework.internal.core.Framework.close(Framework.java:583)
at org.eclipse.core.runtime.adaptor.EclipseStarter.shutdown(EclipseStarter.java:409)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:200)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:592)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:559)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:514)
at org.eclipse.equinox.launcher.Main.run(Main.java:1311)
答案 0 :(得分:6)
你上次正确关闭了日食吗?我会继续创建一个新的工作区,然后在其中导入我的项目文件。更好地投入时间学习而不是弄清楚日食的错误: - )
答案 1 :(得分:3)
啊,Eclipse错误。没有什么能像你最重要的工具一样扯出来并且接受上帝知道用它来开始你的一天有多快的工作,快速的恐怖......
您是否见过this page?当我自己诊断Eclipse错误时,我的策略是谷歌“eclipse”以及我能找到的任何错误消息。以上链接来自谷歌搜索:
"Problems reading information from XML 'OpenTypeHistory.xml'" eclipse
绝对看起来某个文件在某个地方被破坏了,虽然我确定你现在已经知道了。希望这会有所帮助,我希望你能在不丢失任何工作的情况下弄明白。
答案 2 :(得分:1)
肯定有些文件在日食中被破坏了。即使我尝试了prashant给出的解决方案(创建新工作区),不幸的是,这对我不起作用。我已经有了eclipse的副本。所以我重新安装了日食,现在每件事都运转正常。最好重新安装eclipse。
答案 3 :(得分:1)
干净关机后我遇到了同样的问题。从我的工作区备份复制.metadata目录后,项目再次出现。