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

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

Illegal reflective access operation warning with Java 9 #986

vbezhenar opened this issue Oct 10, 2017 · 13 comments

Comments

@vbezhenar
Copy link

@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
Copy link
Member

@davecramer davecramer commented Oct 10, 2017

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

@davecramer
Copy link
Member

@davecramer davecramer commented Oct 10, 2017

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

@jorsol
Copy link
Member

@jorsol 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
Copy link
Member

@bokken bokken commented Oct 14, 2017

Is this the same as #919?

@javajosh
Copy link

@javajosh 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
closes pgjdbc#986
vlsi added a commit to vlsi/pgjdbc that referenced this issue Nov 27, 2017
closes pgjdbc#986
vlsi added a commit to vlsi/pgjdbc that referenced this issue Nov 27, 2017
closes pgjdbc#986
vlsi added a commit to vlsi/pgjdbc that referenced this issue Nov 27, 2017
closes pgjdbc#986
@vlsi vlsi closed this in #1002 Nov 28, 2017
vlsi added a commit that referenced this issue Nov 28, 2017
…1002)

closes #986
@Dave3o3
Copy link

@Dave3o3 Dave3o3 commented Dec 8, 2017

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

@davecramer
Copy link
Member

@davecramer davecramer commented Dec 8, 2017

No, this has not been released yet

@peterlindstrom234
Copy link

@peterlindstrom234 peterlindstrom234 commented Jan 12, 2018

Is there an estimated release date for this?

@danielcompton
Copy link

@danielcompton danielcompton commented Apr 16, 2018

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

@sanjmeh
Copy link

@sanjmeh 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
Copy link
Member

@vlsi 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
Copy link

@Vinai 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
Labels
None yet
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.