1

我目前正在开发一个用于连接到 IBM Connections 的 Notes 9 rcp 插件(使用 Eclipse、Expeditor Toolkit 和 SBT SDK java 框架)。

我首先编写了一个标准的 Java 应用程序来测试代码(这里:获取一些博客并使用 SBT SDK 操作它们),它工作正常。但是如果我使用插件中的代码,我会得到一个 SBTException,即找不到端点。所以我想知道我必须改变什么才能让它发挥作用。

我将 managed-bean.xml 放入插件内的 META-INF 文件夹中,并相应地配置了构建属性。出于测试目的,我在 XML 中对配置值进行了硬编码,以便不必处理 sbt.properties 文件的位置。

我还尝试在 src 文件夹中添加另一个 META-INF 文件夹并将 managed-bean.xml 放在那里。

Creating new Service
RuntimeFactory: com.ibm.commons.runtime.impl.app.RuntimeFactoryStandalone@68c268c2
Application: com.ibm.commons.runtime.impl.app.ApplicationStandalone@19361936
Context: com.ibm.commons.runtime.impl.app.ContextStandalone@3fd83fd8
true
Fetching endpoint 'connections'

com.ibm.sbt.util.SBTException: Cannot find Endpoint connections
    at com.ibm.sbt.services.endpoints.EndpointFactory.getEndpoint(EndpointFactory.java:60)
    at com.ibm.sbt.services.endpoints.EndpointFactory.getEndpoint(EndpointFactory.java:52)
    at de.myapp.service.SbtConnectorService.<init>(SbtConnectorService.java:28)
    at de.myapp.service.SbtProfileConnectorService.<init>(SbtProfileConnectorService.java:30)
    at de.myapp.menu.handler.ToConnectionsBlogMenuHandler.execute(ToConnectionsBlogMenuHandler.java:90)
    at org.eclipse.ui.internal.handlers.HandlerProxy.execute(HandlerProxy.java:281)
    at org.eclipse.core.commands.Command.executeWithChecks(Command.java:476)
    at org.eclipse.core.commands.ParameterizedCommand.executeWithChecks(ParameterizedCommand.java:508)
    at org.eclipse.ui.internal.handlers.HandlerService.executeCommand(HandlerService.java:169)
    at org.eclipse.ui.internal.handlers.SlaveHandlerService.executeCommand(SlaveHandlerService.java:247)
    at org.eclipse.ui.internal.handlers.SlaveHandlerService.executeCommand(SlaveHandlerService.java:247)
    at org.eclipse.ui.menus.CommandContributionItem.handleWidgetSelection(CommandContributionItem.java:619)
    at org.eclipse.ui.menus.CommandContributionItem.access$10(CommandContributionItem.java:605)
    at org.eclipse.ui.menus.CommandContributionItem$4.handleEvent(CommandContributionItem.java:595)
    at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
    at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1053)
    at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4166)
    at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3755)
    at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2384)
    at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2348)
    at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2200)
    at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:495)
    at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:288)
    at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:490)
    at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
    at com.ibm.rcp.personality.framework.internal.RCPApplication.run(RCPApplication.java:67)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:60)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37)
    at java.lang.reflect.Method.invoke(Method.java:611)
    at org.eclipse.equinox.internal.app.EclipseAppContainer.callMethodWithException(EclipseAppContainer.java:574)
    at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:195)
    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:386)
    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:60)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:37)
    at java.lang.reflect.Method.invoke(Method.java:611)
    at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:549)
    at org.eclipse.equinox.launcher.Main.basicRun(Main.java:504)
    at org.eclipse.equinox.launcher.Main.run(Main.java:1236)
    at org.eclipse.equinox.launcher.Main.main(Main.java:1212)
Cannot find Endpoint connections

我想知道我是否必须为 RuntimeFactory、Application 和 Context 使用其他实现?非常感谢任何指针/想法。提前致谢。

4

0 回答 0