[ 
https://issues.apache.org/jira/browse/LUCENE-9650?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17255973#comment-17255973
 ] 

Uwe Schindler commented on LUCENE-9650:
---------------------------------------

My testing:

{noformat}
> gradlew compileJava -Druntime.java.home=/path/to/jdk-16
To honour the JVM settings for this build a new JVM will be forked. Please 
consider using the daemon: 
https://docs.gradle.org/6.6.1/userguide/gradle_daemon.html.
Daemon will be stopped at the end of the build stopping after processing

> Configure project :
WARNING: errorprone disabled (won't work with JDK 16)

> Task :altJvmWarning
NOTE: Alternative java toolchain will be used for compilation and tests:
  Project will use Java 16 from: C:\Program Files\java\jdk-16
  Gradle runs with Java 11 from: C:\Program Files\Java\jdk-11.0.8


> Task :solr:solrj:compileJava
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
{noformat}

Without this patch it fails as on Jenkins.

> 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
>            Assignee: Dawid Weiss
>            Priority: Major
>             Fix For: master (9.0)
>
>          Time Spent: 0.5h
>  Remaining Estimate: 0h
>
> 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: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to