Unable to Start Could not get JDBC Connection ClassNotFoundException com.mysql.jdbc.Driver

お困りですか?

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

コミュニティに質問

症状

Bitbucket Server does not start and the following appears in the atlassian-bitbucket.log:

2015-01-10 09:12:24,941 ERROR [spring-startup]  c.a.j.s.w.s.JohnsonDispatcherServlet SpringMVC dispatcher [springMvc] could not be started
org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'crowdUserDao' defined in class path resource [crowd-spi-context.xml]: Unsatisfied dependency expressed through constructor argument with index 0 of type [com.atlassian.event.api.EventPublisher]: : Error creating bean with name 'pluginConfiguration' defined in class path resource [bitbucket-context.xml]: Cannot resolve reference to bean 'pluginPersistentStateStore' while setting constructor argument; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'pluginPersistentStateStore' defined in class path resource [bitbucket-context.xml]: Cannot create inner bean 'com.atlassian.bitbucket.internal.plugin.DefaultPluginPersistentStateStore#5aeae692' of type [com.atlassian.bitbucket.internal.plugin.DefaultPluginPersistentStateStore] while setting constructor argument; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'com.atlassian.bitbucket.internal.plugin.DefaultPluginPersistentStateStore#5aeae692' defined in class path resource [bitbucket-context.xml]: Cannot resolve reference to bean 'pluginStateDao' while setting constructor argument; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'pluginStateDao' defined in URL [jar:file:/opt/atlassian/bitbucket/3.5.1/atlassian-bitbucket/WEB-INF/lib/bitbucket-dao-impl-3.5.1.jar!/com.atlassian.bitbucket/internal/plugin/HibernatePluginStateDao.class]: Unsatisfied dependency expressed through constructor argument with index 0 of type [org.hibernate.SessionFactory]: : Error creating bean with name 'sharedHomeLockAcquirer' defined in class path resource [bitbucket-context.xml]: Cannot resolve reference to bean 'licenseHelper' while setting constructor argument; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'licenseHelper' defined in URL [jar:file:/opt/atlassian/bitbucket/3.5.1/atlassian-bitbucket/WEB-INF/lib/bitbucket-service-impl-3.5.1.jar!/com.atlassian.bitbucket/internal/license/DefaultLicenseHelper.class]: Unsatisfied dependency expressed through constructor argument with index 2 of type [com.atlassian.bitbucket.internal.server.ApplicationPropertyDao]: : Error creating bean with name 'databaseSupplier': Invocation of init method failed; nested exception is org.springframework.jdbc.CannotGetJdbcConnectionException: Could not get JDBC Connection; nested exception is java.sql.SQLException: ------
java.lang.ClassNotFoundException: com.mysql.jdbc.Driver
	at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1324)
	at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1177)
	at java.lang.Class.forName0(Native Method)
	at java.lang.Class.forName(Class.java:190)
    ...

原因

The MySQL JDBC driver has not been installed.

ソリューション

Download and install the driver:

  1. MySQL Connector/J JDBC ドライバをダウンロード サイトからダウンロードします。
  2. ダウンロードした zip/tar.gz ファイルを解凍します。
  3. Copy the mysql-connector-java-5.1.XX-bin.jar file from the extracted directory to your: BITBUCKET_INSTALL/app/WEB-INF/lib directory (for Bitbucket Server 5.0 or later.  For Bitbucket 2.1 - 4.x the location for this driver is BITBUCKET_INSTALL/lib)
  4. Bitbucket Server を停止してから再起動します。「Bitbucket Server の開始および終了」をご参照ください。

最終更新日 2018 年 11 月 2 日

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

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