snowflakedb / snowflake-jdbc

Snowflake JDBC Driver
Apache License 2.0
173 stars 161 forks source link

Simple select command fails when using SQL Workbench/J with JDBC driver #1117

Closed pjm4github closed 1 year ago

pjm4github commented 2 years ago

I don't know where to begin to debug this. This is running on Windows 10 box

An error occurred when executing the SQL command: -- @WbResult MYTABLE SELECT * FROM MYDB.MYSCHEMA.MYTABLE limit 10

JDBC driver internal error: exception creating result java.lang.NoClassDefFoundError: Could not initialize class net.snowflake.client.jdbc.internal.apache.arrow.memory.RootAllocator at net.snowflake.client.jdbc.SnowflakeResultSetSerializableV1.create(SnowflakeResultSetSerializableV1.java:577). [SQL State=XX000, DB Errorcode=200001] 1 statement failed.

Execution time: 0.22s

Log file shows this setup:

2022-08-04 15:11:27 INFO Setting default locale to: en 2022-08-04 15:11:27 INFO Starting SQL Workbench/J, Build 128 (2021-11-01 17:46) 2022-08-04 15:11:27 INFO Java version=18.0.2, java.home=C:\Users\xxxxx\AppData\Local\Java, vendor=Oracle Corporation, name=Java HotSpot(TM) 64-Bit Server VM 2022-08-04 15:11:27 INFO Operating System=Windows 10, version=10.0, platform=amd64 2022-08-04 15:11:27 INFO Available memory: 23360MB

wise-coders commented 1 year ago

I get also this error, with simple queries like:

SELECT table_name, view_definition FROM TEST.INFORMATION_SCHEMA.views WHERE table_schema='${schema}'

net.snowflake.client.jdbc.SnowflakeSQLException: JDBC driver internal error: exception creating result java.lang.NoClassDefFoundError: Could not initialize class net.snowflake.client.jdbc.internal.apache.arrow.memory.RootAllocator . I am using the driver version 3.13.25

BDeus commented 1 year ago

The Snowflake JDBC driver is not ready to work as is with Java >= 17 see https://github.com/snowflakedb/snowflake-jdbc/issues/589. I have a workaround with setting JDBC_QUERY_RESULT_FORMAT = JSON in extended properties

sfc-gh-igarish commented 1 year ago

Please track by other similar issue.

sfc-gh-igarish commented 1 year ago

To clean up and re-prioritize more pressing bugs and feature requests we are closing all issues older than 6 months as of March 1, 2023. If there are any issues or feature requests that you would like us to address, please create them according to the new templates we have created. For urgent issues, opening a support case with this link Snowflake Community is the fastest way to get a response.