Managing JDBC Drivers

To access a database from JasperReports Server using JDBC you need an appropriate driver that's accessible in the server's classpath. The following drivers are installed by default:

Autonomous REST (tibcosoftware.jdbc.autorest.AutoRESTDriver)
Cassandra (com.simba.cassandra.jdbc4.Driver)
Google BigQuery (tibcosoftware.jdbc.googlebigquery.GoogleBigQueryDriver)
Hive (tibcosoftware.jdbc.hive.HiveDriver)
IBM DB2 (tibcosoftware.jdbc.db2.DB2Driver)
Impala (com.simba.impala.jdbc4.Driver)
MS SQL Server (tibcosoftware.jdbc.sqlserver.SQLServerDriver)
MySQL (org.mariadb.jdbc.Driver)
Neo4j (com.simba.neo4j.jdbc4.Driver)
Oracle (tibcosoftware.jdbc.oracle.OracleDriver)
PostgreSQL (org.postgresql.Driver)
Redshift (tibcosoftware.jdbc.redshift.RedshiftDriver)
Salesforce (tibcosoftware.jdbc.sforce.SForceDriver)
SparkSQL (tibcosoftware.jdbc.sparksql.SparkSQLDriver)
SparkSQL (com.simba.spark.jdbc.Driver)
Tibco Data Virtualization (cs.jdbc.driver.CompositeDriver)

Drivers for other databases can be downloaded from links on the Jaspersoft community website:

http://community.jaspersoft.com/wiki/downloading-and-installing-database-drivers

The system administrator (superuser) can add JDBC drivers for other databases in the following ways:

During installation. For more information, see the TIBCO JasperReports Server Installation Guide.
At any time through the UI. As described in the procedure below, the system admin can add, replace, or remove JDBC drivers through the user interface, without needing to restart the server.

Only the system administrator can manage the JDBC drivers, but once uploaded, they're available to all administrators who create data sources.

JasperReports Server includes a JDBC driver for ElasticSearch that is not enabled by default. For information on enabling the driver and its limitations, see Enabling the JDBC Driver for ElasticSearch Data Sources.

To add a JDBC driver:

1. Log on as the system administrator (superuser).
2. Select View > Repository, right-click a folder's name, and select Add Resource > Data Source from the context menu. Alternatively, you can select Create > Data Source from the main menu on any page.
3. In the Type field, select JDBC Data Source. The page refreshes to show the fields necessary for a JDBC data source.
4. The drop-down selector for the JDBC Driver field shows the available JDBC drivers and those that are not installed.

Viewing the List of Available JDBC Drivers

5. Select the driver that has not been installed, then click Add Driver. The Select Driver dialog appears.
6. If you have not yet obtained the driver, click the link to Jaspersoft's community website for Downloading and Installing Database Drivers. That page has links to the most commonly used JDBC drivers. After you download a driver to your file system, you can return to the Select Driver dialog.

Adding a JDBC Driver

7. In the Select Driver dialog, click Browse to locate the appropriate driver JAR file. If your driver has more than one JAR file, click the Browse button that appears after selecting the first file.
8. Click Upload to install the driver and make it available immediately.

You can replace any driver that you upload with newer versions of the same driver. If you want to use the vendor's own driver instead of the TIBCO JDBC driver, you can install it as a new driver as described in the TIBCO JasperReports Server Installation Guide.

To update a JDBC driver:

1. Log on as the system administrator (superuser).
2. Select View > Repository, right-click a folder's name, and select Add Resource > Data Source from the context menu. Alternatively, you can select Create > Data Source from the main menu on any page.
3. In the Type field, select JDBC Data Source. The page refreshes to show the fields necessary for a JDBC data source.
4. The drop-down selector for the JDBC Driver field shows the available JDBC drivers and those that are not installed.
5. To update a driver that has already been installed, select it from the list, then click Select Driver. The Select Driver dialog appears and notifies you that selecting a driver will overwrite the existing one.

Updating a JDBC Driver

6. In the Select Driver dialog, click Browse to locate the JAR file for the new driver.
7. Click Upload to replace the existing driver and make it available immediately.
8. You can now use this driver to create a data source, and the driver will be installed when other administrators create data sources.

To remove an uploaded JDBC driver:

1. Log on as the system administrator (superuser).
2. Select Manage > Server Settings and choose Restore Defaults from the left-hand panel.
3. Locate the driver you uploaded in the list of properties. The drivers with the value [SYSTEM] are the default drivers configured at installation time. Do not remove the [SYSTEM] drivers.
4. Click beside the driver you want to remove, then confirm your choice.

Removing an Uploaded JDBC Driver

5. Click Save to save your changes.

If the JDBC driver you remove is one that updated a default driver, the default driver will reappear as an installed driver the next time you use the New Data Source wizard.

Version: 
Feedback
randomness