2

由于某些原因,我无法再打开纯 xml 文件。我做了一些测试,即使使用 Eclipse(64 位可可)的新鲜、未改动的副本,我也无法打开 xml 文件。我所做的是,创建了一个新的 java 项目,创建了一个新的 xml 文件。我唯一得到的是以下消息:

发生了错误。有关详细信息,请参阅错误日志。无法初始化类 org.eclipse.m2e.editor.xml.PomContentAssistProcessor

任何想法可能是什么原因?

更新:

我仔细查看了错误日志,显示如下:

java.lang.NoClassDefFoundError: Could not initialize class org.eclipse.m2e.editor.xml.PomContentAssistProcessor

不知何故缺少依赖关系,但我不知道如何解决它。我试图重新安装 m2e,但它只是告诉我它已经安装并且只会显示在已安装的应用程序中。

这是完整的堆栈跟踪,也许有人有下一步该怎么做的建议。

java.lang.NoClassDefFoundError: Could not initialize class org.eclipse.m2e.editor.xml.PomContentAssistProcessor
    at org.eclipse.m2e.editor.xml.PomStructuredTextViewConfiguration.getContentAssistProcessors(PomStructuredTextViewConfiguration.java:31)
    at org.eclipse.wst.sse.ui.StructuredTextViewerConfiguration.getContentAssistant(StructuredTextViewerConfiguration.java:291)
    at org.eclipse.wst.sse.ui.internal.StructuredTextViewer.configure(StructuredTextViewer.java:215)
    at org.eclipse.ui.texteditor.AbstractTextEditor.createPartControl(AbstractTextEditor.java:3407)
    at org.eclipse.ui.texteditor.StatusTextEditor.createPartControl(StatusTextEditor.java:54)
    at org.eclipse.ui.texteditor.AbstractDecoratedTextEditor.createPartControl(AbstractDecoratedTextEditor.java:440)
    at org.eclipse.wst.sse.ui.StructuredTextEditor.createPartControl(StructuredTextEditor.java:1508)
    at org.eclipse.ui.part.MultiPageEditorPart.addPage(MultiPageEditorPart.java:241)
    at org.eclipse.ui.part.MultiPageEditorPart.addPage(MultiPageEditorPart.java:211)
    at org.eclipse.wst.xml.ui.internal.tabletree.XMLMultiPageEditorPart.addSourcePage(XMLMultiPageEditorPart.java:509)
    at org.eclipse.wst.xml.ui.internal.tabletree.XMLMultiPageEditorPart.createPages(XMLMultiPageEditorPart.java:764)
    at org.eclipse.ui.part.MultiPageEditorPart.createPartControl(MultiPageEditorPart.java:348)
    at org.eclipse.ui.internal.EditorReference.createPartHelper(EditorReference.java:670)
    at org.eclipse.ui.internal.EditorReference.createPart(EditorReference.java:465)
    at org.eclipse.ui.internal.WorkbenchPartReference.getPart(WorkbenchPartReference.java:595)
    at org.eclipse.ui.internal.EditorReference.getEditor(EditorReference.java:289)
    at org.eclipse.ui.internal.EditorManager.findEditor(EditorManager.java:424)
    at org.eclipse.ui.internal.WorkbenchPage.busyOpenEditorBatched(WorkbenchPage.java:2887)
    at org.eclipse.ui.internal.WorkbenchPage.busyOpenEditor(WorkbenchPage.java:2850)
    at org.eclipse.ui.internal.WorkbenchPage.access$11(WorkbenchPage.java:2842)
    at org.eclipse.ui.internal.WorkbenchPage$10.run(WorkbenchPage.java:2793)
    at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70)
    at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:2789)
    at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:2773)
    at org.eclipse.ui.internal.WorkbenchPage.openEditor(WorkbenchPage.java:2764)
    at org.eclipse.ui.ide.IDE.openEditor(IDE.java:651)
    at org.eclipse.ui.ide.IDE.openEditor(IDE.java:610)
    at org.eclipse.jdt.internal.ui.javaeditor.EditorUtility.openInEditor(EditorUtility.java:355)
    at org.eclipse.jdt.internal.ui.javaeditor.EditorUtility.openInEditor(EditorUtility.java:164)
    at org.eclipse.jdt.ui.actions.OpenAction.run(OpenAction.java:249)
    at org.eclipse.jdt.ui.actions.OpenAction.run(OpenAction.java:228)
    at org.eclipse.jdt.ui.actions.SelectionDispatchAction.dispatchRun(SelectionDispatchAction.java:275)
    at org.eclipse.jdt.ui.actions.SelectionDispatchAction.run(SelectionDispatchAction.java:251)
    at org.eclipse.jdt.internal.ui.packageview.PackageExplorerActionGroup.handleOpen(PackageExplorerActionGroup.java:376)
    at org.eclipse.jdt.internal.ui.packageview.PackageExplorerPart$4.open(PackageExplorerPart.java:538)
    at org.eclipse.ui.OpenAndLinkWithEditorHelper$InternalListener.open(OpenAndLinkWithEditorHelper.java:48)
    at org.eclipse.jface.viewers.StructuredViewer$2.run(StructuredViewer.java:866)
    at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
    at org.eclipse.ui.internal.JFaceUtil$1.run(JFaceUtil.java:49)
    at org.eclipse.jface.util.SafeRunnable.run(SafeRunnable.java:175)
    at org.eclipse.jface.viewers.StructuredViewer.fireOpen(StructuredViewer.java:864)
    at org.eclipse.jface.viewers.StructuredViewer.handleOpen(StructuredViewer.java:1152)
    at org.eclipse.jface.viewers.StructuredViewer$6.handleOpen(StructuredViewer.java:1256)
    at org.eclipse.jface.util.OpenStrategy.fireOpenEvent(OpenStrategy.java:275)
    at org.eclipse.jface.util.OpenStrategy.access$2(OpenStrategy.java:269)
    at org.eclipse.jface.util.OpenStrategy$1.handleEvent(OpenStrategy.java:309)
    at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
    at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4125)
    at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1457)
    at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1480)
    at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1465)
    at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:1270)
    at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3971)
    at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3610)
    at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2696)
    at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2660)
    at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2494)
    at org.eclipse.ui.internal.Workbench$7.run(Workbench.java:674)
    at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
    at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:667)
    at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
    at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:123)
    at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
    at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
    at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:344)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
    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:597)
    at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:622)
    at org.eclipse.equinox.launcher.Main.basicRun(Main.java:577)
    at org.eclipse.equinox.launcher.Main.run(Main.java:1410)
