1

I am currently developing an Notes 9 rcp plugin (using Eclipse, the Expeditor Toolkit and the SBT SDK java framework) for connecting to IBM Connections.

I first wrote a standard Java application to test the code (here: getting some blogs and manipulate them, using the SBT SDK) which works fine. But if I use the code inside the plugin, I get an SBTException, that the endpoint wasn't found. So I wonder what I have to change in order to make it work.

I put the managed-bean.xml into the META-INF folder inside the plugin and configured the build properties accordingly. For testing purposes I hardcoded the configuration values in the XML in order to not have to deal with the location of the sbt.properties file.

I also tried to add another META-INF folder inside the src folder and put the managed-bean.xml there.

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

I wonder if I have to use other implementations for RuntimeFactory, Application and Context? Any pointers / ideas are greatly appreciated. Thanks in advance.

CHH
  • 41
  • 3
  • https://github.com/OpenNTF/SocialSDK/tree/master/samples/java/sbt.sample.app is a great place to start... wrapping this into a plugin should be pretty straightforward. – Paul Bastide Nov 07 '13 at 18:23
  • @Paul: Thought so, too. Also since the code is running rather fine in a standard java app. But it seems that I miss something here. As I see, there is also a sample how to create an endpoint "form scratch", without reading the configuration. I am going to try this. Thank you. – CHH Nov 08 '13 at 09:24
  • If I use `private BasicEndpoint createBasicEndpoint(String url, String user, String password) { BasicEndpoint endpoint = new ConnectionsBasicEndpoint(); endpoint.setUrl(url); endpoint.setUser(user); endpoint.setPassword(password); endpoint.setForceTrustSSLCertificate(true); return endpoint; }` I can connect to the connections server. So it seems I need to know how to organize the managed-bean.xml and the sbt.properties files in the plugin so that they are found & read. – CHH Nov 08 '13 at 10:10
  • After reviewing this, I am going to skip the XML Bean configuration - since it makes sense to have a configuration dialog anyway. – CHH Nov 08 '13 at 11:05

0 Answers0