Confluence fails to start up after replacing or editing web.xml file

Still need help?

The Atlassian Community is here for you.

Ask the community

Platform notice: Server and Data Center only. This article only applies to Atlassian products on the Server and Data Center platforms.

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

   

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

After replacing the default web.xml file in <Confluence-install>/confluence/WEB-INF, or editing it to add or modify a filter, Confluence fails to start up. The Tomcat logs in <Confluence-install>/logs/catalina.out show the following:

24-Mar-2020 23:51:18.902 SEVERE [Catalina-utility-1] org.apache.catalina.core.StandardContext.startInternal One or more Filters failed to start. Full details will be found in the appropriate container log file
24-Mar-2020 23:51:18.912 SEVERE [Catalina-utility-1] org.apache.catalina.core.StandardContext.startInternal Context [] startup failed due to previous errors

Environment

All versions

Diagnosis

You can tell that the startup issue is caused by an incompatible filter in web.xml due to the following types of error in <Confluence-home>/logs/atlassian-confluence.log:

2020-03-25 11:49:35,038 ERROR [Catalina-utility-1] [ContainerBase.[Standalone].[localhost].[/]] log Exception starting filter [holding-until-started-filter]
	java.lang.ClassNotFoundException: com.atlassian.confluence.impl.servlet.HoldingUntilStartedFilter
		at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1365)
		at org.apache.catalina.loader.WebappClassLoaderBase.loadClass(WebappClassLoaderBase.java:1188)
		at org.apache.catalina.core.DefaultInstanceManager.loadClass(DefaultInstanceManager.java:540)
		at org.apache.catalina.core.DefaultInstanceManager.loadClassMaybePrivileged(DefaultInstanceManager.java:521)
		at org.apache.catalina.core.DefaultInstanceManager.newInstance(DefaultInstanceManager.java:150)
		at org.apache.catalina.core.ApplicationFilterConfig.getFilter(ApplicationFilterConfig.java:249)
		at org.apache.catalina.core.ApplicationFilterConfig.<init>(ApplicationFilterConfig.java:102)
		at org.apache.catalina.core.StandardContext.filterStart(StandardContext.java:4533)
		at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5172)
		at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
		at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1384)
		at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1374)
		at java.util.concurrent.FutureTask.run(FutureTask.java:266)
		at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180)
		at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)
		at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
		at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
		at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
		at java.lang.Thread.run(Thread.java:748)
2020-03-25 11:49:35,058 FATAL [Catalina-utility-1] [atlassian.spring.container.SpringContainerContext] getComponent Spring Application context has not been set

Different classes may be affected by this, such as:

java.lang.ClassNotFoundException: com.atlassian.johnson.context.JohnsonContextListener
java.lang.ClassNotFoundException: com.atlassian.confluence.setup.ConfluenceConfigurationListener
java.lang.ClassNotFoundException: com.atlassian.confluence.setup.ConfluenceBootstrappedContextLoaderListener
java.lang.ClassNotFoundException: com.atlassian.confluence.setup.ValidLicenseContextListener

Cause

An incompatible filter was likely added to web.xml, or a web.xml file from an older version of Confluence was copied to a newer Confluence version.

Solution

Replace <Confluence-installation>/confluence/WEB-INF/web.xml with the default web.xml file from a fresh Confluence install of the same version, or remove any customizations that were recently added to the file, and restart.

If you also recently upgraded Confluence, ensure the web.xml file located in these 2 locations were not accidentally swapped post-upgrade:

  • <Confluence-installation>/confluence/WEB-INF/web.xml
  • <Confluence-installation>/conf/web.xml

Last modified on Oct 29, 2021

Was this helpful?

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