0

I am setting up a Spring-boot application to connect to HP NonStop Tandem's SQL/MX. First I achieved this connection by hard-coding the jdbc parameters like dataSource, URL, etc in the service section of the application and it worked (I was able to access tables by executing query).

Now I am trying to remove the hard coded part and have my database related info in application.properties file, but now I am getting the following error

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

Can someone help me understand the root cause? The same driver jar is being used when hard-coding the datasource details and it worked but not working when having the data source properties in application.properties and needs an upgrade to the jar.

Thulasi
  • 126
  • 3
  • 19

2 Answers2

1

I encountered the same exception when using Spring Data JPA in a Spring Boot application, the JTDS driver and the Hikari connection pool. In my case I discovered that the following fixed the problem:

Examining the class com.zaxxer.hikari.pool.PoolBase, the following can be observed:

this.isUseJdbc4Validation = config.getConnectionTestQuery() == null;

Thus JDBC 4 validation will not be attempted if there is a connection test query configured. In a Spring Boot application, this can be accomplished like this:

spring.datasource.hikari.connection-test-query=select 1;

Regretfully I do not have any experience with the T4SQLMX driver but nevertheless hope this can be of some use.

0

I recently fought through the same issue, for me I was using a JDBC type 3 driver; but my spring implementation only supported a type 4 driver, thus when the method you linked above was attempted to be called, it caused the error.

I suggest you look for a type 4 driver for your particular database and see if that resolves your issue.

rdChris
  • 96
  • 4
  • Thanks for the response! Actually, I am using t4sqlmx driver but it doesn't seem to have the method. Can you please share the version of the t4 driver you are using? I might have to request to our HP team to update the driver. – Thulasi May 12 '19 at 22:28