4

5 回答 5

3

我通过使用 -clean 参数启动我的 Eclipse(Kepler) 来完成这项工作。

"d:\eclipse\eclipse.exe -clean"

当我尝试这个时,eclipse 比平时花费了更多的时间来出现,因为它将清理和重新加载插件。

于 2014-02-08T22:26:56.827 回答
3

indigo也有同样的问题,打开原来下载的zip,覆盖plugins目录下所有开头的jar文件,org.eclipse.m2e.*问题就消失了。

于 2012-07-26T13:10:54.420 回答
2

尝试打开 XML 或 Java 文件时的类似问题:
org/eclipse/wst/xml/ui/internal/tabletree/XMLMultiPageEditorPart 无法打开 xml 或 java 文件。

Eclipse 开普勒 4.3。IDE 被 winturds 系统重启杀死。
随后,启动IDE,报错

我的聪明解决方案:通过 File:Exit 退出 IDE 并重新启动 IDE。这以前发生过。

你的旅费可能会改变。

于 2013-09-01T07:33:47.180 回答
0

如果新副本不起作用,则意味着工作区或项目元数据已损坏。尝试创建一个新的工作区。

该问题看起来与 m2eclipse 有关 - eclipse 正在尝试加载 pom-editor 但失败。您也可以尝试安装/更新 m2eclipse。

于 2011-07-17T15:36:24.553 回答
0

露娜也有同样的问题。重新生成对我有用的库插件依赖项。

于 2014-11-06T13:17:14.803 回答