Unable to load database driver: com.xxx.jdbc.Driver

Problem

There will be cases when you try to create the SQL profile and you run into the Driver not found issue. 

Error Message (if applicable)

Unable to load database driver: com.xxx.jdbc.Driver

Environment

  • Operating System:
  • Add-0n Version:
  • Web Browser:
  • Database: MySQL, PostgreSQL, Oracle, Microsoft SQL Server

Cause

The error, "Unable to load database driver: com.xxx.jdbc.Driver”, generally show up if there is problem with JAR locations.  

Solution

The dbJar must point to the correct location of the JDBC jar file. Please set the absolute path in the Driver Jar Location field.  You need to keep the jar in <Confluence_Installation_Dir>/lib/ and restart the Confluence instance.

  1. Once you login to the Confluence instance with an admin account, please go to the SQL for Confluence Configuration Page. 
  2. Click on Edit on the appropriate profile. 
  3. In the Driver Jar Location field, enter the location of the Jar File. For example, if the location is /opt/atlassian/<Confluence_installation_dir>l/ib/mysql-connector-java-5.1.34.jar then the profile should be like the following example. 

    dbUrl=jdbc:mysql://10.10.0.101:3306/confluence6
    dbUser=admin
    dbPassword=admin
    dbJar=/Applications/atlassian/confluence/lib/mysql-connector-java-5.1.34.jar
    dbDriver=org.mysql.jdbc.Driver
    dbConnectionProperties=loglevel=2

    For example, you can set the following link in the Driver Jar Location. 

    http://central.maven.org/maven2/mysql/mysql-connector-java/5.1.34/mysql-connector-java-5.1.34.jar

  4. Click on "Test Connection"
  5. Once it is successfully, click on Next and Save the Profile. 


You can also review the following documentation.