This section describes how to set up your installation to use a driver other than the default driver.
Open Source JDBC Drivers
For open source JDBC drivers, buildomatic is set up to use a single default driver. If you want to use a driver other than the default driver, you can modify the buildomatic property files that determine the default JDBC driver.
The buildomatic JDBC driver property files are set up to point to a specific driver jar. This allows for multiple driver jar files in the same buildomatic/conf_source/db/<dbType>/jdbc folder. During the installation procedure only the default driver jar is copied to your application server.
If you want to use a newer JDBC driver version or a different JDBC driver, you can modify the buildomatic properties seen in your default_master.properties file.
PostgreSQL Example
The buildomatic/conf_source/db/postgresql/jdbc folder contains the following driver file:
postgresql-42.2.16.jar
If, for instance, you want to change the default driver used by PostgreSQL from type jdbc4 to jdbc3, edit your default_master.properties file:
Overlay upgrade: | <overlay-folder>/buildomatic/default_master.properties |
Other upgrade: | <js-install>/buildomatic/default_master.properties |
Uncomment and change:
# maven.jdbc.version=42.2.16
To:
maven.jdbc.version=9.2-1002.jdbc3
When you next run a buildomatic command, such as deploy-webapp-pro, the jdbc3 driver will be copied to your application server.
MySQL Example
The buildomatic/conf_source/db/mysql/jdbc folder contains this driver file:
mariadb-java-client-2.5.3.jar
If, for instance, you want to use a JDBC driver built and distributed by the MySQL project, such as mysql-connector-java-5.1.30-bin.jar, you first need to download the driver from the MySQL Connector/J download location:
https://dev.mysql.com/downloads/connector/j/
Next, change your buildomatic configuration properties to point to this new driver.
Edit your default_master.properties file:
Overlay upgrade: | <overlay-folder>/buildomatic/default_master.properties |
Other upgrade: | <js-install>/buildomatic/default_master.properties |
Uncomment and change:
# jdbcDriverClass=com.mysql.jdbc.Driver
# maven.jdbc.groupId=mysql
# maven.jdbc.artifactId=mysql-connector-java
# maven.jdbc.version=5.1.30-bin
To:
jdbcDriverClass=com.mysql.jdbc.Driver
maven.jdbc.groupId=mysql
maven.jdbc.artifactId=mysql-connector-java
maven.jdbc.version=5.1.30-bin
Commercial JDBC Drivers
JasperReports Server includes the TIBCO JDBC drivers for the following commercial databases. You can connect to these databases using the TIBCO JDBC driver without additional steps. The drivers are located in the <js-install>buildomaticconf_sourcedb<your_database>jdbc directory, where X.Y is the version number:
• | Oracle – TIoracle-X.Y.jar |
• | SQL Server – TIsqlserver-X.Y.jar |
• | DB2 – TIdb2-X.Y.jar |
These drivers require a valid JasperReports Server license. The driver is for use by JasperReports Server only, and after installation or upgrade, the driver jar must be located under the jasperserver-pro directory, for example <tomcat_home>/tomcat/jasperserver-pro/WEB-INF/lib. |
If you're using the default settings for the driver, you don't need to edit default_master.properties.
You can also choose to use the driver supplied by the database vendor as described below. For upgrade, this section assumes you have already downloaded the jar file for the database you want to use.
Oracle Example
1. | Copy your Oracle driver to the following directory: |
Overlay upgrade: | <overlay-folder>/buildomatic/conf_source/db/oracle/native.jdbc |
Other upgrade: | <js-install>/buildomatic/conf_source/db/oracle/native.jdbc |
2. | Change to the <js_install>/buildomatic directory and open default_master.properties in a text editor. |
3. | Go to the Additional Settings section in this file. |
4. | Go to the first setup item, Setup Standard Oracle JDBC Driver. |
5. | Follow the instructions to uncomment the required properties and enable your driver. The following example shows how to set up default_master.properties to point to a driver named ojdbc6-11.2.0.3.jar using SID: |
# 1) Setup Standard Oracle JDBC Driver## Uncomment and modify the value to nativejdbcDriverMaker=native## Uncomment and modify the value in order to change the default# 1a) Driver will be found here: <path>/buildomatic/conf_source/db/oracle/native.jdbc#maven.jdbc.groupId=oraclemaven.jdbc.artifactId=ojdbc6maven.jdbc.version=11.2.0.3[/code] [/code] |
If you're using an Oracle service name instead of an SID, uncomment the line serviceName= and add your service name.
6. | Save the default_master.properties file. |
SQL Server Example
1. | Copy your SQL Server driver to the following directory: |
Overlay upgrade: | <overlay_folder>/buildomatic/conf_source/db/sqlserver/native.jdbc |
Other upgrade: | <js_install>/buildomatic/conf_source/db/sqlserver/native.jdbc |
2. | Change to the <js_install>/buildomatic directory and open default_master.properties in a text editor. |
3. | Go to the Additional Settings section in this file. |
4. | Go to the first setup item, Setup Standard SQL Server JDBC Driver. |
5. | Uncomment the required properties and enable your driver. The following example shows how to set up default_master.properties to point to a driver named mssql-jdbc-6.4.0.jre8.jar: |
# 1) Setup Standard SQLServer JDBC Driver## Uncomment and modify the value to nativejdbcDriverMaker=native## Uncomment and modify the value in order to change the default# Driver will be found here: <path>/buildomatic/conf_source/db/sqlserver/native.jdbc#maven.jdbc.groupId=sqlservermaven.jdbc.artifactId=mssql-jdbcmaven.jdbc.version=6.4.0.jre8[/code] |
6. | Save the default_master.properties file. |
DB2 Example
1. | Copy your DB2 driver to the following directory: |
Overlay upgrade: | <overlay_folder>/buildomatic/conf_source/db/db2/native.jdbc |
Other upgrade: | <js_install>/buildomatic/conf_source/db/db2/native.jdbc |
2. | Change to the <js_install>/buildomatic directory and open default_master.properties in a text editor. |
3. | Go to the Additional Settings section in this file. |
4. | Go to the first setup item, Setup Standard DB2 JDBC Driver. |
5. | Uncomment the required properties and enable your driver. |
# 1) Setup Standard DB2 JDBC Driver## Uncomment and modify the value to nativejdbcDriverMaker=native## Uncomment and modify the value in order to change the default# Driver will be found here: <path>/buildomatic/conf_source/db/db2/native.jdbc#maven.jdbc.groupId=ibmmaven.jdbc.artifactId=db2jccmaven.jdbc.version=9.7[/code] |
6. | Add the following additional properties, setting the correct values for your installation. For example: |
7. | Save the default_master.properties file. |
Recommended Comments
There are no comments to display.