| Summary: | DB2 connects to datasource but unable to preview it | ||||||
|---|---|---|---|---|---|---|---|
| Product: | z_Archived | Reporter: | alexh572000 | ||||
| Component: | BIRT | Assignee: | Birt-Data-inbox <Birt-Data-inbox> | ||||
| Status: | RESOLVED WORKSFORME | QA Contact: | Liwen Chen <lchen> | ||||
| Severity: | critical | ||||||
| Priority: | P3 | CC: | bluesoldier | ||||
| Version: | 2.6.1 | ||||||
| Target Milestone: | --- | ||||||
| Hardware: | PC | ||||||
| OS: | Windows XP | ||||||
| Whiteboard: | |||||||
| Attachments: |
|
||||||
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? (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 . (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 (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 Please see below comment from qa contact 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. Created attachment 201971 [details]
db2 connect report using the driver
|
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)