Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 346673 - DB2 connects to datasource but unable to preview it
Summary: DB2 connects to datasource but unable to preview it
Status: RESOLVED WORKSFORME
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: BIRT (show other bugs)
Version: 2.6.1   Edit
Hardware: PC Windows XP
: P3 critical (vote)
Target Milestone: ---   Edit
Assignee: Birt-Data-inbox@eclipse.org CLA
QA Contact: Liwen Chen CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-05-20 09:26 EDT by alexh572000 CLA
Modified: 2011-08-23 03:50 EDT (History)
1 user (show)

See Also:


Attachments
db2 connect report using the driver (21.16 KB, application/octet-stream)
2011-08-23 03:50 EDT, Liwen Chen CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description alexh572000 CLA 2011-05-20 09:26:57 EDT
Creating a Database connection with COM.ibm.db2.jdbc.net.DB2Driver ( v7.1) test connection it works, write SQL for a data set, the preview errors out stack below 

Stack 
SEVERE: Cannot get the string value from column: 1.
org.eclipse.birt.report.data.oda.jdbc.JDBCException: Cannot get string value in the result set.

SQL error #1: [IBM][JDBC Driver] CLI0610E  Invalid column number. SQLSTATE=S1002
 ;
    COM.ibm.db2.jdbc.DB2Exception: [IBM][JDBC Driver] CLI0610E  Invalid column number. SQLSTATE=S1002
	at org.eclipse.birt.report.data.oda.jdbc.ResultSet.getString(ResultSet.java:215)
	at org.eclipse.datatools.connectivity.oda.consumer.helper.OdaResultSet.getString(OdaResultSet.java:246)
	at org.eclipse.birt.data.engine.odaconsumer.ResultSet.getString(ResultSet.java:266)
	at org.eclipse.birt.data.engine.odaconsumer.ResultSet.fetch(ResultSet.java:179)
	at org.eclipse.birt.data.engine.executor.cache.OdiAdapter.fetch(OdiAdapter.java:153)
	at org.eclipse.birt.data.engine.executor.cache.RowResultSet.next(RowResultSet.java:105)
	at org.eclipse.birt.data.engine.executor.cache.ExpandableRowResultSet.next(ExpandableRowResultSet.java:63)
	at org.eclipse.birt.data.engine.executor.cache.SmartCacheHelper.populateData(SmartCacheHelper.java:316)
	at org.eclipse.birt.data.engine.executor.cache.SmartCacheHelper.initInstance(SmartCacheHelper.java:285)
	at org.eclipse.birt.data.engine.executor.cache.SmartCacheHelper.initOdaResult(SmartCacheHelper.java:154)
	at org.eclipse.birt.data.engine.executor.cache.SmartCacheHelper.getResultSetCache(SmartCacheHelper.java:79)
	at org.eclipse.birt.data.engine.executor.cache.SmartCache.<init>(SmartCache.java:56)
	at org.eclipse.birt.data.engine.executor.transform.pass.PassUtil.populateOdiResultSet(PassUtil.java:99)
	at org.eclipse.birt.data.engine.executor.transform.pass.PassUtil.pass(PassUtil.java:62)
	at org.eclipse.birt.data.engine.executor.transform.pass.PassManager.populateResultSetCacheInResultSetPopulator(PassManager.java:320)
	at org.eclipse.birt.data.engine.executor.transform.pass.PassManager.populateDataSet(PassManager.java:282)
	at org.eclipse.birt.data.engine.executor.transform.pass.PassManager.prepareDataSetResultSet(PassManager.java:101)
	at org.eclipse.birt.data.engine.executor.transform.pass.PassManager.pass(PassManager.java:128)
	at org.eclipse.birt.data.engine.executor.transform.pass.PassManager.populateResultSet(PassManager.java:77)
	at org.eclipse.birt.data.engine.executor.transform.ResultSetPopulator.populateResultSet(ResultSetPopulator.java:198)
	at org.eclipse.birt.data.engine.executor.transform.CachedResultSet.<init>(CachedResultSet.java:94)
	at org.eclipse.birt.data.engine.executor.DataSourceQuery.execute(DataSourceQuery.java:883)
	at org.eclipse.birt.data.engine.impl.PreparedOdaDSQuery$OdaDSQueryExecutor.executeOdiQuery(PreparedOdaDSQuery.java:427)
	at org.eclipse.birt.data.engine.impl.QueryExecutor.execute(QueryExecutor.java:1094)
	at org.eclipse.birt.data.engine.impl.ServiceForQueryResults.executeQuery(ServiceForQueryResults.java:232)
	at org.eclipse.birt.data.engine.impl.QueryResults.getResultIterator(QueryResults.java:172)
	at org.eclipse.birt.report.engine.data.dte.QueryResultSet.<init>(QueryResultSet.java:98)
	at org.eclipse.birt.report.engine.data.dte.DteDataEngine.doExecuteQuery(DteDataEngine.java:168)
	at org.eclipse.birt.report.engine.data.dte.AbstractDataEngine.execute(AbstractDataEngine.java:265)
	at org.eclipse.birt.report.engine.executor.ExecutionContext.executeQuery(ExecutionContext.java:1876)
	at org.eclipse.birt.report.engine.executor.QueryItemExecutor.executeQuery(QueryItemExecutor.java:80)
	at org.eclipse.birt.report.engine.executor.TableItemExecutor.execute(TableItemExecutor.java:62)
	at org.eclipse.birt.report.engine.internal.executor.dup.SuppressDuplicateItemExecutor.execute(SuppressDuplicateItemExecutor.java:43)
	at org.eclipse.birt.report.engine.internal.executor.wrap.WrappedReportItemExecutor.execute(WrappedReportItemExecutor.java:46)
	at org.eclipse.birt.report.engine.internal.executor.l18n.LocalizedReportItemExecutor.execute(LocalizedReportItemExecutor.java:34)
	at org.eclipse.birt.report.engine.layout.html.HTMLBlockStackingLM.layoutNodes(HTMLBlockStackingLM.java:65)
	at org.eclipse.birt.report.engine.layout.html.HTMLPageLM.layout(HTMLPageLM.java:90)
	at org.eclipse.birt.report.engine.layout.html.HTMLReportLayoutEngine.layout(HTMLReportLayoutEngine.java:99)
	at org.eclipse.birt.report.engine.api.impl.RunAndRenderTask.doRun(RunAndRenderTask.java:180)
	at org.eclipse.birt.report.engine.api.impl.RunAndRenderTask.run(RunAndRenderTask.java:77)
	at org.eclipse.birt.report.service.ReportEngineService.runAndRenderReport(ReportEngineService.java:920)
	at org.eclipse.birt.report.service.BirtViewerReportService.runAndRenderReport(BirtViewerReportService.java:973)
	at org.eclipse.birt.report.service.actionhandler.BirtRunAndRenderActionHandler.__execute(BirtRunAndRenderActionHandler.java:76)
	at org.eclipse.birt.report.service.actionhandler.AbstractBaseActionHandler.execute(AbstractBaseActionHandler.java:90)
	at org.eclipse.birt.report.presentation.aggregation.layout.RunFragment.doService(RunFragment.java:120)
	at org.eclipse.birt.report.presentation.aggregation.layout.FramesetFragment.service(FramesetFragment.java:86)
	at org.eclipse.birt.report.servlet.ViewerServlet.__doGet(ViewerServlet.java:181)
	at org.eclipse.birt.report.servlet.BirtSoapMessageDispatcherServlet.doGet(BirtSoapMessageDispatcherServlet.java:160)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
	at org.apache.axis.transport.http.AxisServletBase.service(AxisServletBase.java:327)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
	at org.eclipse.birt.report.servlet.BirtSoapMessageDispatcherServlet.service(BirtSoapMessageDispatcherServlet.java:122)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
	at org.eclipse.birt.report.filter.ViewerFilter.doFilter(ViewerFilter.java:68)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)
	at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:849)
	at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
	at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:454)
	at java.lang.Thread.run(Thread.java:811)
