Report designed with Birt Designer having jdbc driver problems with F-type

sfjames
edited February 11, 2022 in Analytics #1
<p>I created a report using Birt Designer (non-pro). It connects to a mySQL database over the internet using the mySQL JDBC driver, which is a .jar file which I downloaded and specified my report to use. It works perfectly fine when run from the report designer, but when I upload the report to a remote iHub F-type server, it fails to connect because it doesn't load the driver properly. I tried putting it in the jdbc drivers folder on the server (at /iHub/jar/BIRT/platform/plugins/org.eclipse.birt.report.data.oda.jdbc_4.4.0.v20150206-1039/drivers/mysql-connector-java-5.1.22-bin.jar ) but that didn't work. I ended up putting the driver in a separate folder on the server (e.g. /home/jbdc-drivers/mysql-connector-java-5.1.22-bin.jar ) and manually editing the report XML so that the "jarList" property was the path on the server's filesystem, instead of on my local machine.</p>
<p> </p>
<p>This ended up working, but seems like an awkward/hacky work-around. Is there a better solution? Am I doing something wrong? I don't want to have to manually edit every report before uploading it to ihub f-type. </p>
<p> </p>
<p>I created the report on windows 8 using the eclipse-based open source BIRT designer. The iHub F-type server is running on an Amazon EC2 image, and the mySQL server is also running using AWS. </p>

Comments

  • <p>Did you restart the iHub after dropping in the jar?</p>
    <p> </p>
    <p>If not, you will need to restart the iHub for the new jar to become available.</p>
    Warning No formatter is installed for the format ipb
  • <p>Also F-Type already ships (with a slightly earlier version 5.1.20) with a MySQL driver. How are you specifying the specific driver?</p>
  • <blockquote class="ipsBlockquote" data-author="JFreeman" data-cid="134578" data-time="1426543627">
    <div>
    <p>Did you restart the iHub after dropping in the jar?</p>
    <p> </p>
    <p>If not, you will need to restart the iHub for the new jar to become available.</p>
    </div>
    </blockquote>
    <p> </p>
    <p>Yes, I restarted iHub using the start/stop scripts.</p>
    <p> </p>
    <p> </p>
    <blockquote class="ipsBlockquote" data-author="mblock" data-cid="134579" data-time="1426544172">
    <div>
    <p>Also F-Type already ships (with a slightly earlier version 5.1.20) with a MySQL driver. How are you specifying the specific driver?</p>
    </div>
    </blockquote>
    <p>
    In BIRT report designer, when I created a new Data Source, I selected "JDBC Database Connection for Query Builder" as the type of data source, then created a new driver definition, which I added the JAR file to. </p>
  • <p>Hmm, I just tried testing it out with a data set using "JDBC Data Source" as the data source type instead of "JDBC Database Connection for Query Builder" and it worked without a hitch. I don't really know what the difference is between these two types, besides the second one having a nice interface for building a query. </p>
  • <p>JDBC Database Connection for Query Builder works a bit differently than a standard JDBC Data Source. The workaround you initially described with adding the jar to a path that is accessible on the server is the current work around for adding additional jars for a Query Builder connection.</p>
    <p> </p>
    <p>There is an active enhancement request being evaluated to modify this behavior to automatically detect a driver in the JDBC drivers directory which may be added in a future release.</p>
    <p> </p>
    <p>For some more details about the specific differences between Query Builder and a standard JDBC Data Source take a look at this documentation: <a data-ipb='nomediaparse' href='http://developer.actuate.com/be/documentation/ihub3/help/BIRTDesigner/index.html#page/DAG/accessing-data-JDBC.08.7.html'>http://developer.actuate.com/be/documentation/ihub3/help/BIRTDesigner/index.html#page/DAG/accessing-data-JDBC.08.7.html</a></p&gt;
    Warning No formatter is installed for the format ipb
  • <p>Hi!</p>
    <p> </p>
    <p>I have the same problem but with Oracle driver and iHub 16.01. I can't find a folder where to put driver jar and constantly get the following stacktrace:</p>
    <pre class="_prettyXprint _lang-">
    SEVERE: An exception occurred during processing. Please see the following message for details:
    Cannot open the connection for the driver: org.eclipse.birt.report.data.oda.jdbc.
    org.eclipse.birt.report.data.oda.jdbc.JDBCException: Cannot load JDBC Driver class: oracle.jdbc.driver.OracleDriver. org.eclipse.birt.report.data.adapter.api.AdapterException: An exception occurred during processing. Please see the following message for details:
    Cannot open the connection for the driver: org.eclipse.birt.report.data.oda.jdbc.
    org.eclipse.birt.report.data.oda.jdbc.JDBCException: Cannot load JDBC Driver class: oracle.jdbc.driver.OracleDriver. org.eclipse.birt.report.engine.api.EngineException: An exception occurred during processing. Please see the following message for details:
    Cannot open the connection for the driver: org.eclipse.birt.report.data.oda.jdbc.
    org.eclipse.birt.report.data.oda.jdbc.JDBCException: Cannot load JDBC Driver class: oracle.jdbc.driver.OracleDriver.
    at org.eclipse.birt.report.engine.executor.ExtendedGenerateExecutor.execute(ExtendedGenerateExecutor.java:70)
    at org.eclipse.birt.report.engine.executor.ExtendedItemExecutor.execute(ExtendedItemExecutor.java:62)
    at org.eclipse.birt.report.engine.internal.executor.wrap.WrappedReportItemExecutor.execute(WrappedReportItemExecutor.java:46)
    at org.eclipse.birt.report.engine.internal.executor.emitter.ReportItemEmitterExecutor.execute(ReportItemEmitterExecutor.java:46)
    at org.eclipse.birt.report.engine.internal.executor.dup.SuppressDuplicateItemExecutor.execute(SuppressDuplicateItemExecutor.java:43)
    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)
    at org.eclipse.birt.report.engine.presentation.ReportDocumentBuilder.build(ReportDocumentBuilder.java:258)
    at org.eclipse.birt.report.engine.api.impl.RunTask.doRun(RunTask.java:273)
    at org.eclipse.birt.report.engine.api.impl.RunTask.run(RunTask.java:115)
    at com.actuate.reportapi.engine.birt.ReportGenerationTask.runTask(ReportGenerationTask.java:1137)
    at com.actuate.reportapi.engine.birt.ReportGenerationTask.generateReport(ReportGenerationTask.java:206)
    at com.actuate.reportapi.engine.ReportGenerationTaskBase.doTask(ReportGenerationTaskBase.java:153)
    at com.actuate.reportapi.engine.Task.execute(Task.java:328)
    at com.actuate.reportapi.enginemanager.ControlRunnable.runTask(ControlRunnable.java:84)
    at com.actuate.reportapi.enginemanager.ControlRunnable.run(ControlRunnable.java:38)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
    at java.lang.Thread.run(Thread.java:745)
    ...
    Caused by: org.eclipse.birt.report.data.oda.jdbc.JDBCException: Cannot load JDBC Driver class: oracle.jdbc.driver.OracleDriver.
    at org.eclipse.birt.report.data.oda.jdbc.JDBCDriverManager.findDriver(JDBCDriverManager.java:881)
    at org.eclipse.birt.report.data.oda.jdbc.JDBCDriverManager.loadAndRegisterDriver(JDBCDriverManager.java:986)
    at org.eclipse.birt.report.data.oda.jdbc.JDBCDriverManager.loadAndRegisterDriver(JDBCDriverManager.java:963)
    at org.eclipse.birt.report.data.oda.jdbc.JDBCDriverManager.doConnect(JDBCDriverManager.java:285)
    at org.eclipse.birt.report.data.oda.jdbc.JDBCDriverManager.getConnection(JDBCDriverManager.java:236)
    at org.eclipse.birt.report.data.oda.jdbc.Connection.connectByUrl(Connection.java:254)
    at org.eclipse.birt.report.data.oda.jdbc.Connection.open(Connection.java:163)
    at org.eclipse.datatools.connectivity.oda.consumer.helper.OdaConnection.open(OdaConnection.java:250)
    at org.eclipse.birt.data.engine.odaconsumer.ConnectionManager.openConnection(ConnectionManager.java:165)
    ... 34 more
    </pre>
    <p>Please help me to fix it</p>
  • <p>In 16.0.1 I think this is the location:</p>
    <p><installation directory>/modules/BIRTiHub/iHub/web/birtservice/WEB-INF/platform/plugins/org.eclipse.birt.report.data.oda.jdbc_4.6.0.v201610042049/drivers</p>
  • turbo_di
    edited December 15, 2016 #9
    <p>Thanks, that did the trick!</p>