Grabbing data using REST API

CodeRookie
edited February 11, 2022 in Analytics #1

Hi, all! I'm in the process of learning how to use APIs to pull in data from our Intelex site, and am running into a problem. I've followed the steps detailed here:

[https://communities.opentext.com/forums/discussion/61303/rest-api-oda-plugin-for-birt],

but I keep getting the following error:

org.eclipse.datatools.connectivity.oda.OdaException ;
java.lang.NullPointerException

at org.eclipse.datatools.connectivity.oda.profile.OdaConnectionWrapper.open(OdaConnectionWrapper.java:215)

at org.eclipse.datatools.connectivity.oda.profile.OdaConnectionWrapper.<init>(OdaConnectionWrapper.java:59)

at org.eclipse.datatools.connectivity.oda.profile.OdaConnectionFactory.createConnection(OdaConnectionFactory.java:26)

at org.eclipse.datatools.connectivity.internal.ConnectionFactoryProvider.createConnection(ConnectionFactoryProvider.java:83)

at org.eclipse.datatools.connectivity.internal.ConnectionProfile.createConnection(ConnectionProfile.java:359)

at org.eclipse.datatools.connectivity.ui.PingJob.createTestConnection(PingJob.java:76)

at org.eclipse.datatools.connectivity.oda.design.internal.ui.DataSourceEditorPageCore$1.run(DataSourceEditorPageCore.java:629)

at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:70)

at org.eclipse.datatools.connectivity.ui.wizards.ProfileDetailsPropertyPage.testConnection(ProfileDetailsPropertyPage.java:98)

at org.eclipse.datatools.connectivity.ui.wizards.ProfileDetailsPropertyPage$1.widgetSelected(ProfileDetailsPropertyPage.java:80)

at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:248)

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:4169)

at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3758)

at org.eclipse.jface.window.Window.runEventLoop(Window.java:825)

at org.eclipse.jface.window.Window.open(Window.java:801)

at org.eclipse.birt.report.designer.ui.dialogs.BaseDialog.open(BaseDialog.java:117)

at org.eclipse.birt.report.designer.data.ui.providers.EditableDataSourceNodeProvider.performEdit(EditableDataSourceNodeProvider.java:73)

at org.eclipse.birt.report.designer.internal.ui.views.DefaultNodeProvider.performRequest(DefaultNodeProvider.java:472)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

at java.lang.reflect.Method.invoke(Method.java:483)

at org.eclipse.birt.report.designer.ui.views.ElementAdapterInvocationHandler.invoke(ElementAdapterInvocationHandler.java:89)

at com.sun.proxy.$Proxy41.performRequest(Unknown Source)

at org.eclipse.birt.report.designer.internal.ui.views.actions.EditAction.doAction(EditAction.java:85)

at org.eclipse.birt.report.designer.internal.ui.views.actions.AbstractElementAction.run(AbstractElementAction.java:70)

at org.eclipse.birt.report.designer.internal.ui.views.RenameListener.doubleClick(RenameListener.java:214)

at org.eclipse.jface.viewers.StructuredViewer$1.run(StructuredViewer.java:845)

at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)

at org.eclipse.ui.internal.JFaceUtil$1.run(JFaceUtil.java:49)

at org.eclipse.jface.util.SafeRunnable.run(SafeRunnable.java:175)

at org.eclipse.jface.viewers.StructuredViewer.fireDoubleClick(StructuredViewer.java:843)

at org.eclipse.jface.viewers.AbstractTreeViewer.handleDoubleSelect(AbstractTreeViewer.java:1477)

at org.eclipse.jface.viewers.StructuredViewer$4.widgetDefaultSelected(StructuredViewer.java:1246)

at org.eclipse.jface.util.OpenStrategy.fireDefaultSelectionEvent(OpenStrategy.java:249)

at org.eclipse.jface.util.OpenStrategy.access$0(OpenStrategy.java:246)

at org.eclipse.jface.util.OpenStrategy$1.handleEvent(OpenStrategy.java:307)

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:4169)

at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3758)

at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$9.run(PartRenderingEngine.java:1053)

at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)

at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:942)

at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:86)

at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:588)

at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:332)

at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:543)

at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)

at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:124)

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:353)

at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:180)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

at java.lang.reflect.Method.invoke(Method.java:483)

at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:629)

at org.eclipse.equinox.launcher.Main.basicRun(Main.java:584)

at org.eclipse.equinox.launcher.Main.run(Main.java:1438)

Caused by: java.lang.NullPointerException

at org.eclipse.birt.report.data.oda.restapi.impl.Connection.open(Connection.java:50)

at org.eclipse.datatools.connectivity.oda.consumer.helper.OdaConnection.open(OdaConnection.java:250)

at org.eclipse.datatools.connectivity.oda.profile.OdaConnectionWrapper.open(OdaConnectionWrapper.java:209)

... 63 more

Any thoughts on how this might be alleviated?

Thanks,
Scott

Answers

  • Hi Scott,

    Have you tried getting a Fiddler capture to see what is being sent? Taking a different angle, I believe you have version 3.1.1. If you are able to upgrade to 16, it comes bundled with a dedicated REST ODA.

    Warning No formatter is installed for the format ipb
  • Jeff,
    Good morning! I think part / all of the problem (as I discovered after I posted this question) is that the REST API must be enabled on our INTELEX platform. I emailed one of their support staff this morning to find out how to see if it is enabled, and if not, how to enable it. So, I'll let you know what I find.

    Have a great day!

    Scott