Tomcat or Confluence logs are throwing java.lang.ClassNotFoundException or java.lang.NoClassDefFoundError errors

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

Summary

There are 'java.lang.ClassNotFoundException' errors on the Confluence logs referring to missing classes, for example:

1 2 3 4 5 6 26-Aug-2020 08:38:15.069 SEVERE [http-nio-80-exec-3] org.apache.catalina.core.StandardWrapperValve.invoke Servlet.service() for servlet [dispatcher] in context with path [/synchrony-proxy] threw exception [Filter execution threw an exception] with root cause java.lang.ClassNotFoundException: org.apache.commons.lang3.StringUtils 26-Aug-2020 08:38:30.522 SEVERE [http-nio-80-exec-5] org.apache.catalina.core.StandardWrapperValve.invoke Servlet.service() for servlet [dispatcher] in context with path [/synchrony-proxy] threw exception [Filter execution threw an exception] with root cause java.lang.NoClassDefFoundError: org/apache/commons/lang3/StringUtils

The actual message on the logs may be different, depending on the specific class that is missing.

Confluence's functionality may also be affected in various ways, as a missing class could cause problems with specific aspects of the application.

Environment

Confluence Server or Data Center (any version).

Diagnosis

If the missing class is part of Confluence's core functionalities, it will be provided by a bundled JAR file that's included inside the application's Installation Directory.

As such, the cause of this error would be due to a missing JAR file, inside the current installation directory. To check this:

  1. Download the same version of Confluence that is currently installed, from the Download Archives page

    1. Choose the Standalone (zip or tar.gz version)

  2. Extract the downloaded file

  3. Compare the contents of both directories, to check for any differences between the default installation directory that was downloaded, and the current installation directory being used:

    1. On Linux, you can use the diff command, for example:

      1 diff -qr current_install_directory downloaded_install_directory | sort
  4. Look for any .jar files that are present on the downloaded (default) installation directory, but not on the current installation directory

Cause

The missing .jar file (or files) is the cause of the issue, as Confluence will attempt to load classes that are not present on the files inside its installation directory.

Solution

  1. Stop Confluence

  2. Copy any identified .jar files that are missing, from the downloaded installation directory to the same location inside the current installation directory

  3. Start Confluence, so it can load the missing files upon startup

Updated on March 17, 2025

Still need help?

The Atlassian Community is here for you.