Starting with Java 16, JVx running on an application server like Tomcat, requires some additional settings.

Optional

This is relevant for resource unlocking, but not necessary if you restart the application server after every deployment.

--add-opens=java.desktop/javax.imageio=ALL-UNNAMED