You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@lucene.apache.org by "Uwe Schindler (Jira)" <ji...@apache.org> on 2020/12/28 11:27:00 UTC

[jira] [Created] (LUCENE-9650) Errorprone on master/gradle no longer works with JDK-16

Uwe Schindler created LUCENE-9650:
-------------------------------------

             Summary: Errorprone on master/gradle no longer works with JDK-16
                 Key: LUCENE-9650
                 URL: https://issues.apache.org/jira/browse/LUCENE-9650
             Project: Lucene - Core
          Issue Type: Bug
          Components: general/build
    Affects Versions: master (9.0)
            Reporter: Uwe Schindler


JDK-16 no longer allows access to internal classes of any module by default. It looks like errorprone tries to access some internals from the Java compiler. This now fails with Exception. You have to fully open the module or pass `--illegal-access=allow`.

We have 3 options:
- install an update of errorprone
- disable error-prone if we detect a runtimeJdk with version >=16
- run javac as a separate forked task (i think we do already) and pass `--illegal-access=allow` or open the internal compile module.

Error message:
{noformat}
> Task :solr:solr-ref-guide:compileJava FAILED
Exception in thread "main" java.lang.IllegalAccessError: class com.google.errorprone.ErrorProneJavacPlugin (in unnamed module @0x887af79) cannot access class com.sun.tools.javac.api.BasicJavacTask (in module jdk.compiler) because module jdk.compiler does not export com.sun.tools.javac.api to unnamed module @0x887af79
	at com.google.errorprone.ErrorProneJavacPlugin.init(ErrorProneJavacPlugin.java:38)
	at jdk.compiler/com.sun.tools.javac.api.BasicJavacTask.initPlugin(BasicJavacTask.java:254)
	at jdk.compiler/com.sun.tools.javac.api.BasicJavacTask.initPlugins(BasicJavacTask.java:228)
	at jdk.compiler/com.sun.tools.javac.main.Main.compile(Main.java:292)
	at jdk.compiler/com.sun.tools.javac.main.Main.compile(Main.java:176)
	at jdk.compiler/com.sun.tools.javac.Main.compile(Main.java:64)
	at jdk.compiler/com.sun.tools.javac.Main.main(Main.java:50)
{noformat}

Last failed build: https://jenkins.thetaphi.de/job/Lucene-Solr-master-Linux/29129/



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org
For additional commands, e-mail: issues-help@lucene.apache.org