Unable to Setup Postgres Due to Incorrect Driver

Platform Notice: Data Center Only - This article only applies to Atlassian products on the Data Center platform.

Note that this KB was created for the Data Center version of the product. Data Center KBs for non-Data-Center-specific features may also work for Server versions of the product, however they have not been tested. Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.

*Except Fisheye and Crucible

Symptoms

The setup wizard crashes during a Postgres database configuration step. Logs contain:

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 2008-04-01 01:45:55,371 ERROR [http-8090-Processor4] [[Standalone].[localhost].[/].[action]] invoke Servlet.service() for servlet action threw exception java.lang.UnsupportedClassVersionError: Bad version number in .class file at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClass(Unknown Source) at java.security.SecureClassLoader.defineClass(Unknown Source) at org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:1847) at org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:873) at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1326) at org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1205) at java.lang.ClassLoader.loadClassInternal(Unknown Source) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Unknown Source) at com.atlassian.confluence.setup.actions.AbstractSetupStandardDatabaseAction.checkDriver(AbstractSetupStandardDatabaseAction.java:20) at com.atlassian.confluence.setup.actions.SetupStandardDatabaseAction.execute(SetupStandardDatabaseAction.java:22) at com.opensymphony.xwork.DefaultActionInvocation.invoke(DefaultActionInvocation.java:168)

Cause

The incorrect JDBC Driver is in place. jdbc4 is compiled for Java 1.6, whereas the jdbc3 jar file is compiled for for Java 1.5. Make sure you have the correct version for the correct JVM.

Resolution

Download the correct jar file and replace the old one in the /lib directory.

Updated on April 8, 2025

Still need help?

The Atlassian Community is here for you.