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

Illegal reflective access. v3.11.0 #202

Closed
vitaliislobodianyk-okta opened this issue Dec 17, 2019 · 13 comments
Closed

Illegal reflective access. v3.11.0 #202

vitaliislobodianyk-okta opened this issue Dec 17, 2019 · 13 comments

Comments

@vitaliislobodianyk-okta

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)
@eduardompinto
Copy link

Also having this issue

openjdk version "1.8.0_232"
OpenJDK Runtime Environment (Zulu 8.42.0.23-CA-macosx) (build 1.8.0_232-b18)
OpenJDK 64-Bit Server VM (Zulu 8.42.0.23-CA-macosx) (build 25.232-b18, mixed mode)

@jeffersonatsafe
Copy link

jeffersonatsafe commented Feb 4, 2020

still having this issue in jdbc driver version: 3.11.1

Ubuntu 18.04 x64
openjdk version "11.0.6" 2020-01-14
OpenJDK Runtime Environment (build 11.0.6+10-post-Ubuntu-1ubuntu118.04.1)
OpenJDK 64-Bit Server VM (build 11.0.6+10-post-Ubuntu-1ubuntu118.04.1, mixed mode, sharing)

edit: I've also tried this on Windows 10, running openjdk-11.28, and the same message showed up.

WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by net.snowflake.client.jdbc.internal.io.netty.util.internal.ReflectionUtil (file:/C:/Users/jpoernomo/.m2/repository/net/snowflake/snowflake-jdbc/3.11.1/snowflake-jdbc-3.11.1.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

@ghost
Copy link

ghost commented Mar 4, 2020

same here, Flyway 6.2.4 + jdbc 3.11.1

@sfc-gh-stakeda
Copy link
Contributor

Added to the backlog.

@mwegit
Copy link

mwegit commented 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 >>

@mrn3
Copy link

mrn3 commented May 11, 2020

I have seen this issue as well, although it is just a warning so allows me to proceed. This isn't blocking anyone is it?

@vmandrychenko
Copy link

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

@viddev1
Copy link

viddev1 commented Aug 21, 2020

I am also receiving this warning, Was there any resolution for this?
image
Driver Dependency:
image

@qqcvd
Copy link

qqcvd commented Nov 30, 2020

I have the same issue.

@alexbegg
Copy link

alexbegg commented Jan 5, 2021

I also have a similar issue with snowflake-jdbc version 3.12.0 and Flyway version 7.3.2, however in my case it is illegal reflective access by net.snowflake.client.jdbc.internal.org.bouncycastle.jcajce.provider.drbg.DRBG to constructor sun.security.provider.Sun() instead of by net.snowflake.client.jdbc.internal.io.netty.util.internal.ReflectionUtil to constructor java.nio.DirectByteBuffer(long,int). Here is my warning:

WARNING: Illegal reflective access by net.snowflake.client.jdbc.internal.org.bouncycastle.jcajce.provider.drbg.DRBG (file:/usr/local/Cellar/flyway/7.3.2/libexec/drivers/snowflake-jdbc-3.12.0.jar) to constructor sun.security.provider.Sun()

It seems that the bouncycastle maintainers fixed that issue in 2019, sosnowflake-jdbc might be using an outdated version of bouncycastle... bcgit/bc-java#510

@imrjk
Copy link

imrjk commented Mar 8, 2021

Hi all
is this issue resolved yet?

i'm also getting the similar issue.

WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by net.snowflake.client.jdbc.internal.io.netty.util.internal.ReflectionUtil (jar:file:/appBase/app.jar!/BOOT-INF/lib/snowflake-jdbc-3.11.0.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

Java version : 11.0.7
snowflake jdbc version : 3.11.0

girimathi added a commit to girimathi/docker that referenced this issue Mar 23, 2021
The older version of the snowflake-jdbc-3.12.3 driver version introduced the Illegal reflective access mentioned in this issue# snowflakedb/snowflake-jdbc#202. The updated snowflake-jdbc-3.13.1.jar version fixing the issue as tested in our environment.
@shaounak
Copy link

Using Java 14 and the latest version of the driver, this is still giving the issue -

openjdk 14.0.2 2020-07-14
OpenJDK Runtime Environment (build 14.0.2+12-Ubuntu-120.04)
OpenJDK 64-Bit Server VM (build 14.0.2+12-Ubuntu-120.04, mixed mode, sharing)

SNOWFLAKE_VERSION=3.13.3

@vitaliislobodianyk-okta
Copy link
Author

This issue is fixed in 3.13.3 version of the driver.
Tested with Java 11 and Java 15.

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

No branches or pull requests