Could not initialize class com.dad.connection.HibernateManager] with root cause java.lang.NoClassDefFoundError: Could not initialize class com.dad.connection.HibernateManager

Our web application hosted/running inside the Apache Tomcat Server 8.0 with JRE 8 stopped the connection to the PostgreqSQL 9.6 version suddenly in the Windows Server 2016 DC. Both Apache Tomcat Web services and PostgreSQL working fine separately in the server but there seems to be configuration or connection string in the web application required to be changed or updated according to the PostgreSQL 9.6 version which recently auto-updated in the Server on 7th January 2023.

Here are the Java related error messages retrieved from the Apache Tomcat Application logs

10-Jan-2023 09:49:56.047 SEVERE [http-apr-80-exec-5] org.apache.catalina.core.StandardWrapperValve.invoke Servlet.service() for servlet [dispatcherservlet] in context with path [/gdp] threw exception [Handler processing failed; nested exception is java.lang.NoClassDefFoundError: Could not initialize class com.dad.connection.HibernateManager] with root cause
java.lang.NoClassDefFoundError: Could not initialize class com.dad.connection.HibernateManager

10-Jan-2023 09:49:56.047 SEVERE [http-apr-80-exec-5] org.apache.catalina.core.ApplicationDispatcher.invoke Servlet.service() for servlet jsp threw exception
java.lang.NoClassDefFoundError: Could not initialize class com.dad.connection.HibernateManager

10-Jan-2023 04:38:33.775 SEVERE [http-apr-80-exec-8] org.apache.catalina.core.StandardWrapperValve.invoke Servlet.service() for servlet [dispatcherservlet] in context with path [/gdp] threw exception [Handler processing failed; nested exception is java.lang.ExceptionInInitializerError] with root cause
org.xml.sax.SAXParseException; lineNumber: 5; columnNumber: 20; Element type “hibernate-mapping” must be declared.

We have no clue on the problem because the code in the application and connections between the Apache Tomcat 8.0/PostgreSQL 9.6/Java 8 which was running from the beginning nearly 8 years.

We have tried most of the possibilities for restoration of website services by implementation of Application versions from lower to higher versions of Apache Tomcat/PostgreSQL/Java but all those efforts only leads us to more time delays and mostly getting hibernate mapping issue or else other problems only.

Assuming there seems to changes on your website/server end which expecting the hibernate mapping DTD declaration’s from the application code connection as mandatory or something else preventing the Apache Tomcat Web Server’s connection to the PostgreSQL database server because of the usage of your DTD in our application

it seems you have one or more hbm.xml mapping files failing the schema validation because missing the <hibernate-mapping> element.

org.xml.sax.SAXParseException; lineNumber: 5; columnNumber: 20; Element type “hibernate-mapping” must be declared.