NoSuchMethodError when compiling java project in 2016.3
hi,
just upgraded to this today, i am getting this error in the build.log and the compiler fails to complete successfully:
2016-11-22 18:27:06,397 [ 21478] INFO - s.incremental.java.JavaBuilder - java.lang.NoSuchMethodError: org.eclipse.jdt.internal.compiler.impl.CompilerOptions.versionToJdkLevel(Ljava/lang/Object;)J
java.lang.RuntimeException: java.lang.NoSuchMethodError: org.eclipse.jdt.internal.compiler.impl.CompilerOptions.versionToJdkLevel(Ljava/lang/Object;)J
at com.sun.tools.javac.main.Main.compile(Main.java:553)
at com.sun.tools.javac.api.JavacTaskImpl.doCall(JavacTaskImpl.java:129)
at com.sun.tools.javac.api.JavacTaskImpl.call(JavacTaskImpl.java:138)
at org.jetbrains.jps.javac.JavacMain.compile(JavacMain.java:180)
at org.jetbrains.jps.incremental.java.JavaBuilder.compileJava(JavaBuilder.java:445)
at org.jetbrains.jps.incremental.java.JavaBuilder.compile(JavaBuilder.java:302)
at org.jetbrains.jps.incremental.java.JavaBuilder.doBuild(JavaBuilder.java:208)
at org.jetbrains.jps.incremental.java.JavaBuilder.build(JavaBuilder.java:170)
at org.jetbrains.jps.incremental.IncProjectBuilder.runModuleLevelBuilders(IncProjectBuilder.java:1275)
at org.jetbrains.jps.incremental.IncProjectBuilder.runBuildersForChunk(IncProjectBuilder.java:949)
at org.jetbrains.jps.incremental.IncProjectBuilder.buildTargetsChunk(IncProjectBuilder.java:1021)
at org.jetbrains.jps.incremental.IncProjectBuilder.buildChunkIfAffected(IncProjectBuilder.java:908)
at org.jetbrains.jps.incremental.IncProjectBuilder.access$800(IncProjectBuilder.java:82)
at org.jetbrains.jps.incremental.IncProjectBuilder$BuildParallelizer$2.run(IncProjectBuilder.java:878)
at com.intellij.util.concurrency.BoundedTaskExecutor$2.run(BoundedTaskExecutor.java:210)
at org.jetbrains.jps.service.impl.SharedThreadPoolImpl$1.run(SharedThreadPoolImpl.java:44)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
请先登录再写评论。
Please submit a ticket to support with idea.log and build.log attached. It's important that you enable debug logging for build.log. Please refer to https://intellij-support.jetbrains.com/hc/articles/207241085.
Reproduce the issue and send us the logs in the support ticket.
The problem seems to be caused by the annotation processors you are using in this project. One of them depends on Eclipse ecj compiler. Specify what annotation processors you are using (including versions) so that we can reproduce it.
it's the same problem as https://youtrack.jetbrains.com/issue/IDEA-163375. do you know when the fix will be released?
To be sure that it's the same issue, we need the requested logs, the issue could be with the annotation processor itself or with its configuration.
I added the stack trace for the error to that issue, the workaround also fixes the problem for me. I hope that's enough to verify, unfortunately my organisation is pretty sensitive about posting code or similar, so I would have to manually edit the build.log to post it, which I'd prefer to avoid if possible.