Java 注释9 rcp/IBM SBT SDK:如何正确获取端点

Java 注释9 rcp/IBM SBT SDK:如何正确获取端点,java,lotus-notes,rcp,ibm-connections,ibm-sbt,Java,Lotus Notes,Rcp,Ibm Connections,Ibm Sbt,我目前正在使用Eclipse、Expeditor工具包和SBT SDK java框架开发一个Notes 9 rcp插件,用于连接IBM连接 我首先编写了一个标准Java应用程序来测试这里的代码:使用SBTSDK获取一些博客并对其进行操作,该软件运行良好。 但是如果我使用插件中的代码,我会得到一个SBTException,即找不到端点。所以我想知道我必须改变什么才能让它发挥作用 我将managed-bean.xml放入插件内的META-INF文件夹,并相应地配置了构建属性。出于测试目的,我在XML

我目前正在使用Eclipse、Expeditor工具包和SBT SDK java框架开发一个Notes 9 rcp插件,用于连接IBM连接

我首先编写了一个标准Java应用程序来测试这里的代码:使用SBTSDK获取一些博客并对其进行操作,该软件运行良好。 但是如果我使用插件中的代码,我会得到一个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、应用程序和上下文使用其他实现? 非常感谢您的任何建议/想法。
提前感谢。

是一个很好的开始。。。将其包装到插件中应该非常简单。@Paul:我也这么认为。另外,因为代码在标准java应用程序中运行得相当好。但我似乎错过了一些东西。如我所见,还有一个示例,说明如何在不读取配置的情况下创建端点表单scratch。我要试试这个。谢谢。如果我使用private BasicEndpoint createBasicEndpointString url,字符串用户,字符串密码{BasicEndpoint endpoint=new ConnectionBasicEndpoint;endpoint.setUrlurl;endpoint.setUseruser;endpoint.setPasswordpassword;endpoint.setForceTrustSSLCertificatetrue;return endpoint;}我可以连接到连接服务器。因此,我似乎需要知道如何组织插件中的managed-bean.xml和sbt.properties文件,以便找到和读取它们。在回顾了这一点之后,我将跳过xml bean配置,因为不管怎样,拥有一个配置对话框是有意义的。