#1 2017-06-27 10:40:20

ACM
Member
Registered: 2017-06-27
Posts: 3

BIRT report fails with 'data source is not active'

Hello, I'm very new to both BIRT and ReportServer. So I'm likely making some beginners error, but I've failed to find the cause to my error.

I've created a very simple report in BIRT (on my local windows machine) using a mysql-server. In BIRT, the datasource is called 'Data Source'. When viewing the report in BIRT, it works just fine.

I've also set up ReportServer on a linux-machine in which I've created a datasource called 'Data Source' as well with the same server and configuration. When I hit the 'test connection'-button, it reports the connection works.

But if I create a new BIRT-report in ReportServer, upload the BIRT-file to that report and select that specific 'Data Source', I get an exception:


09:52:07.739 ERROR o.e.birt.data.engine.odaconsumer - Failed to prepare the following query for the data set type (org.eclipse.birt.report.data.oda.jdbc.dbprofile.sqbDataSet).
[SELECT C.ID AS `categorieId`, C.`Naam` AS `categorieNaam`, COUNT(P.ID) AS `productCount`
  FROM
       `twk_main`.`tb_categories` AS C JOIN `twk_main`.`tb_products` AS P ON C.ID = P.`categoryId`
  GROUP BY C.ID, C.`Naam`
]
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) ~[org.eclipse.birt.birt-runtime-4.5.0.jar:na]
        at org.eclipse.datatools.connectivity.oda.consumer.helper.OdaConnection.newQuery(OdaConnection.java:562) ~[org.eclipse.birt.birt-runtime-4.5.0.jar:na]
        at org.eclipse.birt.data.engine.odaconsumer.Connection.prepareOdaQuery(Connection.java:285) [org.eclipse.birt.birt-runtime-4.5.0.jar:na]
        at org.eclipse.birt.data.engine.odaconsumer.Connection.prepareStatement(Connection.java:197) [org.eclipse.birt.birt-runtime-4.5.0.jar:na]
        at org.eclipse.birt.data.engine.executor.DataSource.prepareStatement(DataSource.java:302) [org.eclipse.birt.birt-runtime-4.5.0.jar:na]
        at org.eclipse.birt.data.engine.executor.DataSourceQuery.prepare(DataSourceQuery.java:294) [org.eclipse.birt.birt-runtime-4.5.0.jar:na]
        at org.eclipse.birt.data.engine.impl.PreparedOdaDSQuery$OdaDSQueryExecutor.prepareOdiQuery(PreparedOdaDSQuery.java:621) [org.eclipse.birt.birt-runtime-4.5.0.jar:na]
        at org.eclipse.birt.data.engine.impl.QueryExecutor.prepareExecution(QueryExecutor.java:349) [org.eclipse.birt.birt-runtime-4.5.0.jar:na]
        at org.eclipse.birt.data.engine.impl.PreparedQuery.doPrepare(PreparedQuery.java:463) [org.eclipse.birt.birt-runtime-4.5.0.jar:na]
        at org.eclipse.birt.data.engine.impl.PreparedDataSourceQuery.produceQueryResults(PreparedDataSourceQuery.java:190) [org.eclipse.birt.birt-runtime-4.5.0.jar:na]
        at org.eclipse.birt.data.engine.impl.PreparedDataSourceQuery.execute(PreparedDataSourceQuery.java:178) [org.eclipse.birt.birt-runtime-4.5.0.jar:na]
        at org.eclipse.birt.data.engine.impl.PreparedOdaDSQuery.execute(PreparedOdaDSQuery.java:179) [org.eclipse.birt.birt-runtime-4.5.0.jar:na]
        at org.eclipse.birt.report.data.adapter.impl.DataRequestSessionImpl.execute(DataRequestSessionImpl.java:651) [org.eclipse.birt.birt-runtime-4.5.0.jar:na]
        at org.eclipse.birt.report.engine.data.dte.DteDataEngine.doExecuteQuery(DteDataEngine.java:152) [org.eclipse.birt.birt-runtime-4.5.0.jar:na]
        at org.eclipse.birt.report.engine.data.dte.AbstractDataEngine.execute(AbstractDataEngine.java:285) [org.eclipse.birt.birt-runtime-4.5.0.jar:na]
        at org.eclipse.birt.report.engine.executor.ExecutionContext.executeQuery(ExecutionContext.java:1947) [org.eclipse.birt.birt-runtime-4.5.0.jar:na]
        at org.eclipse.birt.report.engine.executor.QueryItemExecutor.executeQuery(QueryItemExecutor.java:80) [org.eclipse.birt.birt-runtime-4.5.0.jar:na]
        at org.eclipse.birt.report.engine.executor.TableItemExecutor.execute(TableItemExecutor.java:62) [org.eclipse.birt.birt-runtime-4.5.0.jar:na]
        at org.eclipse.birt.report.engine.internal.executor.dup.SuppressDuplicateItemExecutor.execute(SuppressDuplicateItemExecutor.java:43) [org.eclipse.birt.birt-runtime-4.5.0.jar:na]
        at org.eclipse.birt.report.engine.internal.executor.wrap.WrappedReportItemExecutor.execute(WrappedReportItemExecutor.java:46) [org.eclipse.birt.birt-runtime-4.5.0.jar:na]
        at org.eclipse.birt.report.engine.internal.executor.l18n.LocalizedReportItemExecutor.execute(LocalizedReportItemExecutor.java:34) [org.eclipse.birt.birt-runtime-4.5.0.jar:na]
        at org.eclipse.birt.report.engine.layout.html.HTMLBlockStackingLM.layoutNodes(HTMLBlockStackingLM.java:65) [org.eclipse.birt.birt-runtime-4.5.0.jar:na]
        at org.eclipse.birt.report.engine.layout.html.HTMLPageLM.layout(HTMLPageLM.java:92) [org.eclipse.birt.birt-runtime-4.5.0.jar:na]
        at org.eclipse.birt.report.engine.layout.html.HTMLReportLayoutEngine.layout(HTMLReportLayoutEngine.java:100) [org.eclipse.birt.birt-runtime-4.5.0.jar:na]
        at org.eclipse.birt.report.engine.api.impl.RunAndRenderTask.doRun(RunAndRenderTask.java:181) [org.eclipse.birt.birt-runtime-4.5.0.jar:na]
        at org.eclipse.birt.report.engine.api.impl.RunAndRenderTask.run(RunAndRenderTask.java:77) [org.eclipse.birt.birt-runtime-4.5.0.jar:na]
        at net.datenwerke.rs.birt.service.reportengine.output.generator.BirtPDFOutputGenerator.exportReport(BirtPDFOutputGenerator.java:33) [reportserver.jar:na]
        at net.datenwerke.rs.birt.service.reportengine.sandbox.BirtEngineEnvironment.call(BirtEngineEnvironment.java:178) [reportserver.jar:na]
        at net.datenwerke.rs.birt.service.reportengine.BirtReportEngine.executeReport(BirtReportEngine.java:79) [reportserver.jar:na]
        at net.datenwerke.rs.birt.service.reportengine.BirtReportEngine.doExecute(BirtReportEngine.java:67) [reportserver.jar:na]
        at net.datenwerke.rs.core.service.reportmanager.engine.ReportEngine.execute(ReportEngine.java:148) [reportserver.jar:na]
        at net.datenwerke.rs.core.service.reportmanager.ReportExecutorServiceImpl.execute(ReportExecutorServiceImpl.java:186) [reportserver.jar:na]
        at net.datenwerke.rs.core.service.reportmanager.ReportExecutorServiceImpl.execute(ReportExecutorServiceImpl.java:119) [reportserver.jar:na]
        at net.datenwerke.rs.core.server.reportexport.ReportExportServlet.exeucteReport(ReportExportServlet.java:535) [reportserver.jar:na]
        at net.datenwerke.rs.core.server.reportexport.ReportExportServlet.doExportReport(ReportExportServlet.java:416) [reportserver.jar:na]
        at net.datenwerke.rs.core.server.reportexport.ReportExportServlet.exportReport(ReportExportServlet.java:346) [reportserver.jar:na]
        at net.datenwerke.rs.core.server.reportexport.ReportExportServlet.exportReportViaSession(ReportExportServlet.java:339) [reportserver.jar:na]
        at net.datenwerke.rs.core.server.reportexport.ReportExportServlet.doGet(ReportExportServlet.java:168) [reportserver.jar:na]
        at net.datenwerke.rs.core.server.reportexport.ReportExportServlet$$EnhancerByGuice$$cfbff1c6.CGLIB$doGet$1(<generated>) [guice-3.0.jar:na]
        at net.datenwerke.rs.core.server.reportexport.ReportExportServlet$$EnhancerByGuice$$cfbff1c6$$FastClassByGuice$$68ba6b06.invoke(<generated>) [guice-3.0.jar:na]
        at com.google.inject.internal.cglib.proxy.$MethodProxy.invokeSuper(MethodProxy.java:228) [guice-3.0.jar:na]
        at com.google.inject.internal.InterceptorStackCallback$InterceptedMethodInvocation.proceed(InterceptorStackCallback.java:72) [guice-3.0.jar:na]
        at com.google.inject.persist.jpa.JpaLocalTxnInterceptor.invoke(JpaLocalTxnInterceptor.java:66) [guice-persist-3.0.jar:na]
        at com.google.inject.internal.InterceptorStackCallback$InterceptedMethodInvocation.proceed(InterceptorStackCallback.java:72) [guice-3.0.jar:na]
        at net.datenwerke.security.service.security.aop.SecurityCheckInterceptor.invoke(SecurityCheckInterceptor.java:109) [reportserver.jar:na]
        at com.google.inject.internal.InterceptorStackCallback$InterceptedMethodInvocation.proceed(InterceptorStackCallback.java:72) [guice-3.0.jar:na]
        at com.google.inject.internal.InterceptorStackCallback.intercept(InterceptorStackCallback.java:52) [guice-3.0.jar:na]
        at net.datenwerke.rs.core.server.reportexport.ReportExportServlet$$EnhancerByGuice$$cfbff1c6.doGet(<generated>) [guice-3.0.jar:na]
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:622) [tomcat8-servlet-api-8.0.32.jar:na]
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:729) [tomcat8-servlet-api-8.0.32.jar:na]
        at net.datenwerke.rs.core.server.reportexport.ReportExportServlet$$EnhancerByGuice$$cfbff1c6.CGLIB$service$17(<generated>) [guice-3.0.jar:na]
        at net.datenwerke.rs.core.server.reportexport.ReportExportServlet$$EnhancerByGuice$$cfbff1c6$$FastClassByGuice$$68ba6b06.invoke(<generated>) [guice-3.0.jar:na]
        at com.google.inject.internal.cglib.proxy.$MethodProxy.invokeSuper(MethodProxy.java:228) [guice-3.0.jar:na]
        at com.google.inject.internal.InterceptorStackCallback$InterceptedMethodInvocation.proceed(InterceptorStackCallback.java:72) [guice-3.0.jar:na]
        at net.datenwerke.security.service.security.aop.SecurityCheckInterceptor.invoke(SecurityCheckInterceptor.java:109) [reportserver.jar:na]
        at com.google.inject.internal.InterceptorStackCallback$InterceptedMethodInvocation.proceed(InterceptorStackCallback.java:72) [guice-3.0.jar:na]
        at com.google.inject.internal.InterceptorStackCallback.intercept(InterceptorStackCallback.java:52) [guice-3.0.jar:na]
        at net.datenwerke.rs.core.server.reportexport.ReportExportServlet$$EnhancerByGuice$$cfbff1c6.service(<generated>) [guice-3.0.jar:na]
        at com.google.inject.servlet.ServletDefinition.doService(ServletDefinition.java:263) [guice-servlet-3.0.jar:na]
        at com.google.inject.servlet.ServletDefinition.service(ServletDefinition.java:178) [guice-servlet-3.0.jar:na]
        at com.google.inject.servlet.ManagedServletPipeline.service(ManagedServletPipeline.java:91) [guice-servlet-3.0.jar:na]
        at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:62) [guice-servlet-3.0.jar:na]
        at com.google.inject.persist.PersistFilter.doFilter(PersistFilter.java:89) [guice-persist-3.0.jar:na]
        at com.google.inject.servlet.FilterDefinition.doFilter(FilterDefinition.java:163) [guice-servlet-3.0.jar:na]
        at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:58) [guice-servlet-3.0.jar:na]
        at com.google.inject.servlet.FilterDefinition.doFilter(FilterDefinition.java:168) [guice-servlet-3.0.jar:na]
        at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:58) [guice-servlet-3.0.jar:na]
        at com.google.inject.servlet.FilterDefinition.doFilter(FilterDefinition.java:168) [guice-servlet-3.0.jar:na]
        at com.google.inject.servlet.FilterChainInvocation.doFilter(FilterChainInvocation.java:58) [guice-servlet-3.0.jar:na]
        at com.google.inject.servlet.ManagedFilterPipeline.dispatch(ManagedFilterPipeline.java:118) [guice-servlet-3.0.jar:na]
        at com.google.inject.servlet.GuiceFilter.doFilter(GuiceFilter.java:113) [guice-servlet-3.0.jar:na]
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:240) [tomcat8-catalina-8.0.32.jar:8.0.32]
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:207) [tomcat8-catalina-8.0.32.jar:8.0.32]
        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213) [tomcat8-catalina-8.0.32.jar:8.0.32]
        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:106) [tomcat8-catalina-8.0.32.jar:8.0.32]
        at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:502) [tomcat8-catalina-8.0.32.jar:8.0.32]
        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:141) [tomcat8-catalina-8.0.32.jar:8.0.32]
        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79) [tomcat8-catalina-8.0.32.jar:8.0.32]
        at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:616) [tomcat8-catalina-8.0.32.jar:8.0.32]
        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:88) [tomcat8-catalina-8.0.32.jar:8.0.32]
        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:522) [tomcat8-catalina-8.0.32.jar:8.0.32]
        at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1095) [tomcat8-coyote-8.0.32.jar:8.0.32]
        at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:672) [tomcat8-coyote-8.0.32.jar:8.0.32]
        at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1504) [tomcat8-coyote-8.0.32.jar:8.0.32]
        at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1460) [tomcat8-coyote-8.0.32.jar:8.0.32]
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [na:1.8.0_131]
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [na:1.8.0_131]
        at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) [tomcat8-util-8.0.32.jar:8.0.32]
        at java.lang.Thread.run(Thread.java:748) [na:1.8.0_131]

