eclipse - 尝试运行 Eclipse 产品时出现异常

标签 eclipse eclipse-plugin eclipse-rcp

我在尝试运行没有错误导出的 Eclipse 产品时遇到以下异常

java.lang.NullPointerException
    at org.eclipse.e4.ui.internal.workbench.ModelServiceImpl.<init>

有什么线索吗?

完整的堆栈跟踪:

!SESSION 2013-07-23 02:08:52.676 -----------------------------------------------
eclipse.buildId=unknown
java.version=1.7.0_21
java.vendor=Oracle Corporation
BootLoader constants: OS=linux, ARCH=x86_64, WS=gtk, NL=en_US
Command-line arguments:  -os linux -ws gtk -arch x86_64

!ENTRY org.eclipse.osgi 4 0 2013-07-23 02:08:54.202
!MESSAGE Application error
!STACK 1
java.lang.NullPointerException
    at org.eclipse.e4.ui.internal.workbench.ModelServiceImpl.<init>(ModelServiceImpl.java:124)
    at org.eclipse.e4.ui.internal.workbench.swt.E4Application.createDefaultContext(E4Application.java:471)
    at org.eclipse.e4.ui.internal.workbench.swt.E4Application.createE4Workbench(E4Application.java:199)
    at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:581)
    at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)
    at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:567)
    at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:150)
    at myapp.MyApp.start(MyApp.java:20)
    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:354)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:181)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:601)
    at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:636)
    at org.eclipse.equinox.launcher.Main.basicRun(Main.java:591)
    at org.eclipse.equinox.launcher.Main.run(Main.java:1450)
    at org.eclipse.equinox.launcher.Main.main(Main.java:1426)

最佳答案

在将我的 Eclipse 3.7 应用程序更新到 4.3 后,我遇到了同样的问题。解决方案是将我的产品文件中标签的内容替换为以下内容:

<configurations>
   <plugin id="org.eclipse.core.runtime" autoStart="true" startLevel="2" />
   <plugin id="org.eclipse.equinox.ds" autoStart="true" startLevel="3" />
   <plugin id="org.eclipse.equinox.event" autoStart="true" startLevel="3" />
</configurations>

另见 http://wiki.eclipse.org/Eclipse4/RCP/FAQ#Why_won.27t_my_application_start.3F

关于eclipse - 尝试运行 Eclipse 产品时出现异常,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17802661/

相关文章:

Eclipse - 使用不同的颜色进行打印

c++ - C - Windows 函数(套接字)的编译错误

java - SWTerror : Not implemented [multiple displays] in Eclipse plug-in devlopment 错误

java - 通过 ProblemsView 中的plugin.xml 添加双击操作

maven - 如何使用片段插件修补 eclipse 插件并将其部署到我的 eclipse 产品中?

java - 我如何从源代码中获取 "export"这个 Eclipse 插件?

java - 将 Eclipse 项目导出到 Runnable Jar

android - 已安装的 Android 4.0 现在无法运行项目 - 缺少 resources.ap_

eclipse-rcp - 如何使用 RCPTT 检查 Eclipse RCP 中的窗口是否打开

eclipse - 如何更改打开视角图标?