Restore does not work - The configured JDBC driver, com.mysql.jdbc.Driver, is not available on the classpath
Platform Notice: Data Center Only - This article only applies to Atlassian products on the Data Center platform.
Note that this KB was created for the Data Center version of the product. Data Center KBs for non-Data-Center-specific features may also work for Server versions of the product, however they have not been tested. Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.
*Except Fisheye and Crucible
Symptoms
Restore can't be executed after running the following command:
1
$ java -Dbitbucket.home="<path/to/new_bitbucket_home>" -Djdbc.override="false" -jar <path/to/backup/client>/bitbucket-restore-client.jar <path/to/backup/file>/bitbucket-20140107-024714-807.tar
The following appears in the <path/to/backup/client>/log/atlassian-sbc-YYYY-MM-DD-HHMM.log:
1
2
3
4
5
2014-01-08 18:14:30,602 ERROR bitbucket-20140107-024714-807.tar could not be restored. Reason: The configured JDBC driver, com.mysql.jdbc.Driver, is not available on the classpath. Ensure the jar for the driver is present in the "jdbc" directory beneath <path/to/backup/client>. and try again.
com.atlassian.bitbucket.internal.backup.client.RestoreException: The configured JDBC driver, com.mysql.jdbc.Driver, is not available on the classpath. Ensure the jar for the driver is present in the "jdbc" directory beneath <path/to/backup/client>. and try again.
at com.atlassian.bitbucket.internal.backup.client.DefaultRestoreClient.createDataSource(DefaultRestoreClient.groovy:154) ~[bitbucket-restore-client.jar:1.0.3]
at com.atlassian.bitbucket.internal.backup.client.DefaultRestoreClient.withDataSource(DefaultRestoreClient.groovy:252) ~[bitbucket-restore-client.jar:1.0.3]
... 5 more frames available in the log file
Cause
The MySQL JDBC driver is missing from <path/to/backup/client>/jdbc
directory.
Resolution
Download the MySQL JDBC driver from the link under the Download and install the JDBC driver section and place it into the <path/to/backup/client>/jdbc.
Make sure that backup-config.properties
is configured with jdbc.driver=com.mysql.jdbc.Driver.
Please refer to the Data recovery and backups document for more details on the restore procedure.
If the resolution does not work, please get in touch with Atlassian Support.
Was this helpful?