question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Illegal reflective access. v3.11.0

See original GitHub issue

After an upgrade of snowflake-jdbc from 3.10.3 to 3.11.0 version, started to see the following message when any SQL statement is executed.

WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by net.snowflake.client.jdbc.internal.io.netty.util.internal.ReflectionUtil (file:/<redacted>/.m2/repository/net/snowflake/snowflake-jdbc/3.11.0/snowflake-jdbc-3.11.0.jar) to constructor java.nio.DirectByteBuffer(long,int)

Java version

openjdk version "11.0.4" 2019-07-16 LTS
OpenJDK Runtime Environment Corretto-11.0.4.11.1 (build 11.0.4+11-LTS)
OpenJDK 64-Bit Server VM Corretto-11.0.4.11.1 (build 11.0.4+11-LTS, mixed mode)

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:13 (1 by maintainers)

github_iconTop GitHub Comments

5reactions
vmandrychenkocommented, May 20, 2020

Same warning while connecting to the snowflake database.

Driver: snowflake-jdbc: 3.12.5 OS: Mac OS Mojave: 10.14.6 JDK:

$ java --version
openjdk 11.0.7 2020-04-14
OpenJDK Runtime Environment AdoptOpenJDK (build 11.0.7+10)
Eclipse OpenJ9 VM AdoptOpenJDK (build openj9-0.20.0, JRE 11 Mac OS X amd64-64-Bit Compressed References 20200422_558 (JIT enabled, AOT enabled)
OpenJ9   - 05fa2d361
OMR      - d4365f371
JCL      - 838028fc9d based on jdk-11.0.7+10)

The warning that shows up is:

WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by net.snowflake.client.jdbc.internal.io.netty.util.internal.ReflectionUtil (file:/Users/vm/Library/Caches/Coursier/v1/https/repo1.maven.org/maven2/net/snowflake/snowflake-jdbc/3.12.5/snowflake-jdbc-3.12.5.jar) to constructor java.nio.DirectByteBuffer(long,int)
WARNING: Please consider reporting this to the maintainers of net.snowflake.client.jdbc.internal.io.netty.util.internal.ReflectionUtil
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release

1reaction
mwegitcommented, Apr 10, 2020

Same issue for me

linux version

NAME="Red Hat Enterprise Linux Server"
VERSION="7.7 (Maipo)"
ID="rhel"
ID_LIKE="fedora"
VARIANT="Server"
VARIANT_ID="server"
VERSION_ID="7.7"
PRETTY_NAME="Red Hat Enterprise Linux"
ANSI_COLOR="0;31"
CPE_NAME="cpe:/o:redhat:enterprise_linux:7.7:GA:server"
HOME_URL="https://www.redhat.com/"
BUG_REPORT_URL="https://bugzilla.redhat.com/"

java version

java -version
openjdk version "1.8.0_242"
OpenJDK Runtime Environment (build 1.8.0_242-b08)
OpenJDK 64-Bit Server VM (build 25.242-b08, mixed mode)

flyway Error

2020-04-10T15:42:58.5785361Z Flyway Community Edition 6.2.3 by Redgate
2020-04-10T15:42:59.9366343Z Database: jdbc:snowflake://xxxx.snowflakecomputing.com:443/ (Snowflake 4.11)
2020-04-10T15:43:00.1502475Z WARNING: An illegal reflective access operation has occurred
2020-04-10T15:43:00.1504973Z WARNING: Illegal reflective access by net.snowflake.client.jdbc.internal.io.netty.util.internal.ReflectionUtil (file:/home/xxx/flyway-6.2.3/drivers/snowflake-jdbc-3.12.0.jar) to constructor java.nio.DirectByteBuffer(long,int)
2020-04-10T15:43:00.1506832Z WARNING: Please consider reporting this to the maintainers of net.snowflake.client.jdbc.internal.io.netty.util.internal.ReflectionUtil
2020-04-10T15:43:00.1508173Z WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
2020-04-10T15:43:00.1510410Z WARNING: All illegal access operations will be denied in a future release
2020-04-10T15:43:02.4767945Z Schema version: << Empty Schema >>
Read more comments on GitHub >

github_iconTop Results From Across the Web

An illegal reflective access operation has occurred when ...
An illegal reflective access operation has occurred when using Java 11 with ForgeRock products. Last updated Aug 18, 2022.
Read more >
"illegal reflective access" under Java 9, 10, 11 - Shibboleth
I will test a V3.4 SNAPSHOT against that environment to confirm that the workround can be removed.
Read more >
What is an illegal reflective access? - java - Stack Overflow
What defines an illegal reflective access and what circumstances ... First open String java 11 documentation Class String where you can find ...
Read more >
Illegal reflective access warnings after Confluence startup - Jira
Summary. Illegal reflective access warnings appear in the logs after upgrading to Confluence 7.1 and moving to Java 11. Environment. Confluence 7.1+ ...
Read more >
Illegal reflective access with createFromXmlResource()
java 11.0.11 2021-04-20 LTS Java(TM) SE Runtime Environment 18.9 (build 11.0.11+9-LTS-194) ... WARNING: An illegal reflective access operation has occurred
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found