Upgrade failed with net.sf.hibernate.HibernateException: JDBC Driver class not found: oracle.jdbc.OracleDriver

Still need help?

The Atlassian Community is here for you.

Ask the community

Symptoms

You are upgrading your instance using the installer.

The following appears in the 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)

Cause

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.

Resolution

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.

Last modified on Mar 30, 2016

Was this helpful?

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