Confluence not starting with the error ClassNotFoundException
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
Summary
Confluence fails to start with a ClassNotFoundException.
The following appears in the catalina.out log file:
Error: Could not find or load main class type
Caused by: java.lang.ClassNotFoundException: type
Cause
This is generally caused by missing opening or closing tags ( "<" or ">") in place in the <Confluence Install Directory>/conf/server.xml file.
Example:
The closing tag ">" is missing at the end of the In below connector definition:
<Connector port="8090" connectionTimeout="20000" redirectPort="8443"
maxThreads="48" maxPostSize="16777216" minSpareThreads="10"
enableLookups="false" acceptCount="10" URIEncoding="UTF-8"
protocol="org.apache.coyote.http11.Http11NioProtocol"
scheme="https" secure="true" proxyName="test.test.com" proxyPort="443"/
The missing closing tag ">" will cause ClassNotFoundException. Therefore we need to add ">" like below:
<Connector port="8090" connectionTimeout="20000" redirectPort="8443"
maxThreads="48" maxPostSize="16777216" minSpareThreads="10"
enableLookups="false" acceptCount="10" URIEncoding="UTF-8"
protocol="org.apache.coyote.http11.Http11NioProtocol"
scheme="https" secure="true" proxyName="test.test.com" proxyPort="443"/>
Solution
Make sure your <Confluence Install Directory>/conf/server.xml file doesn't have any missing opening "<" or closing ">" tags as shown in the above example. Fix the missing tags, save the server.xml file, and start Confluence once again.