If the issue is with the tomcat running as a Windows Service, following can be done:
Go to Start > Programs > Apache Tomcat > Configure Tomcat (Run as administrator)
In Windows 11, type Configure Tomcat on search, then select Run as administrator Following window will be displayed(mine is Tomcat 9)
Then select the Java tab and go to Java 9 Options
Add the required lines to list of options. For me added following two:
--add-opens=java.base/java.util=ALL-UNNAMED
--add-opens=java.base/java.util.concurrent=ALL-UNNAMED
The resulted screen will be similar to following:
Click Apply and Ok, then restart the Tomcat service from System services list or from Task Manager.