Comment 1 Xiaoying Gu CLA 2011-05-22 21:51:17 EDT
This may have nothing to do with BIRT specifically. Perhaps your query to retrieve the data. Have you tried using the jdbc driver stand alone in a simple Java program to try and retrieve the data?
Comment 2 alexh572000 CLA 2011-05-23 06:46:35 EDT
(In reply to comment #1)
> This may have nothing to do with BIRT specifically. Perhaps your query to
> retrieve the data. Have you tried using the jdbc driver stand alone in a simple
> Java program to try and retrieve the data?

Yes i have, it runs as expect both and a java app and with a jdbc driver stand alone .
Comment 3 alexh572000 CLA 2011-05-23 09:08:21 EDT
(In reply to comment #2)
> (In reply to comment #1)
> > This may have nothing to do with BIRT specifically. Perhaps your query to
> > retrieve the data. Have you tried using the jdbc driver stand alone in a simple
> > Java program to try and retrieve the data?
> 
> Yes i have, it runs as expect both and a java app and with a jdbc driver stand
> alone .

Also when you create a data set like select * from tablename, birt is able to grab all the Headers return from the SQL. But preview shows no data and gives error above
Comment 4 alexh572000 CLA 2011-05-23 12:18:25 EDT
(In reply to comment #3)
> (In reply to comment #2)
> > (In reply to comment #1)
> > > This may have nothing to do with BIRT specifically. Perhaps your query to
> > > retrieve the data. Have you tried using the jdbc driver stand alone in a simple
> > > Java program to try and retrieve the data?
> > 
> > Yes i have, it runs as expect both and a java app and with a jdbc driver stand
> > alone .
> 
> Also when you create a data set like select * from tablename, birt is able to
> grab all the Headers return from the SQL. But preview shows no data and gives
> error above

More info if you run SQL where there is not results , the preview for data acts as expected
Comment 5 Xiaoying Gu CLA 2011-08-23 03:45:22 EDT
Please see below comment from qa contact
Comment 6 Liwen Chen CLA 2011-08-23 03:49:27 EDT
I have tried to use  COM.ibm.db2.jdbc.net.DB2Driver ( v7.1) to connect to DB2 server and retrieve data.

I can create dataset and preview result will show complete data from table.

I attached the report design, one thing needs to mention is that when you dnd to create query text in dataset dialog, please tick on option "Quote all identifiers".

If you can still reproduce the issue, please reopen this bug.

Thanks.
Comment 7 Liwen Chen CLA 2011-08-23 03:50:32 EDT
Created attachment 201971 [details]
db2 connect report using the driver