Skip to main content



      Home
Home » Archived » BIRT » DB2 Driver connection issues
DB2 Driver connection issues [message #179516] Fri, 21 July 2006 16:20 Go to next message
Eclipse UserFriend
I am having issues connecting to DB2 via a JDBC datasource. So far I've
tried both the Universal (com.ibm.db2.jcc.DB2Driver) and app
(COM.ibm.db2.jdbc.app.DB2Driver) drivers. In both cases, I copied the
zip and .jar files out to the ODA drivers folder
(org.eclipse.birt.report.data.oda.jdbc_2.1.0.N20060628-1351\ drivers).
After restarting Eclipse, I could select the drivers from the dropdown
when setting up the data source.

For the universal driver, test connections succeed, but when I try to
create a dataset using the data source, within the query builder I only
see the top-level database icon, without the underlying tables in the
tree. No SQL queries will work against it.

For the app driver, test connections fail, with "cannot create instance of
JDBC Driver class".

This is using BIRT 2.1 under Eclipse 3.2 final.

Any troubleshooting ideas would be appreciated. Thanks!
Re: DB2 Driver connection issues [message #179524 is a reply to message #179516] Fri, 21 July 2006 16:43 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: bjeffcoa.gmail.com

Jonathan,
I couldn't tell if you already did this, but make sure all of these
files are in the drivers directory for the universal driver:

db2jcc.jar
db2jcc_license_cisuz.jar
db2jcc_license_cu.jar


Jonathan Halper wrote:
> I am having issues connecting to DB2 via a JDBC datasource. So far I've
> tried both the Universal (com.ibm.db2.jcc.DB2Driver) and app
> (COM.ibm.db2.jdbc.app.DB2Driver) drivers. In both cases, I copied the
> zip and .jar files out to the ODA drivers folder
> (org.eclipse.birt.report.data.oda.jdbc_2.1.0.N20060628-1351\ drivers).
> After restarting Eclipse, I could select the drivers from the dropdown
> when setting up the data source.
>
> For the universal driver, test connections succeed, but when I try to
> create a dataset using the data source, within the query builder I only
> see the top-level database icon, without the underlying tables in the
> tree. No SQL queries will work against it.
>
> For the app driver, test connections fail, with "cannot create instance
> of JDBC Driver class".
>
> This is using BIRT 2.1 under Eclipse 3.2 final.
>
> Any troubleshooting ideas would be appreciated. Thanks!
>
>
>
>
>
Re: DB2 Driver connection issues [message #179811 is a reply to message #179524] Mon, 24 July 2006 13:52 Go to previous messageGo to next message
Eclipse UserFriend
Ben,

Thanks for the response. Yes, I have db2jcc_license_cisuz.jar present in
the drivers folder. We are able to use that JCC type 4 driver (version
8.1.5) in conjunction with the license file for SQL execution today, but
the problem happens when BIRT is retrieving metadata, so we can't get to
where we can execute a SQL query.

I talked with our DBA. The DB2 stored procedures that are required for
the DB2 metadata retrieval are in place. He could see I successfully
connected, and a flurry of requests for metadata came through, which had a
successful return status (0). However, those were followed by a -104 and
-514 errors, with invalid SQL statements coming across like "SELECT FROM
" (no fields or tables specified).

Here's a trace from my .log file in the Eclipse workspace .metadata folder:

!ENTRY org.eclipse.birt.data 4 1001 2006-07-24 10:56:45.783
!MESSAGE A BIRT exception occurred.
!STACK 0
org.eclipse.birt.data.engine.core.DataException: Cannot get the result set
metadata.
SQL statement does not return a ResultSet object.
SQL error #1: DB2 SQL error: SQLCODE: -104, SQLSTATE: null, SQLERRMC: null
SQL error #2: DB2 SQL error: SQLCODE: -514, SQLSTATE: null, SQLERRMC: null

at
org.eclipse.birt.data.engine.odaconsumer.PreparedStatement.g etRuntimeMetaData(PreparedStatement.java:379)
at
org.eclipse.birt.data.engine.odaconsumer.PreparedStatement.g etProjectedColumns(PreparedStatement.java:339)
at
org.eclipse.birt.data.engine.odaconsumer.PreparedStatement.s etColumnsProjection(PreparedStatement.java:1028)
at
org.eclipse.birt.data.engine.executor.DataSourceQuery.prepar e(DataSourceQuery.java:258)
at
org.eclipse.birt.data.engine.impl.PreparedOdaDSQuery$OdaDSQu eryExecutor.prepareOdiQuery(PreparedOdaDSQuery.java:271)
at
org.eclipse.birt.data.engine.impl.QueryExecutor.prepareExecu tion(QueryExecutor.java:226)
at
org.eclipse.birt.data.engine.impl.PreparedQuery.doPrepare(Pr eparedQuery.java:366)
at
org.eclipse.birt.data.engine.impl.PreparedDataSourceQuery.ex ecute(PreparedDataSourceQuery.java:139)
at
org.eclipse.birt.data.engine.impl.PreparedDataSourceQuery.ex ecute(PreparedDataSourceQuery.java:122)
at
org.eclipse.birt.report.data.adapter.impl.QueryExecutionHelp er.executeQuery(QueryExecutionHelper.java:106)
at
org.eclipse.birt.report.data.adapter.impl.DataRequestSession Impl.executeQuery(DataRequestSessionImpl.java:190)
at
org.eclipse.birt.report.designer.data.ui.util.DataSetProvide r.executeQuery(DataSetProvider.java:372)
at
org.eclipse.birt.report.designer.data.ui.util.DataSetProvide r.execute(DataSetProvider.java:267)
at
org.eclipse.birt.report.designer.data.ui.util.DataSetProvide r.getColumns(DataSetProvider.java:165)
at
org.eclipse.birt.report.designer.data.ui.dataset.DataSetEdit or$ItemModelManager.getCurrentItemModel(DataSetEditor.java:1 046)
at
org.eclipse.birt.report.designer.data.ui.dataset.DataSetEdit or.getCurrentItemModel(DataSetEditor.java:497)
at
org.eclipse.birt.report.designer.data.ui.dataset.OutputColum nsPage.updateOutputColumns(OutputColumnsPage.java:225)
at
org.eclipse.birt.report.designer.data.ui.dataset.OutputColum nsPage.pageActivated(OutputColumnsPage.java:361)
at
org.eclipse.birt.report.designer.data.ui.property.AbstractPr opertyDialog.showPage(AbstractPropertyDialog.java:449)
at
org.eclipse.birt.report.designer.data.ui.property.AbstractPr opertyDialog.showSelectionPage(AbstractPropertyDialog.java:3 46)
at
org.eclipse.birt.report.designer.data.ui.dataset.DataSetEdit or.showSelectionPage(DataSetEditor.java:926)
at
org.eclipse.birt.report.designer.data.ui.property.AbstractPr opertyDialog$2.run(AbstractPropertyDialog.java:304)
at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator .java:67)
at
org.eclipse.birt.report.designer.data.ui.property.AbstractPr opertyDialog$1.selectionChanged(AbstractPropertyDialog.java: 299)
at org.eclipse.jface.viewers.Viewer$2.run(Viewer.java:162)
at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:37)
at org.eclipse.core.runtime.Platform.run(Platform.java:843)
at org.eclipse.ui.internal.JFaceUtil$1.run(JFaceUtil.java:44)
at org.eclipse.jface.util.SafeRunnable.run(SafeRunnable.java:14 9)
at org.eclipse.jface.viewers.Viewer.fireSelectionChanged(Viewer .java:160)
at
org.eclipse.jface.viewers.StructuredViewer.updateSelection(S tructuredViewer.java:1976)
at
org.eclipse.jface.viewers.StructuredViewer.setSelection(Stru cturedViewer.java:1577)
at org.eclipse.jface.viewers.Viewer.setSelection(Viewer.java:38 4)
at
org.eclipse.birt.report.designer.data.ui.property.AbstractPr opertyDialog.initTreeSelection(AbstractPropertyDialog.java:2 75)
at
org.eclipse.birt.report.designer.data.ui.property.AbstractPr opertyDialog.createDialogArea(AbstractPropertyDialog.java:26 0)
at org.eclipse.jface.dialogs.Dialog.createContents(Dialog.java: 802)
at
org.eclipse.birt.report.designer.data.ui.dataset.DataSetEdit or.createContents(DataSetEditor.java:472)
at org.eclipse.jface.window.Window.create(Window.java:426)
at org.eclipse.jface.dialogs.Dialog.create(Dialog.java:1124)
at
org.eclipse.birt.report.designer.internal.ui.dialogs.BaseDia log.open(BaseDialog.java:85)
at
org.eclipse.birt.report.designer.ui.actions.NewDataSetAction .editDataSet(NewDataSetAction.java:192)
at
org.eclipse.birt.report.designer.ui.actions.NewDataSetAction .run(NewDataSetAction.java:128)
at org.eclipse.jface.action.Action.runWithEvent(Action.java:499 )
at
org.eclipse.jface.action.ActionContributionItem.handleWidget Selection(ActionContributionItem.java:539)
at
org.eclipse.jface.action.ActionContributionItem.access$2(Act ionContributionItem.java:488)
at
org.eclipse.jface.action.ActionContributionItem$5.handleEven t(ActionContributionItem.java:400)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java :66)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:928)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.ja va:3348)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java :2968)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.jav a:1914)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1878)
at
org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Work bench.java:419)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.j ava:149)
at org.eclipse.ui.internal.ide.IDEApplication.run(IDEApplicatio n.java:95)
at
org.eclipse.core.internal.runtime.PlatformActivator$1.run(Pl atformActivator.java:78)
at
org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher .runApplication(EclipseAppLauncher.java:92)
at
org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher .start(EclipseAppLauncher.java:68)
at
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:400)
at
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:177)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.eclipse.core.launcher.Main.invokeFramework(Main.java:336 )
at org.eclipse.core.launcher.Main.basicRun(Main.java:280)
at org.eclipse.core.launcher.Main.run(Main.java:977)
at org.eclipse.core.launcher.Main.main(Main.java:952)
Caused by: org.eclipse.birt.report.data.oda.jdbc.JDBCException: SQL
statement does not return a ResultSet object.
SQL error #1: DB2 SQL error: SQLCODE: -104, SQLSTATE: null, SQLERRMC: null
SQL error #2: DB2 SQL error: SQLCODE: -514, SQLSTATE: null, SQLERRMC: null

