Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Could not find or load main class error when starting Confluence 8.0.3 after upgrade

Andre January 28, 2023

Upgraded Confluence from 7.19 to 8.0.3 and getting this in catalina.out as soon as I start the application

Error: Could not find or load main class @.opt.atlassian.apps.confluence.current.confluence.WEB-INF.jpms-args.txt


Confluence does not start after that. Any ideas what could be the cause of this?


Here's more info that I could think of:


[atlassian@ip-172-31-12-42 logs]$ cat catalina.out 
Error: Could not find or load main class @.opt.atlassian.apps.confluence.current.confluence.WEB-INF.jpms-args.txt
Error: Could not find or load main class @.opt.atlassian.apps.confluence.current.confluence.WEB-INF.jpms-args.txt
Error: Could not find or load main class @.opt.atlassian.apps.confluence.current.confluence.WEB-INF.jpms-args.txt
[atlassian@ip-172-31-12-42 logs]$ ll /opt/atlassian/apps/confluence/current/confluence/WEB-INF/
total 120
drwxr-xr-x 2 atlassian atlassian 24576 Jan 26 08:59 atlassian-bundled-plugins
drwxr-xr-x 2 atlassian atlassian 4096 Jan 26 08:59 atlassian-bundled-plugins-setup
drwxr-xr-x 3 atlassian atlassian 4096 Jan 26 09:08 classes
-rw-r--r-- 1 atlassian atlassian 6971 Jan 25 09:22 decorators.xml
-rw-r--r-- 1 atlassian atlassian 15163 Jan 25 09:22 glue-config.xml
-rw-r--r-- 1 atlassian atlassian 928 Jan 25 09:22 jpms-args.txt
drwxr-xr-x 2 atlassian atlassian 32768 Jan 26 08:59 lib
drwxr-xr-x 2 atlassian atlassian 4096 Jan 26 08:59 osgi-framework-bundles
drwxr-xr-x 2 atlassian atlassian 76 Jan 26 08:59 packages
-rw-r--r-- 1 atlassian atlassian 1968 Jan 25 09:22 server-config.wsdd
-rw-r--r-- 1 atlassian atlassian 1301 Jan 25 09:22 sitemesh.xml
-rw-r--r-- 1 atlassian atlassian 965 Jan 25 09:22 urlrewrite.xml
-rw-r--r-- 1 atlassian atlassian 1688 Jan 25 09:22 web.xml
[atlassian@ip-172-31-12-42 logs]$ cat /opt/atlassian/apps/confluence/current/confluence/WEB-INF/jpms-args.txt
# Add various JPMS arguments to allow Confluence to work on Java 17.
# These also work with Java 11, but are optional.
--add-opens java.base/java.lang=ALL-UNNAMED
--add-opens java.base/
--add-opens java.base/
--add-opens java.base/java.util=ALL-UNNAMED
--add-opens java.base/java.util.concurrent.atomic=ALL-UNNAMED
--add-opens java.base/
--add-opens java.base/
--add-opens java.base/
--add-opens java.base/sun.util.locale=ALL-UNNAMED
--add-exports java.base/
--add-exports java.naming/com.sun.jndi.ldap=ALL-UNNAMED
--add-exports java.xml/
--add-exports java.desktop/sun.font=ALL-UNNAMED
--add-exports java.base/


4 answers

1 accepted

1 vote
Answer accepted
Andre January 28, 2023

Here's the picture of me remembering that supported platforms page is supposed to be read BEFORE the upgrade and not AFTER you upgrade and Confluence doesn't start for some reason.


giphy (1).gif 


Here's my Confluence after I've upgraded Java from 8 to 17:



Now, how embarrassing it'll be to accept my own answer? ;) 

Olga Svyryd
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
July 21, 2023

Hi! Thanks a lot for leaving it here. You have just rescued my day))

1 vote
Tom Dickson May 9, 2023

This can also happen if you edited server.xml and made it mad by leaving -- inside a comment - running manually will show you what it is unhappy about.

1 vote
Andre January 28, 2023

The only files that were modified during the upgrade are server.xml (for https reverse proxy) and to point to the data directory

serge calderara
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
February 9, 2023

@Andre did you find your solution, I have exactly the same problem

Thanks for our help

Andre February 9, 2023

yes, I had non-supported Java version

0 votes
sireesha pavalla December 18, 2023

@Andre  how did you fix the issue.?


i'm also getting same error and my confluence java version is 11 which is compatible.

Suggest an answer

Log in or Sign up to answer
AUG Leaders

Atlassian Community Events