Docs‎ > ‎Integrate‎ > ‎Data Sources‎ > ‎

JDBC Driver Installation

This page provides details on installing JDBC Drivers.

CA Live API Creator supports 

  • MySQL
  • MariaDB
  • PostgreSQL
  • Oracle
  • SQL Server
  • Azure SQL Server
  • Apache Derby

See the API Creator product data sheet for specific supported versions and environments.

The demonstration Jetty package includes drivers for MariaDB(also supports MySQL), Apache Derby/JavaDB, and PostgreSQL.  The database drivers are found in the CALiveAPICreator/lib/ext directory.  You can place Oracle, SQLServer, MySQL and other drivers into the lib/ext directory to make them available. You will need to restart Jetty for these drivers to become available.

For your convenience some links are shown below to help you locate and download drivers.

You may also modify the Production war to ADD your drivers. Note that this is normally NOT the right way to do this -- drivers are normally added to the container, not the war file, but this can be a handy shortcut.

# for example, adding the Oracle drivers to a modified .WAR file
$mkdir tmp
$cd tmp
$unzip ../CALiveAPICreator-Production-2.0.00.2000.zip
$cp production/APIServer.war APIServer-mod.war
$mkdir WEB-INF WEB-INF/lib
$cp ..../ojdb7.jar WEB-INF/lib/.
$zip APISERVER-mod.war WEB-INF/lib/ojdbc7.jar

# APIServer-mod.war now contains the required Oracle drivers and can be deployed simply on a container such as Amazon Elastic Beanstalk. 

Microsoft SQL Server and Azure SQL ServerDrivers

See https://msdn.microsoft.com/en-us/data/aa937724.aspx
Download sqljdbc_4.2.6420.100_enu.tar.gz (you may need to scroll the screen to see the driver)


Extract the file using tar -xf sqljdbc_4.2.6420.100_enu.tar.gz

You will find the file sqljdbc_4.2/enu/sqljdbc42.jar

Copy this file into the extracted CA Live API Creator Jetty package into the CALiveApiCreator/lib/ext directory, relative to the directory with Start.sh in it.

Note the directory (click thumbnail to the right).

Start the Jetty package.


Oracle

Download from http://www.oracle.com/technetwork/indexes/downloads/index.html (JDBC Drivers)

Download the ojdbc7.jar from 12.1.0.2.0 version.  You may use any version of the Oracle drivers that are compatible with the database version you are using.

Copy this file into the extracted CA Live API Creator Jetty package into the CALiveApiCreator/lib/ext directory, relative to the directory with Start.sh in it.

Note the directory (click thumbnail to the right).

Start the Jetty package.


MySQL

These drivers work for various versions of MySQL, MariaDB, Amazon Aurora
See http://dev.mysql.com/downloads/connector/j/
    
Download, extract and select mysql-connector-java-5.1.37/mysql-connector-java-5.1.37-bin.jar

Copy this file into the extracted CA Live API Creator Jetty package into the CALiveApiCreator/lib/ext directory, relative to the directory with Start.sh in it.

Note the directory (click thumbnail to the right).

Start the Jetty package.


MariaDB

This is fully compatible with MySQL.  You may use the MariaDB JDBC Driver or the MySQL JDBC Driver.  There are minor differences in the JDBC URL string.

See https://mariadb.com/resources/downloads

You must provide the following in your server.xml file to avoid optimistic locking failures:


Notes:
  On systems that are NOT set to UTC, you will need to modify the MySQL connection string to work-around timestamp issues.
See ... for more details. 
<Resource accessToUnderlyingConnectionAllowed="true" 
        auth="Container" 
        defaultAutoCommit="false" 
        driverClassName="org.mariadb.jdbc.Driver" 
        initialSize="5" 
        logAbandoned="true" 
        maxActive="20" 
        maxIdle="10" 
        maxWait="30000" 
        minIdle="5" 
        name="jdbc/AdminDB" 
        password="localpassword" 
        removeAbandoned="true" 
        removeAbandonedTimeout="30" 
        type="javax.sql.DataSource"
        url="jdbc:mariadb://localhost:3306/dblocal_admin?characterEncoding=utf8
        username="dblocal_admin" 
        validationQuery="select 1"/>