net.sf.Hibernate.HibernateException でアップグレードに失敗: JDBC ドライバー クラスが見つからない: oracle.jdbc.OracleDriver

お困りですか?

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

コミュニティに質問

プラットフォームについて: Data Center - この記事は、Data Center プラットフォームのアトラシアン製品に適用されます。

このナレッジベース記事は製品の Data Center バージョン用に作成されています。Data Center 固有ではない機能の Data Center ナレッジベースは、製品のサーバー バージョンでも動作する可能性はありますが、テストは行われていません。サーバー*製品のサポートは 2024 年 2 月 15 日に終了しました。サーバー製品を利用している場合は、アトラシアンのサーバー製品のサポート終了のお知らせページにて移行オプションをご確認ください。

*Fisheye および Crucible は除く

症状

You are upgrading your instance using the installer.

atlassian-confluence.log に次のエラーが返される。

Caused by: net.sf.hibernate.HibernateException: JDBC Driver class not found: oracle.jdbc.OracleDriver
	at net.sf.hibernate.connection.C3P0ConnectionProvider.configure(C3P0ConnectionProvider.java:61)
	at net.sf.hibernate.connection.ConnectionProviderFactory.newConnectionProvider(ConnectionProviderFactory.java:83)
	at net.sf.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java:76)
	at net.sf.hibernate.cfg.Configuration.buildSettings(Configuration.java:1187)
	at net.sf.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:818)
	at org.springframework.orm.hibernate.LocalSessionFactoryBean.newSessionFactory(LocalSessionFactoryBean.java:540)
	at org.springframework.orm.hibernate.LocalSessionFactoryBean.afterPropertiesSet(LocalSessionFactoryBean.java:474)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1369)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1335)
	... 110 more
2012-07-09 01:26:28,390 WARN [main] [atlassian.confluence.upgrade.UpgradeLauncherServletContextListener] contextInitialized Upgrades not attempted due to error in main spring context
2012-07-09 01:26:28,390 WARN [main] [atlassian.confluence.plugin.PluginFrameworkContextListener] contextInitialized Not starting full plugin system due to error in main spring context
2012-07-09 01:26:30,713 INFO [main] [com.atlassian.confluence.lifecycle] init Confluence is ready to serve
2012-07-09 01:27:23,923 ERROR [http-8090-1] [[Standalone].[localhost].[/].[jsp]] log Servlet.service() for servlet jsp threw exception
com.atlassian.util.concurrent.LazyReference$InitializationException: java.lang.NullPointerException
	at com.atlassian.util.concurrent.LazyReference.getInterruptibly(LazyReference.java:152)

原因

When using the installer, the JDBC driver didn't get copied into the new WEB-INF/lib directory.

Oracle is a special case as we don't bundle Oracle drivers and that's the reason it is not in WEB-INF/lib. During the upgrade the installer did not move over any added files to the new installation and in case of Oracle it would mean that Confluence wouldn't be able to connect to a database.

ソリューション

Copy the jdbc from your old installation to your new installation, or download the latest driver from the manufacturer's website. The JDBC driver needs to be copied into <confluence-install>/confluence/WEB-INF/lib folder. Please check Database Setup for Oracle for database & driver compatibility.

最終更新日: 2024 年 12 月 19 日

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

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