Confluence won't start due to error could not find the main class program will exit because of a syntax problem in Setenv file
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
Symptoms
Confluence fails to start.
The following appears in the catalina.log
:
1
2
3
Could not find the main class: Xms256m. Program will exit.
Exception in thread "main" java.lang.NoClassDefFoundError: Xms256m
Caused by: java.lang.ClassNotFoundException: Xms256m
Cause
Confluence fails to start due to some incorrect parameters in tomcat configuration files such as setenv.sh or bat file.
In the message above we can see the part where the Xms256m is stated. This part can be different depending on the incorrect syntax.
Resolution
Open the setenv.sh or bat file (depending on the OS) and check for syntax errors. In the case above, the problem was a missing dash ( - ) in front of the Xms256m word. Compare the file with a standard one if necessary.
Was this helpful?