Snowflake JDBC error when using Java 21

0
I have two projects using snowflake jdbc and the Database connector. Both connect to the same db and run the same query. One is using Java 11 and the other Java 21. The latter is giving me this error   com.mendix.webui.WebUIException: Exception while executing runtime operation    at com.mendix.webui.actions.client.RuntimeOperationAction.apply(RuntimeOperationAction.scala:72) Caused by: com.mendix.modules.microflowengine.MicroflowException: com.mendix.systemwideinterfaces.MendixRuntimeException: net.snowflake.client.jdbc.SnowflakeSQLLoggedException: JDBC driver internal error: Fail to retrieve row count for first arrow chunk: null.    at MyFirstModule.MF_Snowflake_Projects (JavaAction : 'Execute parameterized query') Advanced stacktrace:    at com.mendix.modules.microflowengine.MicroflowUtil$.processException(MicroflowUtil.scala:73) Caused by: com.mendix.core.CoreRuntimeException: com.mendix.systemwideinterfaces.MendixRuntimeException: net.snowflake.client.jdbc.SnowflakeSQLLoggedException: JDBC driver internal error: Fail to retrieve row count for first arrow chunk: null.    at com.mendix.basis.actionmanagement.ActionManager.executeSync(ActionManager.scala:109) Caused by: com.mendix.systemwideinterfaces.MendixRuntimeException: net.snowflake.client.jdbc.SnowflakeSQLLoggedException: JDBC driver internal error: Fail to retrieve row count for first arrow chunk: null.    at com.mendix.util.classloading.Runner$.withContextClassLoader(Runner.scala:23) Caused by: net.snowflake.client.jdbc.SnowflakeSQLLoggedException: JDBC driver internal error: Fail to retrieve row count for first arrow chunk: null.   I was getting a different error previously and someone suggested in the serve rsettings to add the following in the extra JVM params: "--add-opens=java.base/java.nio=ALL-UNNAMED"   I did this and the first error disappeared and now I'm getting this above error.    Does anyone know why Java 21 doesn't work with the Snowflake JDBC driver?
asked
2 answers
0

FYI I updated to the latest JDBC version and the problem was solved

answered
0

Hi Brian Lorraine,

 

If I understand correctly, connecting to Snowflake with JDBC using Java 21 isn’t working.

If that’s the case, try upgrading your Snowflake JDBC driver to version 3.17.0 or higher, as Snowflake added support for Java 21 starting with this version.

 

Here’s a screenshot where to update the version in the EDC External Database Connector.

Update the artifact version

 

Hope this helps.

 

answered