Description: Could not obtain connection to query metadata. We can see this error when adding hibernate log4j debug.
Symptoms: WARN [] [] [] [org.hibernate.cfg.SettingsFactory] [] - Could not obtain connection to query metadata java.sql.SQLException: ORA-01017: invalid username/password; logon denied
Cause: During hibernate initialization,hibernate tries to get the JDBC metadata to determine certain Settings default values. To get this data, hibernate creates a connection using the username and password given in hibernate properties. In OMS, we do not set these properties since we use tomcat jdbc pool as data source and provide this to hibernate. The hibernate class that has the behavior, chooses to catch the exception and simply log it.