Bamboo Error: "Failed to load driver class com.mysql.jdbc.Driver from HikariConfig class classloader ParallelWebappClassLoader"

Still need help?

The Atlassian Community is here for you.

Ask the community

Platform notice: Server and Data Center only. This article only applies to Atlassian products on the Server and Data Center platforms.

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

    

Summary

The error "Failed to load driver class com.mysql.jdbc.Driver from HikariConfig class classloader ParallelWebappClassLoader" is encountered in atlassian-bamboo.log when upgrading Bamboo or due to file access permission. This KB article aims to explain the cause of this error and shows the possible solutions.

Environment

  • Bamboo Server and Data Center
  • MySQL Database

Diagnosis

Look for the line below in <bamboo-home>/logs/atlassian-bamboo.log

Failed to load driver class com.mysql.jdbc.Driver from HikariConfig class classloader ParallelWebappClassLoader

The error message in <bamboo-home>/logs/atlassian-bamboo.log is described below:

2023-05-18 07:26:38,860 INFO [main] [BootstrapLoaderListener] Starting BootstrapLoaderListener
2023-05-18 07:26:38,868 INFO [main] [BootstrapLoaderListener] *******************************
2023-05-18 07:26:38,868 INFO [main] [BootstrapLoaderListener] *   Bamboo is starting up     *
2023-05-18 07:26:38,868 INFO [main] [BootstrapLoaderListener] *******************************
2023-05-18 07:26:38,869 INFO [main] [ServletContextHolder] Setting servlet context: Bamboo
2023-05-18 07:26:38,883 INFO [main] [BootstrapLoaderListener] atlassian.org.osgi.framework.bootdelegation Override disabled; detected value null
2023-05-18 07:26:38,951 INFO [main] [BootstrapLoaderListener] App classloader is the same as web app classloader
2023-05-18 07:26:39,890 INFO [main] [BootstrapLoaderListener] Starting Bamboo 9.2.1 (build #90201 Mon Feb 06 15:02:50 UTC 2023) using Java 11.0.19 from Red Hat, Inc.
2023-05-18 07:26:39,891 INFO [main] [BootstrapLoaderListener] Real path of servlet context: /opt/atlassian-bamboo-9.2.1/atlassian-bamboo/
2023-05-18 07:26:40,335 ERROR [main] [HikariConfig] Failed to load driver class com.mysql.jdbc.Driver from HikariConfig class classloader ParallelWebappClassLoader
  context: ROOT
  delegate: false
----------> Parent Classloader:
java.net.URLClassLoader@5a10411

Cause

There are possible reasons:

  • During Bamboo upgrade, the MySQL Connector/J driver file (mysql-connector-java-X.X.XX-bin.jar  file) might be missing in the <bamboo-install>/lib directory, or it may not be appropriately configured for access by the Bamboo system account.
  • The MySQL Database was upgraded and the driver used by Bamboo may need further adjustments.

Solution

  • If you had just upgraded Bamboo from an earlier version, check if the MySQL Connector/J driver was copied to the upgraded instance's <bamboo-install>/lib directory. If not, copy that file from the previous Bamboo release and validate. Also, make sure to validate that the file permissions on the new location are correct. This step is covered in the Bamboo upgrade guide - Install a JDBC driver page.
  • Make sure to check the Supported platforms page, select your current Bamboo version and review the supported MySQL Database and MySQL Connector/J driver versions.


Last modified on Aug 10, 2023

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.