Here are some more details, that may or may not matter:
- System with BIRT runs windows 10, Java 1.8.0_131. Eclipse/BIRT-version is the newest available (4.6) and MySQL Connector/J version 5.1.42.
- System with ReportServer runs on Linux. It has a fresh download of ReportServer, which runs on Tomcat 8.0.32, with the built-in BIRT (4.5) and Connector/J (5.1.38)

So the question is: What causes this 'The established connection to the data source is not active.' and how do I prevent it.

Offline

#2 2017-07-05 09:23:20

ACM
Member
Registered: 2017-06-27
Posts: 3

Re: BIRT report fails with 'data source is not active'

This appearantly happens when you select the 'jdbc for query builder' rather than a regular 'jdbc' connection. So changing that, fixed it for me.

Offline

#3 2017-07-05 10:48:49

edulid
Administrator
Registered: 2016-11-01
Posts: 413

Re: BIRT report fails with 'data source is not active'

Hi ACM,

I'm glad you found the error. Where exactly did you select "jdbc for query builder" ? In BIRT? Where did you change that?

Regards,
Eduardo

Offline

#4 2017-07-05 11:18:51

ACM
Member
Registered: 2017-06-27
Posts: 3

Re: BIRT report fails with 'data source is not active'

That was at the Data Source level. When you create a new one, you can choose amongst other for 'JDBC Database Connection for Query Builder' and 'JDBC Data Source'. The first one caused this issue, the latter worked fine.

And I couldn't really change it, but just deleted it and created a new Data Source and new Data Sets.

Last edited by ACM (2017-07-05 11:20:35)

Offline

Board footer

Powered by FluxBB