在 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,并在全新安装时导出/导入插件项目,但没有成功。