at
org.eclipse.birt.report.data.oda.jdbc.Statement.executeQuery (Statement.java:344)
at
org.eclipse.birt.report.data.oda.jdbc.Statement.getMetaData( Statement.java:296)
at
org.eclipse.datatools.connectivity.oda.consumer.helper.OdaQu ery.doGetMetaData(OdaQuery.java:388)
at
org.eclipse.datatools.connectivity.oda.consumer.helper.OdaQu ery.getMetaData(OdaQuery.java:356)
at
org.eclipse.birt.data.engine.odaconsumer.PreparedStatement.g etRuntimeMetaData(PreparedStatement.java:369)
... 67 more
Caused by: com.ibm.db2.jcc.c.SqlException: DB2 SQL error: SQLCODE: -104,
SQLSTATE: null, SQLERRMC: null
at com.ibm.db2.jcc.c.cw.e(cw.java:1490)
at com.ibm.db2.jcc.c.cw.a(cw.java:1100)
at com.ibm.db2.jcc.b.bd.h(bd.java:138)
at com.ibm.db2.jcc.b.bd.d(bd.java:70)
at com.ibm.db2.jcc.b.r.d(r.java:75)
at com.ibm.db2.jcc.b.bs.j(bs.java:196)
at com.ibm.db2.jcc.c.cw.m(cw.java:1097)
at com.ibm.db2.jcc.c.cx.d(cx.java:1986)
at com.ibm.db2.jcc.c.cx.T(cx.java:422)
at com.ibm.db2.jcc.c.cx.executeQuery(cx.java:405)
at
org.eclipse.birt.report.data.oda.jdbc.Statement.executeQuery (Statement.java:340)
... 71 more


