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

Troubleshooting Databases

このページの内容

お困りですか?

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

コミュニティに質問

症状

Stash does not start and the following appears in the atlassian-stash.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 [stash-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 [stash-context.xml]: Cannot create inner bean 'com.atlassian.stash.internal.plugin.DefaultPluginPersistentStateStore#5aeae692' of type [com.atlassian.stash.internal.plugin.DefaultPluginPersistentStateStore] while setting constructor argument; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'com.atlassian.stash.internal.plugin.DefaultPluginPersistentStateStore#5aeae692' defined in class path resource [stash-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/stash/3.5.1/atlassian-stash/WEB-INF/lib/stash-dao-impl-3.5.1.jar!/com/atlassian/stash/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 [stash-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/stash/3.5.1/atlassian-stash/WEB-INF/lib/stash-service-impl-3.5.1.jar!/com/atlassian/stash/internal/license/DefaultLicenseHelper.class]: Unsatisfied dependency expressed through constructor argument with index 2 of type [com.atlassian.stash.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 <Stash install directory>/lib directory (for Stash 2.1 or later).
  4. Stop, and then restart Stash. See Starting and stopping Stash.
最終更新日 2018 年 11 月 2 日

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

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