Skip to main content

Command Palette

Search for a command to run...

DBeaver / Snowflake - JDBC driver internal error

Fail to retrieve row count for first arrow chunk: sun.misc.Unsafe or java.nio.DirectByteBuffer.<init

Updated
1 min read

When attempting to run any query or list the database objects of Snowflake within DBeaver I received the following error message:

JDBC driver internal error: Fail to retrieve row count for first arrow chunk: sun.misc.Unsafe or java.nio.DirectByteBuffer.(long, int) not available.

It wasn't clear to me what specific concept has changed. However there was an article on stack overflow (link) that let me down this path

Open your snowflake connection configuration (Right Click on it / "Edit Configuration")

  1. Navigate to Initialization

  2. Click "Configure" under Bootstrap Queries

  1. Click "Add"

  2. Add the following query:

ALTER SESSION SET JDBC_QUERY_RESULT_FORMAT='JSON'

  1. Click "OK" and reconnect