Third party data sources

Eclipse BIRT supports multiple data sources in the same report. However, only the SQL for Jira JDBC Driver is packed by default in Jira:

jdbc:jira: 

The rest of data sources must be configured explicitly in the report and in the machine hosting Jira, otherwise, you will get a ClassNotFoundException when it is deployed and performed on Jira.

Tutorial

Local desktop

You might want to include some third parry data sources like a CVS file in your BIRT report. Then you can download the appropriate Java library to access to those third party data, like the cvsJdbc library for CVS files for example:


http://csvjdbc.sourceforge.net/



The you have to create a Data Source item in BIRT and add the JDBC driver jar library to the BIRT Report Designer:



Those files are stored locally under the following directory:

${BIRT Report Designer home}/plugins/org.eclipse.birt.report.data.oda.jdbc_<version>/drivers


Remote server

When the report is uploaded into Jira, those JDBC are missing in the server. They have to be stored in some directory with read access by the OS user running the Jira service.

Before upload the report, you have to set the location of the required JDBC drivers on the server. The OdaJDBCDriverClassPath property must be configured:

  1. Select the report in the Outline view:
  2. Select the Script tab
  3. Select the beforeFactory event
  4. Type the following script:
reportContext.getAppContext().put("OdaJDBCDriverClassPath", 
"C:/Users/pablo/Downloads/csvjdbc-1.0-34.jar");

and replace the OdaJDBCDriverClassPath value above with the appropiate data according to your server configuration. You can set an specific file or a directory.


Alternatively, you might want to set it as a Java System property to read it in real-time, and make the report independent of the particular location of the libraries in each environment.