Ben Jeffcoat wrote:

> Jonathan,
> I couldn't tell if you already did this, but make sure all of these
> files are in the drivers directory for the universal driver:

> db2jcc.jar
> db2jcc_license_cisuz.jar
> db2jcc_license_cu.jar


> Jonathan Halper wrote:
>> I am having issues connecting to DB2 via a JDBC datasource. So far I've
>> tried both the Universal (com.ibm.db2.jcc.DB2Driver) and app
>> (COM.ibm.db2.jdbc.app.DB2Driver) drivers. In both cases, I copied the
>> zip and .jar files out to the ODA drivers folder
>> (org.eclipse.birt.report.data.oda.jdbc_2.1.0.N20060628-1351d rivers).
>> After restarting Eclipse, I could select the drivers from the dropdown
>> when setting up the data source.
>>
>> For the universal driver, test connections succeed, but when I try to
>> create a dataset using the data source, within the query builder I only
>> see the top-level database icon, without the underlying tables in the
>> tree. No SQL queries will work against it.
>>
>> For the app driver, test connections fail, with "cannot create instance
>> of JDBC Driver class".
>>
>> This is using BIRT 2.1 under Eclipse 3.2 final.
>>
>> Any troubleshooting ideas would be appreciated. Thanks!
>>
>>
>>
>>
>>
Re: DB2 Driver connection issues [message #179998 is a reply to message #179811] Tue, 25 July 2006 10:37 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: bjeffcoa.gmail.com

Jonathan,
Sorry...looks like you are beyond my expertise with this problem. I
would try executing the simplest SQL statement you can and build up from
there to try to see what is causing the problem. Also you could try to
run a similar query using a JDBC java program and see if the same issues
exist outside of BIRT...

Ben



Jonathan Halper wrote:
> Ben,
>
> Thanks for the response. Yes, I have db2jcc_license_cisuz.jar present
> in the drivers folder. We are able to use that JCC type 4 driver
> (version 8.1.5) in conjunction with the license file for SQL execution
> today, but the problem happens when BIRT is retrieving metadata, so we
> can't get to where we can execute a SQL query.
>
> I talked with our DBA. The DB2 stored procedures that are required for
> the DB2 metadata retrieval are in place. He could see I successfully
> connected, and a flurry of requests for metadata came through, which had
> a successful return status (0). However, those were followed by a -104
> and -514 errors, with invalid SQL statements coming across like "SELECT
> FROM " (no fields or tables specified).
>
> Here's a trace from my .log file in the Eclipse workspace .metadata folder:
>
> !ENTRY org.eclipse.birt.data 4 1001 2006-07-24 10:56:45.783
> !MESSAGE A BIRT exception occurred.
> !STACK 0
> org.eclipse.birt.data.engine.core.DataException: Cannot get the result
> set metadata.
> SQL statement does not return a ResultSet object.
> SQL error #1: DB2 SQL error: SQLCODE: -104, SQLSTATE: null, SQLERRMC: null
> SQL error #2: DB2 SQL error: SQLCODE: -514, SQLSTATE: null, SQLERRMC: null
>
> at
> org.eclipse.birt.data.engine.odaconsumer.PreparedStatement.g etRuntimeMetaData(PreparedStatement.java:379)
>
> at
> org.eclipse.birt.data.engine.odaconsumer.PreparedStatement.g etProjectedColumns(PreparedStatement.java:339)
>
> at
> org.eclipse.birt.data.engine.odaconsumer.PreparedStatement.s etColumnsProjection(PreparedStatement.java:1028)
>
> at
> org.eclipse.birt.data.engine.executor.DataSourceQuery.prepar e(DataSourceQuery.java:258)
>
> at
> org.eclipse.birt.data.engine.impl.PreparedOdaDSQuery$OdaDSQu eryExecutor.prepareOdiQuery(PreparedOdaDSQuery.java:271)
>
> at
> org.eclipse.birt.data.engine.impl.QueryExecutor.prepareExecu tion(QueryExecutor.java:226)
>
> at
> org.eclipse.birt.data.engine.impl.PreparedQuery.doPrepare(Pr eparedQuery.java:366)
>
> at
> org.eclipse.birt.data.engine.impl.PreparedDataSourceQuery.ex ecute(PreparedDataSourceQuery.java:139)
>
> at
> org.eclipse.birt.data.engine.impl.PreparedDataSourceQuery.ex ecute(PreparedDataSourceQuery.java:122)
>
> at
> org.eclipse.birt.report.data.adapter.impl.QueryExecutionHelp er.executeQuery(QueryExecutionHelper.java:106)
>
> at
> org.eclipse.birt.report.data.adapter.impl.DataRequestSession Impl.executeQuery(DataRequestSessionImpl.java:190)
>
> at
> org.eclipse.birt.report.designer.data.ui.util.DataSetProvide r.executeQuery(DataSetProvider.java:372)
>
> at
> org.eclipse.birt.report.designer.data.ui.util.DataSetProvide r.execute(DataSetProvider.java:267)
>
> at
> org.eclipse.birt.report.designer.data.ui.util.DataSetProvide r.getColumns(DataSetProvider.java:165)
>
> at
> org.eclipse.birt.report.designer.data.ui.dataset.DataSetEdit or$ItemModelManager.getCurrentItemModel(DataSetEditor.java:1 046)
>
> at
> org.eclipse.birt.report.designer.data.ui.dataset.DataSetEdit or.getCurrentItemModel(DataSetEditor.java:497)
>
> at
> org.eclipse.birt.report.designer.data.ui.dataset.OutputColum nsPage.updateOutputColumns(OutputColumnsPage.java:225)
>
> at
> org.eclipse.birt.report.designer.data.ui.dataset.OutputColum nsPage.pageActivated(OutputColumnsPage.java:361)
>
> at
> org.eclipse.birt.report.designer.data.ui.property.AbstractPr opertyDialog.showPage(AbstractPropertyDialog.java:449)
>
> at
> org.eclipse.birt.report.designer.data.ui.property.AbstractPr opertyDialog.showSelectionPage(AbstractPropertyDialog.java:3 46)
>
> at
> org.eclipse.birt.report.designer.data.ui.dataset.DataSetEdit or.showSelectionPage(DataSetEditor.java:926)
>
> at
> org.eclipse.birt.report.designer.data.ui.property.AbstractPr opertyDialog$2.run(AbstractPropertyDialog.java:304)
>
> at
> org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator .java:67)
> at
> org.eclipse.birt.report.designer.data.ui.property.AbstractPr opertyDialog$1.selectionChanged(AbstractPropertyDialog.java: 299)
>
> at org.eclipse.jface.viewers.Viewer$2.run(Viewer.java:162)
> at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:37)
> at org.eclipse.core.runtime.Platform.run(Platform.java:843)
> at org.eclipse.ui.internal.JFaceUtil$1.run(JFaceUtil.java:44)
> at org.eclipse.jface.util.SafeRunnable.run(SafeRunnable.java:14 9)
> at
> org.eclipse.jface.viewers.Viewer.fireSelectionChanged(Viewer .java:160)
> at
> org.eclipse.jface.viewers.StructuredViewer.updateSelection(S tructuredViewer.java:1976)
>
> at
> org.eclipse.jface.viewers.StructuredViewer.setSelection(Stru cturedViewer.java:1577)
>
> at org.eclipse.jface.viewers.Viewer.setSelection(Viewer.java:38 4)
> at
> org.eclipse.birt.report.designer.data.ui.property.AbstractPr opertyDialog.initTreeSelection(AbstractPropertyDialog.java:2 75)
>
> at
> org.eclipse.birt.report.designer.data.ui.property.AbstractPr opertyDialog.createDialogArea(AbstractPropertyDialog.java:26 0)
>
> at org.eclipse.jface.dialogs.Dialog.createContents(Dialog.java: 802)
> at
> org.eclipse.birt.report.designer.data.ui.dataset.DataSetEdit or.createContents(DataSetEditor.java:472)
>
> at org.eclipse.jface.window.Window.create(Window.java:426)
> at org.eclipse.jface.dialogs.Dialog.create(Dialog.java:1124)
> at
> org.eclipse.birt.report.designer.internal.ui.dialogs.BaseDia log.open(BaseDialog.java:85)
>
> at
> org.eclipse.birt.report.designer.ui.actions.NewDataSetAction .editDataSet(NewDataSetAction.java:192)
>
> at
> org.eclipse.birt.report.designer.ui.actions.NewDataSetAction .run(NewDataSetAction.java:128)
>
> at org.eclipse.jface.action.Action.runWithEvent(Action.java:499 )
> at
> org.eclipse.jface.action.ActionContributionItem.handleWidget Selection(ActionContributionItem.java:539)
>
> at
> org.eclipse.jface.action.ActionContributionItem.access$2(Act ionContributionItem.java:488)
>
> at
> org.eclipse.jface.action.ActionContributionItem$5.handleEven t(ActionContributionItem.java:400)
>
> at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java :66)
> at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:928)
> at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.ja va:3348)
> at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java :2968)
> at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.jav a:1914)
> at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1878)
> at
> org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Work bench.java:419)
> at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.j ava:149)
> at
> org.eclipse.ui.internal.ide.IDEApplication.run(IDEApplicatio n.java:95)
> at
> org.eclipse.core.internal.runtime.PlatformActivator$1.run(Pl atformActivator.java:78)
>
> at
> org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher .runApplication(EclipseAppLauncher.java:92)
>
> at
> org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher .start(EclipseAppLauncher.java:68)
>
> at
> org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:400)
>
> at
> org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:177)
>
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
> at java.lang.reflect.Method.invoke(Unknown Source)
> at org.eclipse.core.launcher.Main.invokeFramework(Main.java:336 )
> at org.eclipse.core.launcher.Main.basicRun(Main.java:280)
> at org.eclipse.core.launcher.Main.run(Main.java:977)
> at org.eclipse.core.launcher.Main.main(Main.java:952)
> Caused by: org.eclipse.birt.report.data.oda.jdbc.JDBCException: SQL
> statement does not return a ResultSet object.
> SQL error #1: DB2 SQL error: SQLCODE: -104, SQLSTATE: null, SQLERRMC: null
> SQL error #2: DB2 SQL error: SQLCODE: -514, SQLSTATE: null, SQLERRMC: null
>
> at
> org.eclipse.birt.report.data.oda.jdbc.Statement.executeQuery (Statement.java:344)
>
> at
> org.eclipse.birt.report.data.oda.jdbc.Statement.getMetaData( Statement.java:296)
>
> at
> org.eclipse.datatools.connectivity.oda.consumer.helper.OdaQu ery.doGetMetaData(OdaQuery.java:388)
>
> at
> org.eclipse.datatools.connectivity.oda.consumer.helper.OdaQu ery.getMetaData(OdaQuery.java:356)
>
> at
> org.eclipse.birt.data.engine.odaconsumer.PreparedStatement.g etRuntimeMetaData(PreparedStatement.java:369)
>
> ... 67 more
> Caused by: com.ibm.db2.jcc.c.SqlException: DB2 SQL error: SQLCODE: -104,
> SQLSTATE: null, SQLERRMC: null
> at com.ibm.db2.jcc.c.cw.e(cw.java:1490)
> at com.ibm.db2.jcc.c.cw.a(cw.java:1100)
> at com.ibm.db2.jcc.b.bd.h(bd.java:138)
> at com.ibm.db2.jcc.b.bd.d(bd.java:70)
> at com.ibm.db2.jcc.b.r.d(r.java:75)
> at com.ibm.db2.jcc.b.bs.j(bs.java:196)
> at com.ibm.db2.jcc.c.cw.m(cw.java:1097)
> at com.ibm.db2.jcc.c.cx.d(cx.java:1986)
> at com.ibm.db2.jcc.c.cx.T(cx.java:422)
> at com.ibm.db2.jcc.c.cx.executeQuery(cx.java:405)
> at
> org.eclipse.birt.report.data.oda.jdbc.Statement.executeQuery (Statement.java:340)
>
> ... 71 more
>
>
> Ben Jeffcoat wrote:
>
>> Jonathan,
>> I couldn't tell if you already did this, but make sure all of these
>> files are in the drivers directory for the universal driver:
>
>> db2jcc.jar
>> db2jcc_license_cisuz.jar
>> db2jcc_license_cu.jar
>
>
>> Jonathan Halper wrote:
>>> I am having issues connecting to DB2 via a JDBC datasource. So far
>>> I've tried both the Universal (com.ibm.db2.jcc.DB2Driver) and app
>>> (COM.ibm.db2.jdbc.app.DB2Driver) drivers. In both cases, I copied
>>> the zip and .jar files out to the ODA drivers folder
>>> (org.eclipse.birt.report.data.oda.jdbc_2.1.0.N20060628-1351d rivers).
>>> After restarting Eclipse, I could select the drivers from the
>>> dropdown when setting up the data source.
>>>
>>> For the universal driver, test connections succeed, but when I try to
>>> create a dataset using the data source, within the query builder I
>>> only see the top-level database icon, without the underlying tables
>>> in the tree. No SQL queries will work against it.
>>>
>>> For the app driver, test connections fail, with "cannot create
>>> instance of JDBC Driver class".
>>>
>>> This is using BIRT 2.1 under Eclipse 3.2 final.
>>>
>>> Any troubleshooting ideas would be appreciated. Thanks!
>>>
>>>
>>>
>>>
>>>
>
>
Re: DB2 Driver connection issues [message #182044 is a reply to message #179998] Wed, 02 August 2006 16:03 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: brobie.cdsfulfillment.com

Have you ever figured out why you couldn't create an instance of JDBC
Driver class for the DB2 app driver?

I am having similar problems.



Ben Jeffcoat wrote:
> Jonathan,
> Sorry...looks like you are beyond my expertise with this problem. I
> would try executing the simplest SQL statement you can and build up from
> there to try to see what is causing the problem. Also you could try to
> run a similar query using a JDBC java program and see if the same issues
> exist outside of BIRT...
>
> Ben
>
>
>
> Jonathan Halper wrote:
>> Ben,
>>
>> Thanks for the response. Yes, I have db2jcc_license_cisuz.jar present
>> in the drivers folder. We are able to use that JCC type 4 driver
>> (version 8.1.5) in conjunction with the license file for SQL execution
>> today, but the problem happens when BIRT is retrieving metadata, so we
>> can't get to where we can execute a SQL query.
>>
>> I talked with our DBA. The DB2 stored procedures that are required
>> for the DB2 metadata retrieval are in place. He could see I
>> successfully connected, and a flurry of requests for metadata came
>> through, which had a successful return status (0). However, those
>> were followed by a -104 and -514 errors, with invalid SQL statements
>> coming across like "SELECT FROM " (no fields or tables specified).
>>
>> Here's a trace from my .log file in the Eclipse workspace .metadata
>> folder:
>>
>> !ENTRY org.eclipse.birt.data 4 1001 2006-07-24 10:56:45.783
>> !MESSAGE A BIRT exception occurred.
>> !STACK 0
>> org.eclipse.birt.data.engine.core.DataException: Cannot get the result
>> set metadata.
>> SQL statement does not return a ResultSet object.
>> SQL error #1: DB2 SQL error: SQLCODE: -104, SQLSTATE: null, SQLERRMC:
>> null
>> SQL error #2: DB2 SQL error: SQLCODE: -514, SQLSTATE: null, SQLERRMC:
>> null
>>
>> at
>> org.eclipse.birt.data.engine.odaconsumer.PreparedStatement.g etRuntimeMetaData(PreparedStatement.java:379)
>>
>> at
>> org.eclipse.birt.data.engine.odaconsumer.PreparedStatement.g etProjectedColumns(PreparedStatement.java:339)
>>
>> at
>> org.eclipse.birt.data.engine.odaconsumer.PreparedStatement.s etColumnsProjection(PreparedStatement.java:1028)
>>
>> at
>> org.eclipse.birt.data.engine.executor.DataSourceQuery.prepar e(DataSourceQuery.java:258)
>>
>> at
>> org.eclipse.birt.data.engine.impl.PreparedOdaDSQuery$OdaDSQu eryExecutor.prepareOdiQuery(PreparedOdaDSQuery.java:271)
>>
>> at
>> org.eclipse.birt.data.engine.impl.QueryExecutor.prepareExecu tion(QueryExecutor.java:226)
>>
>> at
>> org.eclipse.birt.data.engine.impl.PreparedQuery.doPrepare(Pr eparedQuery.java:366)
>>
>> at
>> org.eclipse.birt.data.engine.impl.PreparedDataSourceQuery.ex ecute(PreparedDataSourceQuery.java:139)
>>
>> at
>> org.eclipse.birt.data.engine.impl.PreparedDataSourceQuery.ex ecute(PreparedDataSourceQuery.java:122)
>>
>> at
>> org.eclipse.birt.report.data.adapter.impl.QueryExecutionHelp er.executeQuery(QueryExecutionHelper.java:106)
>>
>> at
>> org.eclipse.birt.report.data.adapter.impl.DataRequestSession Impl.executeQuery(DataRequestSessionImpl.java:190)
>>
>> at
>> org.eclipse.birt.report.designer.data.ui.util.DataSetProvide r.executeQuery(DataSetProvider.java:372)
>>
>> at
>> org.eclipse.birt.report.designer.data.ui.util.DataSetProvide r.execute(DataSetProvider.java:267)
>>
>> at
>> org.eclipse.birt.report.designer.data.ui.util.DataSetProvide r.getColumns(DataSetProvider.java:165)
>>
>> at
>> org.eclipse.birt.report.designer.data.ui.dataset.DataSetEdit or$ItemModelManager.getCurrentItemModel(DataSetEditor.java:1 046)
>>
>> at
>> org.eclipse.birt.report.designer.data.ui.dataset.DataSetEdit or.getCurrentItemModel(DataSetEditor.java:497)
>>
>> at
>> org.eclipse.birt.report.designer.data.ui.dataset.OutputColum nsPage.updateOutputColumns(OutputColumnsPage.java:225)
>>
>> at
>> org.eclipse.birt.report.designer.data.ui.dataset.OutputColum nsPage.pageActivated(OutputColumnsPage.java:361)
>>
>> at
>> org.eclipse.birt.report.designer.data.ui.property.AbstractPr opertyDialog.showPage(AbstractPropertyDialog.java:449)
>>
>> at
>> org.eclipse.birt.report.designer.data.ui.property.AbstractPr opertyDialog.showSelectionPage(AbstractPropertyDialog.java:3 46)
>>
>> at
>> org.eclipse.birt.report.designer.data.ui.dataset.DataSetEdit or.showSelectionPage(DataSetEditor.java:926)
>>
>> at
>> org.eclipse.birt.report.designer.data.ui.property.AbstractPr opertyDialog$2.run(AbstractPropertyDialog.java:304)
>>
>> at
>> org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator .java:67)
>> at
>> org.eclipse.birt.report.designer.data.ui.property.AbstractPr opertyDialog$1.selectionChanged(AbstractPropertyDialog.java: 299)
>>
>> at org.eclipse.jface.viewers.Viewer$2.run(Viewer.java:162)
>> at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:37)
>> at org.eclipse.core.runtime.Platform.run(Platform.java:843)
>> at org.eclipse.ui.internal.JFaceUtil$1.run(JFaceUtil.java:44)
>> at org.eclipse.jface.util.SafeRunnable.run(SafeRunnable.java:14 9)
>> at
>> org.eclipse.jface.viewers.Viewer.fireSelectionChanged(Viewer .java:160)
>> at
>> org.eclipse.jface.viewers.StructuredViewer.updateSelection(S tructuredViewer.java:1976)
>>
>> at
>> org.eclipse.jface.viewers.StructuredViewer.setSelection(Stru cturedViewer.java:1577)
>>
>> at org.eclipse.jface.viewers.Viewer.setSelection(Viewer.java:38 4)
>> at
>> org.eclipse.birt.report.designer.data.ui.property.AbstractPr opertyDialog.initTreeSelection(AbstractPropertyDialog.java:2 75)
>>
>> at
>> org.eclipse.birt.report.designer.data.ui.property.AbstractPr opertyDialog.createDialogArea(AbstractPropertyDialog.java:26 0)
>>
>> at org.eclipse.jface.dialogs.Dialog.createContents(Dialog.java: 802)
>> at
>> org.eclipse.birt.report.designer.data.ui.dataset.DataSetEdit or.createContents(DataSetEditor.java:472)
>>
>> at org.eclipse.jface.window.Window.create(Window.java:426)
>> at org.eclipse.jface.dialogs.Dialog.create(Dialog.java:1124)
>> at
>> org.eclipse.birt.report.designer.internal.ui.dialogs.BaseDia log.open(BaseDialog.java:85)
>>
>> at
>> org.eclipse.birt.report.designer.ui.actions.NewDataSetAction .editDataSet(NewDataSetAction.java:192)
>>
>> at
>> org.eclipse.birt.report.designer.ui.actions.NewDataSetAction .run(NewDataSetAction.java:128)
>>
>> at org.eclipse.jface.action.Action.runWithEvent(Action.java:499 )
>> at
>> org.eclipse.jface.action.ActionContributionItem.handleWidget Selection(ActionContributionItem.java:539)
>>
>> at
>> org.eclipse.jface.action.ActionContributionItem.access$2(Act ionContributionItem.java:488)
>>
>> at
>> org.eclipse.jface.action.ActionContributionItem$5.handleEven t(ActionContributionItem.java:400)
>>
>> at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java :66)
>> at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:928)
>> at
>> org.eclipse.swt.widgets.Display.runDeferredEvents(Display.ja va:3348)
>> at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java :2968)
>> at
>> org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.jav a:1914)
>> at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1878)
>> at
>> org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Work bench.java:419)
>>
>> at
>> org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.j ava:149)
>> at
>> org.eclipse.ui.internal.ide.IDEApplication.run(IDEApplicatio n.java:95)
>> at
>> org.eclipse.core.internal.runtime.PlatformActivator$1.run(Pl atformActivator.java:78)
>>
>> at
>> org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher .runApplication(EclipseAppLauncher.java:92)
>>
>> at
>> org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher .start(EclipseAppLauncher.java:68)
>>
>> at
>> org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:400)
>>
>> at
>> org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:177)
>>
>> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>> at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
>> at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
>> at java.lang.reflect.Method.invoke(Unknown Source)
>> at org.eclipse.core.launcher.Main.invokeFramework(Main.java:336 )
>> at org.eclipse.core.launcher.Main.basicRun(Main.java:280)
>> at org.eclipse.core.launcher.Main.run(Main.java:977)
>> at org.eclipse.core.launcher.Main.main(Main.java:952)
>> Caused by: org.eclipse.birt.report.data.oda.jdbc.JDBCException: SQL
>> statement does not return a ResultSet object.
>> SQL error #1: DB2 SQL error: SQLCODE: -104, SQLSTATE: null, SQLERRMC:
>> null
>> SQL error #2: DB2 SQL error: SQLCODE: -514, SQLSTATE: null, SQLERRMC:
>> null
>>
>> at
>> org.eclipse.birt.report.data.oda.jdbc.Statement.executeQuery (Statement.java:344)
>>
>> at
>> org.eclipse.birt.report.data.oda.jdbc.Statement.getMetaData( Statement.java:296)
>>
>> at
>> org.eclipse.datatools.connectivity.oda.consumer.helper.OdaQu ery.doGetMetaData(OdaQuery.java:388)
>>
>> at
>> org.eclipse.datatools.connectivity.oda.consumer.helper.OdaQu ery.getMetaData(OdaQuery.java:356)
>>
>> at
>> org.eclipse.birt.data.engine.odaconsumer.PreparedStatement.g etRuntimeMetaData(PreparedStatement.java:369)
>>
>> ... 67 more
>> Caused by: com.ibm.db2.jcc.c.SqlException: DB2 SQL error: SQLCODE:
>> -104, SQLSTATE: null, SQLERRMC: null
>> at com.ibm.db2.jcc.c.cw.e(cw.java:1490)
>> at com.ibm.db2.jcc.c.cw.a(cw.java:1100)
>> at com.ibm.db2.jcc.b.bd.h(bd.java:138)
>> at com.ibm.db2.jcc.b.bd.d(bd.java:70)
>> at com.ibm.db2.jcc.b.r.d(r.java:75)
>> at com.ibm.db2.jcc.b.bs.j(bs.java:196)
>> at com.ibm.db2.jcc.c.cw.m(cw.java:1097)
>> at com.ibm.db2.jcc.c.cx.d(cx.java:1986)
>> at com.ibm.db2.jcc.c.cx.T(cx.java:422)
>> at com.ibm.db2.jcc.c.cx.executeQuery(cx.java:405)
>> at
>> org.eclipse.birt.report.data.oda.jdbc.Statement.executeQuery (Statement.java:340)
>>
>> ... 71 more
>>
>>
>> Ben Jeffcoat wrote:
>>
>>> Jonathan,
>>> I couldn't tell if you already did this, but make sure all of these
>>> files are in the drivers directory for the universal driver:
>>
>>> db2jcc.jar
>>> db2jcc_license_cisuz.jar
>>> db2jcc_license_cu.jar
>>
>>
>>> Jonathan Halper wrote:
>>>> I am having issues connecting to DB2 via a JDBC datasource. So far
>>>> I've tried both the Universal (com.ibm.db2.jcc.DB2Driver) and app
>>>> (COM.ibm.db2.jdbc.app.DB2Driver) drivers. In both cases, I copied
>>>> the zip and .jar files out to the ODA drivers folder
>>>> (org.eclipse.birt.report.data.oda.jdbc_2.1.0.N20060628-1351d rivers).
>>>> After restarting Eclipse, I could select the drivers from the
>>>> dropdown when setting up the data source.
>>>>
>>>> For the universal driver, test connections succeed, but when I try
>>>> to create a dataset using the data source, within the query builder
>>>> I only see the top-level database icon, without the underlying
>>>> tables in the tree. No SQL queries will work against it.
>>>>
>>>> For the app driver, test connections fail, with "cannot create
>>>> instance of JDBC Driver class".
>>>>
>>>> This is using BIRT 2.1 under Eclipse 3.2 final.
>>>>
>>>> Any troubleshooting ideas would be appreciated. Thanks!
>>>>
>>>>
>>>>
>>>>
>>>>
>>
>>
Re: DB2 Driver connection issues [message #182847 is a reply to message #182044] Fri, 04 August 2006 13:17 Go to previous message
Eclipse UserFriend
Ben,

I haven't found a solution to the driver issues. For now, I'm going to
get around it by using JDBC data sources from outside of BIRT, and inject
the resulting data through the ReportEngine API for access through a
scriptable data set. We need that functionality anyway to support reports
driven by POJO data pulled from our domain. However, for some reports it
doesn't make sense to have the development overhead of creating a DAO, DTO
beans, and scripting glue logic, when all the data could be pulled
straight from the database.

Questions to the BIRT team:
1) Should I be able to use the Type 4 IBM UDB driver (v.8.1.5) to connect
to a DB2 7.x backend and retrieve metadata which is required by BIRT? I
can create the datasource and show a successful test connection, but the
schema/table information never comes up, so I cannot build up and execute
queries. We use this same driver all the time to execute SQL, we just
don't use it today to retrieve metadata. I have never seen this driver
work with the DTP Data Source explorer either.

2) Is there an easy way to get around the "Cannot load instance of <driver
name>" error with the type 2 UDB driver? Using DTP Data Source explorer,
I can get schema/table metadata (at least the first time I connect -
subsequent connect attempts get classloader error). However, I have never
gotten past this error using BIRT when creating a DataSource.

If this is better addressed via the DTP forum, I can take it there. Just
not sure at this point whether the problem lies in the driver, the DTP, or
BIRT itself.

Ben Robie wrote:

> Have you ever figured out why you couldn't create an instance of JDBC
> Driver class for the DB2 app driver?

> I am having similar problems.
Previous Topic:How do I use the Report Engine bundled in a war, not 'installed' separately on the system?
Next Topic:Log to Console of ReportDesinger in Preview mode?
Goto Forum:
  


Current Time: Fri Jul 18 11:28:30 EDT 2025

Powered by FUDForum. Page generated in 0.05940 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top