0
votes

My project uses NonStop SQL (SQL/MX 3.4) as our RDBMS, a product from HP. I am not able to connect to the data source using Spring Boot's standard practice of defining JDBC URL, user, password inside application.properties file.

application.properties

spring.datasource.driverClassName = com.tandem.t4jdbc.SQLMXDriver

spring.datasource.url = jdbc:T4SQLMX://url

spring.datasource.username = user

spring.datasource.password = password

spring.datasource.validationQuery=show tables;

This is the error

com.zaxxer.hikari.pool.PoolBase : HikariPool-1 - Failed to execute isValid() for connection, configure connection test query (Method com/tandem/t4jdbc/SQLMXConnection.isValid(I)Z is abstract). o.s.b.a.orm.jpa.DatabaseLookup : Unable to determine jdbc url from datasource

org.springframework.jdbc.support.MetaDataAccessException: JDBC DatabaseMetaData method not implemented by JDBC driver - upgrade your driver; nested exception is java.lang.AbstractMethodError: Method com/tandem/t4jdbc/SQLMXConnection.isValid(I)Z is abstract

1

1 Answers

0
votes

The issue seems that the Java driver for NonStop SQL does not implement the isValid method for validating the connection, something like a simple SELECT 1 FROM DUAL in Oracle DB.

In order for spring to skip calling the isValid method on the connection, provide a custom validationQuery parameter with a simple query that can be used to check connection to the database.

For example:

spring.datasource.validationQuery=SELECT 1

Please replace the query above with the one applicable for your database.