Grails and Birt - Connection Not Active [message #735516] |
Wed, 12 October 2011 01:08  |
Eclipse User |
|
|
|
Hello,
I'm new to using birt, especially in grails. 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)...
Any and all help would be appreciated. I have found no information related to solving this topic in any forums and have spent quite some time trying to solve the issue.
Thanks in advance,
Chad
|
|
|
Re: Grails and Birt - Connection Not Active [message #735547 is a reply to message #735516] |
Wed, 12 October 2011 03:25   |
Eclipse User |
|
|
|
I modified the BirtReportService with the following snippet -
def connection = dataSource.getConnection()
def sql = new Sql(connection);
def rSet = sql.firstRow("select * from Contact")
println rSet.toString()
if(useGrailsDatasource) task.getAppContext().put("OdaJDBCDriverPassInConnection", connection);
task.run()
And this is what I get back:
BirtReportService taskParams: [
{id=1, version=0, address1=Not Listed, address2=null, city=Lesley, date_created=2011-10-12 02:12:39.0, email=null, first_name=Bob, last_name=Bole, phone_area_code=931, phone_prefix=425, phone_suffix=8162, state_id=43, zip=90210}
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.
So, as you can see from the contact result set printed, the connection is active. What is causing the underlying code in birt to think this connection is not valid?
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.11494 seconds