Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/xpath/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Java 8 Eclipse E4应用程序无法使用产品文件运行_Java 8_Eclipse Rcp_E4 - Fatal编程技术网

Java 8 Eclipse E4应用程序无法使用产品文件运行

Java 8 Eclipse E4应用程序无法使用产品文件运行,java-8,eclipse-rcp,e4,Java 8,Eclipse Rcp,E4,我有一个Eclipse4应用程序。当我使用产品文件的测试部分启动应用程序时,它将运行,但在启动过程中会抛出很多错误 开始使用产品文件时将引发的错误如下所示: !ENTRY org.eclipse.osgi 4 0 2017-05-11 14:24:11.013 !MESSAGE An error occurred while automatically activating bundle CR-IT_client (2). !STACK 0 org.osgi.framework.BundleEx

我有一个Eclipse4应用程序。当我使用产品文件的测试部分启动应用程序时,它将运行,但在启动过程中会抛出很多错误

开始使用产品文件时将引发的错误如下所示:

!ENTRY org.eclipse.osgi 4 0 2017-05-11 14:24:11.013 !MESSAGE An error occurred while automatically activating bundle CR-IT_client (2). !STACK 0 org.osgi.framework.BundleException: Exception in com.client.eclipse.Activator.start() of bundle CR-IT_client.
at org.eclipse.osgi.internal.framework.BundleContextImpl.startActivator(BundleContextImpl.java:795)
    at org.eclipse.osgi.internal.framework.BundleContextImpl.start(BundleContextImpl.java:724)
    at org.eclipse.osgi.internal.framework.EquinoxBundle.startWorker0(EquinoxBundle.java:932)
    at org.eclipse.osgi.internal.framework.EquinoxBundle$EquinoxModule.startWorker(EquinoxBundle.java:309)
    at org.eclipse.osgi.container.Module.doStart(Module.java:581)
    at org.eclipse.osgi.container.Module.start(Module.java:449)
    at org.eclipse.osgi.framework.util.SecureAction.start(SecureAction.java:470)
    at org.eclipse.osgi.internal.hooks.EclipseLazyStarter.postFindLocalClass(EclipseLazyStarter.java:107)
    at org.eclipse.osgi.internal.loader.classpath.ClasspathManager.findLocalClass(ClasspathManager.java:529)
    at org.eclipse.osgi.internal.loader.ModuleClassLoader.findLocalClass(ModuleClassLoader.java:325)
    at org.eclipse.osgi.internal.loader.BundleLoader.findLocalClass(BundleLoader.java:345)
    at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:423)
    at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:372)
    at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:364)
    at org.eclipse.osgi.internal.loader.ModuleClassLoader.loadClass(ModuleClassLoader.java:161)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at org.eclipse.osgi.internal.framework.EquinoxBundle.loadClass(EquinoxBundle.java:564)
    at org.eclipse.e4.ui.internal.workbench.ReflectionContributionFactory.createFromBundle(ReflectionContributionFactory.java:103)
    at org.eclipse.e4.ui.internal.workbench.ReflectionContributionFactory.doCreate(ReflectionContributionFactory.java:74)
    at org.eclipse.e4.ui.internal.workbench.ReflectionContributionFactory.create(ReflectionContributionFactory.java:56)
    at org.eclipse.e4.ui.internal.workbench.swt.E4Application.lambda$0(E4Application.java:235)
    at java.util.Optional.ifPresent(Unknown Source)
    at org.eclipse.e4.ui.internal.workbench.swt.E4Application.createE4Workbench(E4Application.java:234)
    at org.eclipse.e4.ui.internal.workbench.swt.E4Application.start(E4Application.java:148)
    at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
    at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134)
    at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:388)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:243)
    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:673)
    at org.eclipse.equinox.launcher.Main.basicRun(Main.java:610)
    at org.eclipse.equinox.launcher.Main.run(Main.java:1519)
    at org.eclipse.equinox.launcher.Main.main(Main.java:1492)
在Eclipse中使用我的运行配置运行应用程序时,它确实可以正常工作,没有任何错误。此外,当我将应用程序导出到二进制文件时,它将毫无问题地运行


有人能帮我解决这个问题吗?

从这个堆栈跟踪中可以说,
com.client.eclipse.Activator.start
正在抛出一个异常。is与System.getProperty(“serverURI”)调用有关。但是在我的产品文件中设置了名为serverURI的属性。我一点也不知道,请进行一些调试。写出代码看到的值。好的,当我使用-D将变量放在VM参数中时,它不会有任何问题。但是为什么Eclipse不从产品文件中自己设置它呢?您需要查看测试所使用的运行配置。它可能只是根据运行配置设置构建一个默认的config.ini。.product config.ini设置仅由导出的RCP使用。