Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 360702 - MySql Connection Pooling Issue - The established connection to the data source is not active
Summary: MySql Connection Pooling Issue - The established connection to the data sourc...
Status: RESOLVED WORKSFORME
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: BIRT (show other bugs)
Version: 2.6.2   Edit
Hardware: PC Mac OS X - Carbon (unsup.)
: P3 major (vote)
Target Milestone: ---   Edit
Assignee: Birt-Data-inbox@eclipse.org CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-10-12 13:32 EDT by Chad CLA
Modified: 2011-10-12 20:18 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Chad CLA 2011-10-12 13:32:08 EDT
Everything went fine on the installation in eclipse and I am able to render previews of my reports just fine, but when I go to render the report from within my application I receive the following stacktrace:

engine.odaconsumer Failed to prepare the following query for the data set type (org.eclipse.birt.report.data.oda.jdbc.dbprofile.sqbDataSet).
[SELECT *
FROM `database`.`client` AS C, `database`.`organization` AS O
]
org.eclipse.datatools.connectivity.oda.consumer.helper.OdaHelperException: The established connection to the data source is not active.
at org.eclipse.datatools.connectivity.oda.consumer.helper.OdaObject.newOdaException(OdaObject.java:548)
at org.eclipse.datatools.connectivity.oda.consumer.helper.OdaConnection.newQuery(OdaConnection.java:562)
at org.eclipse.birt.data.engine.odaconsumer.Connection.prepareOdaQuery(Connection.java:285)
at org.eclipse.birt.data.engine.odaconsumer.Connection.prepareStatement(Connection.java:197)
at org.eclipse.birt.data.engine.executor.DataSource.prepareStatement(DataSource.java:302)
at org.eclipse.birt.data.engine.executor.DataSourceQuery.prepare(DataSourceQuery.java:281)
at org.eclipse.birt.data.engine.impl.PreparedOdaDSQuery$OdaDSQueryExecutor.prepareOdiQuery(PreparedOdaDSQuery.java:455)
at org.eclipse.birt.data.engine.impl.QueryExecutor.prepareExecution(QueryExecutor.java:343)
at org.eclipse.birt.data.engine.impl.PreparedQuery.doPrepare(PreparedQuery.java:455)
at org.eclipse.birt.data.engine.impl.PreparedDataSourceQuery.produceQueryResults(PreparedDataSourceQuery.java:190)
at org.eclipse.birt.data.engine.impl.PreparedDataSourceQuery.execute(PreparedDataSourceQuery.java:178)
at org.eclipse.birt.data.engine.impl.PreparedOdaDSQuery.execute(PreparedOdaDSQuery.java:145)
at org.eclipse.birt.report.data.adapter.impl.DataRequestSessionImpl.execute(DataRequestSessionImpl.java:616)
at org.eclipse.birt.report.engine.data.dte.DteDataEngine.doExecuteQuery(DteDataEngine.java:152)
at org.eclipse.birt.report.engine.data.dte.AbstractDataEngine.execute(AbstractDataEngine.java:265)
at org.eclipse.birt.report.engine.executor.ExecutionContext.executeQuery(ExecutionContext.java:1897)
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:92)
at org.eclipse.birt.report.engine.layout.html.HTMLReportLayoutEngine.layout(HTMLReportLayoutEngine.java:100)...

Since the only real difference I can see is the connection type (direct connection in eclipse vs. pooled connection in grails), I can only assume that some type of discrepancy is causing Birt to reject the connection.

Please refer to http://www.eclipse.org/forums/index.php/t/245586/ for additional information in the Birt forums. I have made several attempts at identifying a resolution but have come to no avail.
Comment 1 Linda Chan CLA 2011-10-12 15:47:55 EDT
(In reply to comment #0)

The data source type of JDBC Connection for SQL Query Builder does not support use of connection pooling.
If you use the other JDBC connection type instead (which offers a textual query editor), does the connection pooling work for you?
Comment 2 Chad CLA 2011-10-12 17:57:39 EDT
(In reply to comment #1)
> (In reply to comment #0)
> 
> The data source type of JDBC Connection for SQL Query Builder does not support
> use of connection pooling.
> If you use the other JDBC connection type instead (which offers a textual query
> editor), does the connection pooling work for you?

Of coarse, this is apparent when the direct jdbc connection is made through eclipse.  Is there anything I can do to get around this issue?  A connection-pool JDBC connection is extremely common in production environments, which is what I had hoped to be able to do.  Is my only alternative to manually create a database connection outside of the connection pool to use Birt?
Comment 3 Linda Chan CLA 2011-10-12 19:35:34 EDT
(In reply to comment #2)

As I'd described earlier, use the "JDBC Data Source" type instead in BIRT.  It is listed below the one you'd used for Query Builder in the list of data sources in BIRT designer's New Data Source wizard.
Comment 4 Chad CLA 2011-10-12 20:18:43 EDT
(In reply to comment #3)
> (In reply to comment #2)
> 
> As I'd described earlier, use the "JDBC Data Source" type instead in BIRT.  It
> is listed below the one you'd used for Query Builder in the list of data
> sources in BIRT designer's New Data Source wizard.

I feel as though a fore-head slap is in order.  Thank you for your patience and explaining that I was using the wrong JDBC connector for Birt.  It worked just fine once I changed to the other builder.  It's too bad the Query Builder does not use connection-pooled data sources.  I liked it quite a bit.  Regardless, the issue was PEBKAC and nothing to do with Birt.

Thank you for your time,

Chad