As of version 5.6.1, 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 driver name is included for reference:
| • | Oracle — ji-oracle-driver-1.0.2.jar |
| • | SQL Server — ji-sqlserver-driver-1.0.2.jar, |
| • | DB2 — ji-db2-driver-1.0.2.jar |
| These drivers require a valid JasperReports Server license. |
You can also choose to use the driver supplied by the database vendor as described below. To do this, you must first obtain and install the driver you want, then modify your default_master.properties to use your driver.
Download an Optional JDBC Driver Jar
To use the driver supplied by the database vendor, you can optionally download and install it.
Download Driver Jar from Vendor Website
To download a commercial JDBC driver for a particular vendor, you will need to go to the download website of that vendor. It is typical that these vendors will require you to register and login to their website before you can download driver packages. Additionally, it is standard for the vendor's website to present a terms of service agreement that will need to be agreed to. Here are some common URL addresses where you can find download packages for supported databases:
Collect Driver Jar from Existing Application
It is very often the case that a JDBC driver is already present in an application that is running within your network. If this is the case, then it can be very convenient to collect a copy of that driver jar and copy it to the JasperReports Server install location.
Once you have downloaded your driver, copy it to the correct location and configure your files as described in the sections below.
Oracle Example
Once you have downloaded an Oracle driver or found an existing Oracle driver on your system, copy it to the correct location and modify the installation files as follows:
| 1. | Copy the driver you want to use to the following directory: |
<js-install>/buildomatic/conf_source/db/oracle/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 you would set up default_master.properties to point to a driver named ojdbc5-11.2.0.jar using SID: |
# 1) Setup Standard Oracle JDBC Driver## Uncomment and modify the value in order to change the default# 1a) Driver will be found here: <path>/buildomatic/conf_source/db/oracle/jdbc#maven.jdbc.groupId=oraclemaven.jdbc.artifactId=ojdbc5maven.jdbc.version=11.2.0.2[/code] jdbcDriverClass=oracle.jdbc.OracleDriverjdbcDataSourceClass=oracle.jdbc.pool.OracleConnectionPoolDataSource## 1b) Service Name # If you are using an oracle service name instead of an SID, your JDBC URL will# typically have a form similar to: jdbc:oracle:thin:@host:1521/servicename# To enable this you should uncomment the following line and add your service name# serviceName=[/code] |
If you are 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. |
| 7. | Open the <js_install>/conf_source/db/oracle/db.template.properties file in a text editor. |
| 8. | Locate the values for the TIBCO JDBC drivers and comment them out: |
# admin.jdbcUrl=jdbc:tibcosoftware:oracle://${dbHost}:${dbPort};${dbSidOrServiceNameProp} # ${AdditionalAdminProperties}# js.jdbcUrl=jdbc:tibcosoftware:oracle://${dbHost}:${dbPort};${dbSidOrServiceNameProp}# sugarcrm.jdbcUrl=jdbc:tibcosoftware:oracle://${dbHost}:${dbPort};${dbSidOrServiceNameProp}# foodmart.jdbcUrl=jdbc:tibcosoftware:oracle://${dbHost}:${dbPort};${dbSidOrServiceNameProp}[/code] |
| 9. | Uncomment out the values for the vendor's Oracle driver and make sure they are as follows: |
SQL Server Example
Once you have downloaded SQL Server driver or found an existing SQL Server driver on your system, copy it to the correct location and modify the installation files as follows:
| 1. | Copy the driver you want to use to the following directory: |
<js-install>/buildomatic/conf_source/db/sqlserver/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 you would set up default_master.properties to point to a driver named sqljdbc-1.6.jar: |
# Default) Setup Tibco/Jaspersoft/Progress JDBC Driver## uncomment the following line for JDBC 4# jdbcDataSourceClass=tibcosoftware.jdbc.sqlserver.SQLServerDataSource40# 1) Setup Standard SQLServer JDBC Driver## Uncomment and modify the value in order to change the default# Driver will be found here: <path>/buildomatic/conf_source/db/sqlserver/jdbc#maven.jdbc.groupId=sqlservermaven.jdbc.artifactId=sqljdbcmaven.jdbc.version=1.6# admin.jdbcUrl=jdbc:sqlserver://${dbHostOrInstance};SelectMethod=cursorsqlserver.jdbcUrlProtocol=jdbc:sqlserverjdbcDriverClass=com.microsoft.sqlserver.jdbc.SQLServerDriverjdbcDataSourceClass=com.microsoft.sqlserver.jdbc.SQLServerConnectionPoolDataSource[/code] |
| 6. | Make sure the following line is not commented: |
# admin.jdbcUrl=jdbc:sqlserver://${dbHostOrInstance};SelectMethod=cursor[/code] |
| 7. | Save the default_master.properties file. |
DB2 Example
Once you have downloaded a DB2 driver or found an existing DB2 driver on your system, copy it to the correct location and modify the installation files as follows:
| 1. | Copy the driver you want to use to the following directory: |
<js-install>/buildomatic/conf_source/db/db2/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. | Follow the instructions to uncomment the required properties and enable your driver. |
| 6. | Add the following additional properties, setting the correct values for your installation. For example: |
| 7. | Save the default_master.properties file. |
Application Server Copy-to Locations
When the deploy-webapp-pro buildomatic target is executed it copies the JDBC driver to the following default locations:
Tomcat 6 and 7: | <tomcat>/lib |
JBoss 5 | <jboss>/server/default/lib |
GlassFish: | <glassfish>/domains/domain1/lib/ext |
Recommended Comments
There are no comments to display.