Either you are very confused about how Java works or there's a lot of missing information here.
You are attempting to execute a WAR file via the stand-alone Java "-jar" option. WAR files are designed to be handled by a web application container, not run stand-alone.
Furthermore, any application complex enough to need a
JDBC driver requires extra build options. Because that ups the module count from one (executable JAR) to at least 2, unless you unpack the JDBC driver jar and pour its contents into the application JAR (which isn't recommended).
As a final note, a true WAR shouldn't be directly requesting database connections at all. Because the application container's JDBC Connection Pool resources can usually do the job more efficiently.
Is this question related to the one you asked in the
Tomcat forum (
https://coderanch.com/t/667059/Tomcat/Migration-java-tomcat-postgre-ubuntu ?)
The secret of how to be miserable is to constantly expect things are going to happen the way that they are "supposed" to happen.
You can have faith, which carries the understanding that you may be disappointed. Then there's being a willfully-blind idiot, which virtually guarantees it.