Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SNOW-938463: Java.nio.DirectByteBuffer.<init>(long, int) not available in Java 21, need to update Apache Arrow #1528

Closed
Komdosh opened this issue Oct 12, 2023 · 1 comment
Assignees

Comments

@Komdosh
Copy link
Contributor

Komdosh commented Oct 12, 2023

Please answer these questions before submitting your issue.
In order to accurately debug the issue this information is required. Thanks!

  1. What version of JDBC driver are you using?
    3.14.2

  2. What operating system and processor architecture are you using?
    MacOS 14, M1Max

  3. What version of Java are you using?
    21

  4. What did you do?

Just call a query with arrow.
After call I got this error:

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

The problem is mentioned here: https://issues.apache.org/jira/browse/SPARK-42369

In the latest JDK, the constructor DirectByteBuffer(long, int) was replaced with DirectByteBuffer(long, long).
it look like you need to update apache arrow.

It was already fixed here: apache/arrow@bea7a34

  1. What did you expect to see?

Call will execute normally

  1. Can you set logging to DEBUG and collect the logs?

    https://community.snowflake.com/s/article/How-to-generate-log-file-on-Snowflake-connectors

  2. What is your Snowflake account identifier, if any? (Optional)

@Komdosh Komdosh added the bug label Oct 12, 2023
@github-actions github-actions bot changed the title Java.nio.DirectByteBuffer.<init>(long, int) not available in Java 21, need to update Apache Arrow SNOW-938463: Java.nio.DirectByteBuffer.<init>(long, int) not available in Java 21, need to update Apache Arrow Oct 12, 2023
@sfc-gh-wfateem sfc-gh-wfateem self-assigned this Oct 12, 2023
@sfc-gh-wfateem
Copy link
Collaborator

Hi @Komdosh,

Thanks for reporting this. We're already looking into this because it was reported earlier here #1512.
There's already a PR to address issue #1529 but it needs a bit of ironing out and further testing because we would need to make a leap in the Arrow library version (10.0 -> 13.0). That would also require updates in other dependencies.

I'll go ahead and close this off as a duplicate for now, feel free to reply back if you have any concerns..

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants