1

在 Windows 7 x64 机器上,我有一个工作的 eclipse 安装和工作区,我可以从中完美地运行/调试 Teamcenter 富客户端(在 Eclipse 3.6 上运行)的插件。

现在我将 eclipse 和工作区移动到另一台 Windows 7 x64 机器上,确保我

  • 具有相同版本的 JRE
  • 具有相同的配置和安装路径
  • 具有相同的目标平台(Teamcenter)安装(至少相同的插件集)

但是在新机器上,当我启动调试配置时,应用程序无法启动并出现以下异常:

org.osgi.framework.ServiceException: Exception in org.eclipse.equinox.internal.ds.ServiceReg.getService()
    at org.eclipse.osgi.internal.serviceregistry.ServiceUse.getService(ServiceUse.java:130)
    at org.eclipse.osgi.internal.serviceregistry.ServiceRegistrationImpl.getService(ServiceRegistrationImpl.java:447)
    at org.eclipse.osgi.internal.serviceregistry.ServiceRegistry.getService(ServiceRegistry.java:430)
    at org.eclipse.osgi.framework.internal.core.BundleContextImpl.getService(BundleContextImpl.java:667)
    at com.teamcenter.rac.util.OSGIUtil.getService(Unknown Source)
    at com.teamcenter.rac.util.OSGIUtil.getService(Unknown Source)
    at com.teamcenter.rac.aifrcp.Application.runApplication(Unknown Source)
    at com.teamcenter.rac.aifrcp.Application.start(Unknown Source)
    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:369)
    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:619)
    at org.eclipse.equinox.launcher.Main.basicRun(Main.java:574)
    at org.eclipse.equinox.launcher.Main.run(Main.java:1407)
    at org.eclipse.equinox.launcher.Main.main(Main.java:1383)
Caused by: org.osgi.service.component.ComponentException: The component was not built because some of its references could not be bound. The component is Component[
    name = com.teamcenter.rac.aifrcp.RCPPortal
    activate = activate
    deactivate = deactivate
    modified = 
    configuration-policy = optional
    factory = null
    autoenable = true
    immediate = false
    implementation = com.teamcenter.rac.aifrcp.RCPPortal
    state = Unsatisfied
    properties = 
    serviceFactory = false
    serviceInterface = [com.teamcenter.rac.services.IPortalService]
    references = {
        Reference[name = ISessionService, interface = com.teamcenter.rac.services.ISessionService, policy = static, cardinality = 1..1, target = null, bind = setSessionService, unbind = null]
    }
    located in bundle = com.teamcenter.rac.aifrcp_9000.1.0 [594]
]
    at org.eclipse.equinox.internal.ds.model.ServiceComponentProp.build(ServiceComponentProp.java:342)
    at org.eclipse.equinox.internal.ds.InstanceProcess.buildComponent(InstanceProcess.java:580)
    at org.eclipse.equinox.internal.ds.ServiceReg.getService(ServiceReg.java:53)
    at org.eclipse.osgi.internal.serviceregistry.ServiceUse$1.run(ServiceUse.java:120)
    at java.security.AccessController.doPrivileged(Native Method)
    at org.eclipse.osgi.internal.serviceregistry.ServiceUse.getService(ServiceUse.java:118)
    ... 20 more

在第二台机器上,我还尝试使用其他 Eclipse 版本和 JRE,并在全新安装时导出/导入插件项目,但没有成功。

4

1 回答 1

3

问题出在.target我用来指定目标平台的文件中(在本例中为 Teamcenter)。

假设我的plugins文件夹在 path 中C:\plm\plmsw\tcroot\portal\plugins

Eclipse 在 .target 文件中接受以下两种形式:

  1. 插件位置 =C:\plm\plmsw\tcroot\portal\plugins Eclipse 中的 Teamcenter 目标(版本不正确)

  2. 插件位置 =C:\plm\plmsw\tcroot\portal Eclipse 中的 Teamcenter 目标(正确版本)

但是在运行时,只有几秒钟是正确的,因为它被作为富客户端的基本路径。该错误源于 Teamcenter 未找到该registry文件夹​​,该文件夹是在其正确位置搜索C:\plm\plmsw\tcroot\portal\plugins\registry而不是在其正确位置C:\plm\plmsw\tcroot\portal\registry

于 2016-12-13T16:36:05.840 回答