Error starting Confluence with ClassNotFoundException after upgrading

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

Problem

Confluence fails to start with a ClassNotFoundException after upgrading Confluence and replacing customizations per our Upgrading Confluence guide.

The following appears in the atlassian-confluence.log

1 2 ERROR [localhost-startStop-1] [ContainerBase.[Standalone].[localhost].[/]] log Error configuring application listener of class com.atlassian.confluence.upgrade.UpgradeLauncherServletContextListener java.lang.ClassNotFoundException: com.atlassian.confluence.upgrade.UpgradeLauncherServletContextListener

Note that the actual class specified in the error can be different. In this example the class is "

com.atlassian.confluence.upgrade.UpgradeLauncherServletContextListener"

Cause

This is generally caused by classes referenced in the <Confluence Install Directory>/confluence/WEB-INF/web.xml file that are copied over from a previous installation of Confluence.

Workaround

In order to workaround the issue, edit the <Confluence Install Directory>/confluence/WEB-INF/web.xml and comment out the offending class.

  • Take a backup of you <Confluence Install Directory>/confluence/WEB-INF/web.xml.

  • Open the file in a text editor and search for the offending class referenced in the error: in our example the class is "com.atlassian.confluence.upgrade.UpgradeLauncherServletContextListener"

  • Comment out the class and save the file. In our example we comment out the following:

    1 2 3 4 5 <!-- <listener> <listener-class>com.atlassian.confluence.upgrade.UpgradeLauncherServletContextListener</listener-class> </listener> -->
  • Start Confluence

Updated on April 8, 2025

Still need help?

The Atlassian Community is here for you.