迁移在eclipse 3.7中开发的插件到eclipse 4.4.2

时间:2015-12-30 13:20:19

标签: eclipse plugins eclipse-plugin migration

我有在Eclipse 3中开发的插件,现在我想将这些插件迁移到4.4.2。

但是,如果我尝试运行或创建产品,我会遇到错误。

我有1个功能产品和20个插件。 我已将这些插件添加到功能产品中,并从那里运行产品。

请建议我在没有任何问题的情况下构建产品的人。

错误 !SESSION 2015-12-30 15:23:00.081 ----------------------------------------------- eclipse.buildId=unknown java.version=1.8.0_66 java.vendor=Oracle Corporation BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=en_US Framework arguments: -product com.bosch.de.iStar.Branding.iStar Command-line arguments: -product com.bosch.de.iStar.Branding.iStar -data B:\workspaces\Plug in development/../runtime-iStar.product -dev file:B:/workspaces/Plug in development/.metadata/.plugins/org.eclipse.pde.core/iStar.product/dev.properties -os win32 -ws win32 -arch x86 -consoleLog

!ENTRY org.eclipse.core.runtime 4 0 2015-12-30 15:23:00.627 !MESSAGE FrameworkEvent ERROR !STACK 0 org.osgi.framework.BundleException: Could not resolve module: org.eclipse.core.runtime [2] Unresolved requirement: Require-Bundle: javax.annotation; bundle-version="1.1.0"; visibility:="reexport"; resolution:="optional" Unresolved requirement: Require-Bundle: javax.inject; bundle-version="1.0.0"; visibility:="reexport"; resolution:="optional" Unresolved requirement: Require-Bundle: org.eclipse.core.jobs; bundle-version="[3.2.0,4.0.0)"; visibility:="reexport"

at org.eclipse.osgi.container.Module.start(Module.java:434) at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:1582) at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:1562) at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.doContainerStartLevel(ModuleContainer.java:1533) at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.dispatchEvent(ModuleContainer.java:1476) at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.dispatchEvent(ModuleContainer.java:1) at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230) at org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:340)

!ENTRY org.eclipse.osgi 4 0 2015-12-30 15:23:00.631 !MESSAGE Bundle initial@reference:file:plugins/org.eclipse.core.runtime_3.10.0.v20140318-2214.jar was not resolved.

!ENTRY org.eclipse.core.runtime 2 0 2015-12-30 15:23:00.637 !MESSAGE Could not resolve module: org.eclipse.core.runtime [2] Unresolved requirement: Require-Bundle: javax.annotation; bundle-version="1.1.0"; visibility:="reexport"; resolution:="optional" Unresolved requirement: Require-Bundle: javax.inject; bundle-version="1.0.0"; visibility:="reexport"; resolution:="optional" Unresolved requirement: Require-Bundle: org.eclipse.core.jobs; bundle-version="[3.2.0,4.0.0)"; visibility:="reexport"

!ENTRY org.eclipse.osgi 4 0 2015-12-30 15:23:00.659 !MESSAGE Application error !STACK 1 java.lang.IllegalStateException: Unable to acquire application service. Ensure that the org.eclipse.core.runtime bundle is resolved and started (see config.ini). at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:78) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:380) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:235) 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:648) at org.eclipse.equinox.launcher.Main.basicRun(Main.java:603) at org.eclipse.equinox.launcher.Main.run(Main.java:1465) at org.eclipse.equinox.launcher.Main.main(Main.java:1438)

1 个答案:

答案 0 :(得分:0)

(问题中的错误格式有点乱,很难读,如果你能纠正那么棒!)

确保您拥有所需的所有依赖项。特别是错误表明您没有 javax.annotation

这是错误消息的一部分:

  

ENTRY org.eclipse.core.runtime 4 0 2015-12-30 15:23:00.627!MESSAGE FrameworkEvent ERROR!STACK 0 org.osgi.framework.BundleException:无法解析模块:org.eclipse.core.runtime 2未解决的要求:Require-Bundle:javax.annotation;捆绑版本=" 1.1.0&#34 ;;能见度:="再出口&#34 ;;分辨率:="可选"未解决的要求:Require-Bundle:javax.inject;捆绑版本=" 1.0.0&#34 ;;能见度:="再出口&#34 ;;分辨率:="可选"未解决的要求:Require-Bundle:org.eclipse.core.jobs;捆绑版本=" [3.2.0,4.0.0)&#34 ;;能见度:="再出口"

这就是您的计算机上可能出现的错误消息(格式化,而不是明细):

!ENTRY org.eclipse.ui 4 0 2015-12-30 14:16:58.931
!MESSAGE FrameworkEvent ERROR
!STACK 0
org.osgi.framework.BundleException: Could not resolve module: org.eclipse.ui [12]
  Unresolved requirement: Require-Bundle: org.eclipse.ui.workbench; bundle-version="[3.105.0,4.0.0)"; visibility:="reexport"
    -> Bundle-SymbolicName: org.eclipse.ui.workbench; bundle-version="3.107.0.v20150510-1732"; singleton:="true"
       org.eclipse.ui.workbench [151]
         Unresolved requirement: Import-Package: javax.annotation; version="1.0.0"

    at org.eclipse.osgi.container.Module.start(Module.java:434)
    at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:1582)
    at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:1561)
    at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.doContainerStartLevel(ModuleContainer.java:1533)
    at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.dispatchEvent(ModuleContainer.java:1476)
    at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.dispatchEvent(ModuleContainer.java:1)
    at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230)
    at org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:340)

因此,检查启动配置中是否包含 javax.annotation ,或者如果您在失败之前导出产品,请确保它位于.product文件的依赖关系链中

启动配置

enter image description here

产品文件

enter image description here