Why is my JDBC connection throwing a "method not supported" error?

Issue

I get the error java.sql.SQLException: JDBC4 Connection.isValid() method not supported, connection test query must be configured

Resolution

This can be caused by two things: the first is an out of date Postgresql Driver. Make sure you are using version 42.2.1 or later.

Another cause is a malformed JDBC URL. HikiariCP, which throws this error, requires a URL in the format jdbc:[vendor]://..... Make sure you are using the JDBC_DATABASE_URL instead of DATABASE_URL.

Ask on Stack Overflow

Engage with a community of passionate experts to get the answers you need

Ask on Stack Overflow

Heroku Support

Create a support ticket and our support experts will get back to you

Contact Heroku Support