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 operation warning with Java 9 #986

Closed
vbezhenar opened this Issue Oct 10, 2017 · 13 comments

Comments

Projects
None yet
@vbezhenar

vbezhenar commented Oct 10, 2017

Here's warning from Java 9:

WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by org.postgresql.jdbc.TimestampUtils (file:.../postgresql-42.1.4.jar) to field java.util.TimeZone.defaultTimeZone
WARNING: Please consider reporting this to the maintainers of org.postgresql.jdbc.TimestampUtils
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

I think it's self-explaining. Seems to be related here.

@davecramer

This comment has been minimized.

Member

davecramer commented Oct 10, 2017

Ya, we've already made note of this. I even believe there is a PR around ?

@vlsi

This comment has been minimized.

@davecramer

This comment has been minimized.

Member

davecramer commented Oct 10, 2017

How many versions will this work for ? Will this stop working in java 10 ?

@jorsol

This comment has been minimized.

Contributor

jorsol commented Oct 10, 2017

Hiding the warning is just ignoring the problem, sooner or later it would require a proper fix.

How much this "fast path to getting the default timezone" buys? It looks that the Field is cached, so I'm not sure that this really makes any difference in real world.

@bokken

This comment has been minimized.

Member

bokken commented Oct 14, 2017

Is this the same as #919?

@javajosh

This comment has been minimized.

javajosh commented Oct 31, 2017

Hey guys, running into this as well. I'd rather not see a work around as @vlsi mentioned, and actually fix the problem. @davecramer I looked for a PR and didn't see one; were you able to find it?

vlsi added a commit to vlsi/pgjdbc that referenced this issue Oct 31, 2017

vlsi added a commit to vlsi/pgjdbc that referenced this issue Nov 27, 2017

vlsi added a commit to vlsi/pgjdbc that referenced this issue Nov 27, 2017

vlsi added a commit to vlsi/pgjdbc that referenced this issue Nov 27, 2017

@vlsi vlsi closed this in #1002 Nov 28, 2017

vlsi added a commit that referenced this issue Nov 28, 2017

@Dave3o3

This comment has been minimized.

Dave3o3 commented Dec 8, 2017

Is this already merged into 42.1.4? Because I still get the error with this driver.

@davecramer

This comment has been minimized.

Member

davecramer commented Dec 8, 2017

No, this has not been released yet

@peterlindstrom234

This comment has been minimized.

peterlindstrom234 commented Jan 12, 2018

Is there an estimated release date for this?

@danielcompton

This comment has been minimized.

danielcompton commented Apr 16, 2018

In Java 10 the code still prints the same warning, it doesn't deny access yet.

@sanjmeh

This comment has been minimized.

sanjmeh commented Jul 26, 2018

The fix is not clear to me. I am getting a similar error on Java 10. On running R code:
> read.xlsx("fielname.xlsx","sheetname")

WARNING: Illegal reflective access by org.apache.poi.util.SAXHelper (file:/Library/Frameworks/R.framework/Versions/3.5/Resources/library/xlsxjars/java/poi-ooxml-3.10.1-20140818.jar) to method com.sun.org.apache.xerces.internal.util.SecurityManager.setEntityExpansionLimit(int)
WARNING: Please consider reporting this to the maintainers of org.apache.poi.util.SAXHelper
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

I still get the output as desired. Is it safe to ignore these set of warnings? I cannot make anything out of these?

@vlsi

This comment has been minimized.

Member

vlsi commented Jul 26, 2018

@sanjmeh , your message is related to https://bz.apache.org/bugzilla/show_bug.cgi?id=61564 which is a bugfix in Apache POI library (the one that deals with xlsx files)

The bug page says:

Fixed for trunk/4.0, no easy fix possible for 3.17/Java 6

You have a couple of options:
a) ignore the warning, the soft will just work in Java 10
b) upgrade Apache POI library to 4.0, however it has not been released yet: https://poi.apache.org/download.html

@Vinai

This comment has been minimized.

Vinai commented Oct 29, 2018

Apacje POI 4.0 is now available since 7. September.

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