"internal java compiler error" from Error Prone Compiler plugin for IntelliJ
See original GitHub issueDescription of the problem / feature request:
Builds fail with only a single line of output:
java: Compilation failed: internal java compiler error
Feature requests: what underlying problem are you trying to solve with this feature?
I wish to build my project in IntelliJ IDEA.
I configured maven with error_prone_core
annotation processor. It builds fine and emits appropriate compilation errors.
Bugs: what’s the simplest, easiest way to reproduce this bug? Please provide a minimal example if possible.
What version of Error Prone are you using?
- Error Prone Compiler plugin for IntelliJ IDEA, 203.7717.11
- IntelliJ IDEA 2020.3.3 (Community Edition)
- Build #IC-203.7717.56, built on March 15, 2021
- Runtime version: 11.0.10+8-b1145.96 x86_64
- VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.
- macOS 10.15.7
- GC: ParNew, ConcurrentMarkSweep
- Memory: 3005M
- Cores: 8
- Non-Bundled Plugins: google-java-format, Error-prone plugin
- Project bytecode version: 16
- Project SDK: 16 version 16
- Project Language Level: SDK default (X - experimental features)
$ cat /Users/user/Library/Java/JavaVirtualMachines/openjdk-16/Contents/Home/release
IMPLEMENTOR="Oracle Corporation"
JAVA_VERSION="16"
JAVA_VERSION_DATE="2021-03-16"
LIBC="default"
MODULES="java.base java.compiler java.datatransfer java.xml java.prefs java.desktop java.instrument java.logging java.management java.security.sasl java.naming java.rmi java.management.rmi java.net.http java.scripting java.security.jgss java.transaction.xa java.sql java.sql.rowset java.xml.crypto java.se java.smartcardio jdk.accessibility jdk.internal.jvmstat jdk.attach jdk.charsets jdk.compiler jdk.crypto.ec jdk.crypto.cryptoki jdk.dynalink jdk.internal.ed jdk.editpad jdk.hotspot.agent jdk.httpserver jdk.incubator.foreign jdk.incubator.vector jdk.internal.le jdk.internal.opt jdk.internal.vm.ci jdk.jartool jdk.javadoc jdk.jcmd jdk.management jdk.management.agent jdk.jconsole jdk.jdeps jdk.jdwp.agent jdk.jdi jdk.jfr jdk.jlink jdk.jpackage jdk.jshell jdk.jsobject jdk.jstatd jdk.localedata jdk.management.jfr jdk.naming.dns jdk.naming.rmi jdk.net jdk.nio.mapmode jdk.sctp jdk.security.auth jdk.security.jgss jdk.unsupported jdk.unsupported.desktop jdk.xml.dom jdk.zipfs"
OS_ARCH="x86_64"
OS_NAME="Darwin"
SOURCE=".:git:4de3a6be9e60"
Have you found anything relevant by searching the web?
I searched for about 20 mins and found nothing.
Logs
$ tail -n 0 -f /Users/user/Library/Logs/JetBrains/IdeaIC2020.3/idea.log
2021-04-07 20:32:57,260 [2091002] INFO - ij.compiler.impl.CompileDriver - COMPILATION STARTED (BUILD PROCESS)
2021-04-07 20:32:57,263 [2091005] INFO - j.compiler.server.BuildManager - Using preloaded build process to compile /Users/user/c1
2021-04-07 20:32:57,761 [2091503] INFO - lij.compiler.impl.CompilerUtil - COMPILATION FINISHED (BUILD PROCESS); Errors: 1; warnings: 0 took 505 ms: 0 min 0sec
2021-04-07 20:32:58,003 [2091745] INFO - j.compiler.server.BuildManager - BUILDER_PROCESS [stdout]: Build process started. Classpath: /Applications/IntelliJ IDEA CE.app/Contents/plugins/java/lib/jps-launcher.jar
2021-04-07 20:32:58,059 [2091801] INFO - j.compiler.server.BuildManager - BUILDER_PROCESS [stderr]: SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
2021-04-07 20:32:58,059 [2091801] INFO - j.compiler.server.BuildManager - BUILDER_PROCESS [stderr]: SLF4J: Defaulting to no-operation (NOP) logger implementation
2021-04-07 20:32:58,059 [2091801] INFO - j.compiler.server.BuildManager - BUILDER_PROCESS [stderr]: SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
^C
$ tail -n 0 -f /Users/user/Library/Logs/JetBrains/IdeaIC2020.3/build-log/build.log
2021-04-07 20:32:57,307 [ 482571] INFO - .incremental.IncProjectBuilder - Building project; isRebuild:false; isMake:true parallel compilation:false
2021-04-07 20:32:57,330 [ 482594] INFO - .incremental.IncProjectBuilder - Cleaned output directories in 2 ms
2021-04-07 20:32:57,384 [ 482648] INFO - s.incremental.java.JavaBuilder - Compiling 155 java files; module: datingapp
2021-04-07 20:32:57,680 [ 482944] INFO - brains.jps.incremental.Builder - Dependency analysis found 0 affected files
2021-04-07 20:32:57,684 [ 482948] INFO - s.incremental.java.JavaBuilder - error-prone compiler 2.4.0 was used to compile [datingapp]
2021-04-07 20:32:58,014 [ 0] INFO - etbrains.jps.cmdline.BuildMain - ==================================================
2021-04-07 20:32:58,015 [ 1] INFO - etbrains.jps.cmdline.BuildMain - Build process started. Classpath: /Applications/IntelliJ IDEA CE.app/Contents/plugins/java/lib/jps-launcher.jar
2021-04-07 20:32:58,200 [ 186] INFO - etbrains.jps.cmdline.BuildMain - Connection to IDE established in 149 ms
2021-04-07 20:32:58,704 [ 690] INFO - #com.intellij.jna.JnaLoader - JNA library (64-bit) loaded in 500 ms
2021-04-07 20:32:58,740 [ 726] INFO - jps.cmdline.JpsModelLoaderImpl - Loading model: project path = /Users/user/c1, global options path = /Users/user/Library/Application Support/JetBrains/IdeaIC2020.3/options
2021-04-07 20:32:58,933 [ 919] INFO - jps.cmdline.JpsModelLoaderImpl - Model loaded in 193 ms
2021-04-07 20:32:58,934 [ 920] INFO - jps.cmdline.JpsModelLoaderImpl - Project has 1 modules, 39 libraries
2021-04-07 20:32:59,008 [ 994] INFO - m.intellij.util.io.StorageLock - lower=100; upper=500; buffer=10; max=680
2021-04-07 20:32:59,012 [ 998] ERROR - tellij.util.io.FileChannelUtil - symbolic reference class is not accessible: class sun.nio.ch.FileChannelImpl, from class com.intellij.util.io.FileChannelUtil (unnamed module @43bd930a)
java.lang.IllegalAccessException: symbolic reference class is not accessible: class sun.nio.ch.FileChannelImpl, from class com.intellij.util.io.FileChannelUtil (unnamed module @43bd930a)
at java.base/java.lang.invoke.MemberName.makeAccessException(MemberName.java:957)
at java.base/java.lang.invoke.MethodHandles$Lookup.checkSymbolicClass(MethodHandles.java:3675)
at java.base/java.lang.invoke.MethodHandles$Lookup.resolveOrFail(MethodHandles.java:3647)
at java.base/java.lang.invoke.MethodHandles$Lookup.findVirtual(MethodHandles.java:2687)
at com.intellij.util.io.FileChannelUtil.setupUnInterruptibleHandle(FileChannelUtil.java:36)
at com.intellij.util.io.FileChannelUtil.<clinit>(FileChannelUtil.java:18)
at com.intellij.util.io.ReadWriteDirectBufferWrapper$FileContext$1.execute(ReadWriteDirectBufferWrapper.java:60)
at com.intellij.util.io.ReadWriteDirectBufferWrapper$FileContext$1.execute(ReadWriteDirectBufferWrapper.java:50)
at com.intellij.openapi.util.io.FileUtilRt.doIOOperation(FileUtilRt.java:991)
at com.intellij.util.io.ReadWriteDirectBufferWrapper$FileContext.<init>(ReadWriteDirectBufferWrapper.java:50)
at com.intellij.util.io.ReadWriteDirectBufferWrapper.create(ReadWriteDirectBufferWrapper.java:35)
at com.intellij.util.io.DirectBufferWrapper.doCreate(DirectBufferWrapper.java:65)
at com.intellij.util.io.DirectBufferWrapper.getBuffer(DirectBufferWrapper.java:37)
at com.intellij.util.io.ReadWriteDirectBufferWrapper.getBuffer(ReadWriteDirectBufferWrapper.java:22)
at com.intellij.util.io.StorageLock.createValue(StorageLock.java:229)
at com.intellij.util.io.StorageLock.get(StorageLock.java:154)
at com.intellij.util.io.PagedFileStorage.getBufferWrapper(PagedFileStorage.java:324)
at com.intellij.util.io.PagedFileStorage.getReadOnlyBuffer(PagedFileStorage.java:307)
at com.intellij.util.io.PagedFileStorage.getInt(PagedFileStorage.java:110)
at com.intellij.util.io.ResizeableMappedFile.getInt(ResizeableMappedFile.java:203)
at com.intellij.util.io.PersistentEnumeratorBase.<init>(PersistentEnumeratorBase.java:219)
at com.intellij.util.io.PersistentBTreeEnumerator.<init>(PersistentBTreeEnumerator.java:73)
at com.intellij.util.io.PersistentEnumeratorDelegate.createDefaultEnumerator(PersistentEnumeratorDelegate.java:69)
at com.intellij.util.io.PersistentHashMap.<init>(PersistentHashMap.java:164)
at com.intellij.util.io.PersistentHashMap.<init>(PersistentHashMap.java:149)
at com.intellij.util.io.PersistentHashMap.<init>(PersistentHashMap.java:140)
at com.intellij.util.io.PersistentHashMap.<init>(PersistentHashMap.java:132)
at com.intellij.util.io.PersistentHashMap.<init>(PersistentHashMap.java:119)
at org.jetbrains.jps.incremental.storage.AbstractStateStorage.createMap(AbstractStateStorage.java:119)
at org.jetbrains.jps.incremental.storage.AbstractStateStorage.<init>(AbstractStateStorage.java:27)
at org.jetbrains.jps.incremental.storage.FileTimestampStorage.<init>(FileTimestampStorage.java:27)
at org.jetbrains.jps.incremental.storage.ProjectStamps.<init>(ProjectStamps.java:41)
at org.jetbrains.jps.cmdline.BuildRunner.load(BuildRunner.java:78)
at org.jetbrains.jps.cmdline.BuildMain.main(BuildMain.java:125)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:78)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:567)
at org.jetbrains.jps.cmdline.Launcher.main(Launcher.java:43)
2021-04-07 20:32:59,014 [ 1000] INFO - tellij.util.io.FileChannelUtil - interruptible FileChannels will be used for indexes
2021-04-07 20:32:59,082 [ 1068] INFO - etbrains.jps.cmdline.BuildMain - Pre-loaded process ready in 1079 ms
^C
Issue Analytics
- State:
- Created 2 years ago
- Comments:5
Top Results From Across the Web
Error Prone Compiler - IntelliJ IDEs Plugin | Marketplace
Allows to build projects using Error Prone Java compiler to catch common Java mistakes at compile-time. To use the compiler, go to 'File ......
Read more >Include Error Prone Setup for IntelliJ IDEA Setup in README.md
This will caused java to throw a java: Compilation failed: internal java compiler error when trying to run code in Intellij.
Read more >IntelliJ IDEA tells me "Error:java: Compilation failed
On Intellij IDEA Ctrl + Alt + S to open settings. Build, Execution, Deployment -> Compiler -> Java Compiler; choose your java version...
Read more >Re: IDEA plugin for error-prone - Google Groups
I tested by changing my compiler to "javac with error-prone" and compiled my test ... Well, to run javac with error-prone inside IntelliJ...
Read more >Installation - Error Prone
Our goal is to make it simple to add Error Prone checks to your existing Java compilation. Please note that Error Prone must...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
The problem occurs with the previous and latest versions of IntelliJ IDEA. The latest one has a ton of features specifically supporting JDK 16 and a lengthy article teaching how to use them.
I wish i could just pay Google for Error Prone and then they would invest some resources to make it great. That would include work like testing it on pre-release versions of the world’s most popular Java editor, running on the world’s most popular development OS, to make sure it works.
Google’s glacial rate of updating their public tools slows down progress and innovation in hundreds of thousands of teams around the world. For example, Bazel didn’t support JDK >8 for many years. And google-java-format still won’t format files that use JDK 14 features released 2 years ago. And Guava & libphonenumber are full of functions marked unstable for 4+ years. The tools just rot. And they are just barely good enough to prevent other companies from developing high quality commercial versions. 😦
The IntelliJ error-prone plugin is maintained by Jetbrains in https://github.com/JetBrains/intellij-plugins/commits/master/error-prone, I reported this issue here: https://youtrack.jetbrains.com/issue/IDEA-266556