Unable to connect to MySQL database - Exception attempting to load Database driver

お困りですか?

アトラシアン コミュニティをご利用ください。

コミュニティに質問

症状

Migrating to MySQL database fails and the following error is displayed in the web interface: 

Unable to load database driver from your FISHEYE_INST/lib directory. Please check the JDBC driver jar is properly installed


The following warning is written in the FISHEYE_INST/var/log/atlassian-fisheye-<date>.log:

2022-04-17 10:34:27,237 WARN  [qtp1052317717-181 ] fisheye TestDBConnectionAjaxAction-checkDriverClass - Exception attempting to load Database driver
java.lang.ClassNotFoundException: com.mysql.jdbc.Driver
	at java.net.URLClassLoader.findClass(URLClassLoader.java:382) [?:1.8.0_241]
	at java.lang.ClassLoader.loadClass(ClassLoader.java:418) [?:1.8.0_241]
	at java.lang.ClassLoader.loadClass(ClassLoader.java:351) [?:1.8.0_241]
	at java.lang.Class.forName0(Native Method) [?:1.8.0_241]
	at java.lang.Class.forName(Class.java:348) [?:1.8.0_241]
	at com.atlassian.crucible.actions.admin.database.TestDBConnectionAjaxAction.checkDriverClass(TestDBConnectionAjaxAction.java:57) [fisheye.jar:?]
	at com.atlassian.crucible.actions.admin.database.TestDBConnectionAjaxAction.execute(TestDBConnectionAjaxAction.java:31) [fisheye.jar:?]
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [?:1.8.0_241]
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) [?:1.8.0_241]
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [?:1.8.0_241]
	at java.lang.reflect.Method.invoke(Method.java:498) [?:1.8.0_241]
	...(truncated) 

環境

Fisheye / Crucible 2.9.x or newer.

原因

As can be seen at Migrating to MySQL - Prerequisites, starting with Fisheye 2.9.x, the JDBC driver for MySQL is no longer bundled with Fisheye/Crucible due to MySQL licensing restrictions.

ソリューション

Manually download and install the MySQL Connector/J JDBC driver version 5.1.49 because 8.x is known to cause issues.

以下の手順を実行します。

  1. Stop Fisheye / Crucible
  2. Download the MySQL Connector/J JDBC driver 5.1.49 from this direct download link or access the download website, switch the Product Version dropdown to 5.1.49 and click the Download button.
  3. Expand the downloaded zip / tar.gz file.
  4. Copy the mysql-connector-java-5.1.XX-bin.jar file from the extracted directory to your FISHEYE_INST/lib directory
    1. Remember that FISHEYE_INST is an environment variable which points to Fisheye's data directory
    2. You may need to create the lib directory inside FISHEYE_INST
  5. Make sure that the user who starts Fisheye/Crucible has the proper file system permission to execute the jar file
  6. Start Fisheye / Crucible

最終更新日 2022 年 4 月 17 日

この内容はお役に立ちましたか?

はい
いいえ
この記事についてのフィードバックを送信する
Powered by Confluence and Scroll Viewport.