Confluence upgrade fails with "java.lang.NoClassDefFoundError: org/springframework/core/JdkVersion"
Platform Notice: Server and Data Center Only - This article only applies to Atlassian products on the server and data center platforms.
Confluence upgrade fails right after generating the pre-upgrade recovery file.
This problem was identified in Confluence server and datacenter version 7.3.5. It could also affect other versions of Confluence.
The following error appears in the
2021-01-13 10:40:24,228 ERROR [Catalina-utility-1] [atlassian.confluence.plugin.PluginFrameworkContextListener] launchUpgrades Upgrade failed, application will not start: Upgrade task com.atlassian.confluence.upgrade.upgradetask.Hibernate5ConstraintNamesPreSchemaUpgradeTask@7b93a3fc failed during the SCHEMA_UPGRADE phase due to: org/springframework/core/JdkVersion com.atlassian.confluence.upgrade.UpgradeException: Upgrade task com.atlassian.confluence.upgrade.upgradetask.Hibernate5ConstraintNamesPreSchemaUpgradeTask@7b93a3fc failed during the SCHEMA_UPGRADE phase due to: org/springframework/core/JdkVersion at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:407) at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:429) ... Caused by: java.lang.NoClassDefFoundError: org/springframework/core/JdkVersion
It may happen due to the presence of conflicting .jar files in the <confluence-install>/confluence/WEB-INF/lib directory that are not bundled with Confluence on a fresh installation.
The aforementioned error was caused by the presence of spring-jdbc-2.5.6.SEC03.jar in the <confluence-install>/confluence/WEB-INF/lib directory. This file doesn't exist on a fresh installation of Confluence.
Compare the existing installation folder with another, same version, that you can get in Confluence Download Archives. Confirm if any .jar file was added and move it to another location. Then, try restarting the Confluence service and check if the upgrade completes as expected.