Spring 3 Upgrade H2 Database error. Could not instantiate named strategy class [org.hibernate.dialect.H2Dialect]

Hi,

The following error is thrown when upgraded to Hibernate 6.x, H2 DB version 2.2.224

LogLevel="WARN" txnId="" "ThreadId="main" loggerName="o.h.e.j.e.i.JdbcEnvironmentInitiator" - HHH000342: Could not obtain connection to query metadata
org.hibernate.boot.registry.selector.spi.StrategySelectionException: Could not instantiate named strategy class [org.hibernate.dialect.H2Dialect]
.....

Caused by: java.lang.NumberFormatException: For input string: "19c"
	at java.lang.NumberFormatException.forInputString(NumberFormatException.java:67) ~[?:?]
	at java.lang.Integer.parseInt(Integer.java:668) ~[?:?]
	at java.lang.Integer.parseInt(Integer.java:786) ~[?:?]
	at org.hibernate.dialect.H2Dialect.parseBuildId(H2Dialect.java:168) ~[hibernate-core-6.5.2.Final.jar:6.5.2.Final]
	at org.hibernate.dialect.H2Dialect.parseVersion(H2Dialect.java:156) ~[hibernate-core-6.5.2.Final.jar:6.5.2.Final]
	at org.hibernate.dialect.H2Dialect.<init>(H2Dialect.java:128) ~[hibernate-core-6.5.2.Final.jar:6.5.2.Final]

Looks like you’re setting an explicit database version that is simply wrong or you are connecting to the wrong database with the H2Dialect.

@beikov Correct, I debugged and found it is connecting to Oracle Database version 19c. This issue is occurring after I upgrade to Spring 3, hibernate 6. I am trying to figure out how to override the config properties with test properties from resource file. Any how, thanks for the reply.