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

Lombok doesn't work with error-prone #1440

Closed
KroArtem opened this issue Jul 13, 2017 · 17 comments
Closed

Lombok doesn't work with error-prone #1440

KroArtem opened this issue Jul 13, 2017 · 17 comments

Comments

@KroArtem
Copy link

As it's stated in ChangeLog for 1.16.18,
BUGFIX: Lombok now works with Bazel and Error Prone. Issue #1290
However it doesn't seem to work correctly.
Lombok 1.16.18 + error-prone (plexus-compiler-javac-errorprone 2.8.2, error_prone_core 2.0.21) as it's stated in installation, maven build.

When I try to run tests, it fails with the following message:

Information:java: Errors occurred while compiling module 'tests'
Information:error-prone compiler was used to compile java sources
Information:13.07.2017 15:30 - Compilation completed with 17 errors and 1 warning in 3s 554ms
D:\qa_***\tests\src\test\java\com\***\tests\***.java
    Warning:Warning:line (29)java: lombok.javac.apt.LombokProcessor could not be initialized. Lombok will not run during this compilation: java.lang.IllegalArgumentException: com.sun.tools.javac.api.ClientCodeWrapper$WrappedStandardJavaFileManager extends com.sun.tools.javac.api.ClientCodeWrapper$WrappedJavaFileManager implements javax.tools.StandardJavaFileManager

  	at lombok.javac.apt.LombokFileObjects.getCompiler(LombokFileObjects.java:130)

  	at lombok.javac.apt.InterceptingJavaFileManager.<init>(InterceptingJavaFileManager.java:40)

  	at lombok.javac.apt.LombokProcessor.placePostCompileAndDontMakeForceRoundDummiesHook(LombokProcessor.java:164)

  	at lombok.javac.apt.LombokProcessor.init(LombokProcessor.java:85)

  	at lombok.core.AnnotationProcessor$JavacDescriptor.want(AnnotationProcessor.java:87)

  	at lombok.core.AnnotationProcessor.init(AnnotationProcessor.java:140)

  	at lombok.launch.AnnotationProcessorHider$AnnotationProcessor.init(AnnotationProcessor.java:69)

  	at com.sun.tools.javac.processing.JavacProcessingEnvironment$ProcessorState.<init>(JavacProcessingEnvironment.java:539)

  	at com.sun.tools.javac.processing.JavacProcessingEnvironment$DiscoveredProcessors$ProcessorStateIterator.next(JavacProcessingEnvironment.java:636)

  	at com.sun.tools.javac.processing.JavacProcessingEnvironment.discoverAndRunProcs(JavacProcessingEnvironment.java:727)

  	at com.sun.tools.javac.processing.JavacProcessingEnvironment.access$2000(JavacProcessingEnvironment.java:100)

  	at com.sun.tools.javac.processing.JavacProcessingEnvironment$Round.run(JavacProcessingEnvironment.java:1046)

  	at com.sun.tools.javac.processing.JavacProcessingEnvironment.doProcessing(JavacProcessingEnvironment.java:1153)

  	at com.sun.tools.javac.main.JavaCompiler.processAnnotations(JavaCompiler.java:1120)

  	at com.sun.tools.javac.main.JavaCompiler.compile(JavaCompiler.java:814)

  	at com.sun.tools.javac.api.JavacTaskImpl$1.call(JavacTaskImpl.java:97)

  	at com.sun.tools.javac.api.JavacTaskImpl$1.call(JavacTaskImpl.java:93)

  	at com.sun.tools.javac.api.JavacTaskImpl.handleExceptions(JavacTaskImpl.java:128)

  	at com.sun.tools.javac.api.JavacTaskImpl.doCall(JavacTaskImpl.java:93)

  	at com.sun.tools.javac.api.JavacTaskImpl.call(JavacTaskImpl.java:87)

  	at com.google.errorprone.BaseErrorProneJavaCompiler$1.call(BaseErrorProneJavaCompiler.java:99)

  	at org.jetbrains.jps.javac.JavacMain.compile(JavacMain.java:190)

  	at org.jetbrains.jps.incremental.java.JavaBuilder.compileJava(JavaBuilder.java:473)

  	at org.jetbrains.jps.incremental.java.JavaBuilder.compile(JavaBuilder.java:328)

  	at org.jetbrains.jps.incremental.java.JavaBuilder.doBuild(JavaBuilder.java:255)

  	at org.jetbrains.jps.incremental.java.JavaBuilder.build(JavaBuilder.java:208)

  	at org.jetbrains.jps.incremental.IncProjectBuilder.runModuleLevelBuilders(IncProjectBuilder.java:1260)

  	at org.jetbrains.jps.incremental.IncProjectBuilder.runBuildersForChunk(IncProjectBuilder.java:937)

  	at org.jetbrains.jps.incremental.IncProjectBuilder.buildTargetsChunk(IncProjectBuilder.java:1009)

  	at org.jetbrains.jps.incremental.IncProjectBuilder.buildChunkIfAffected(IncProjectBuilder.java:900)

  	at org.jetbrains.jps.incremental.IncProjectBuilder.buildChunks(IncProjectBuilder.java:733)

  	at org.jetbrains.jps.incremental.IncProjectBuilder.runBuild(IncProjectBuilder.java:385)

  	at org.jetbrains.jps.incremental.IncProjectBuilder.build(IncProjectBuilder.java:192)

  	at org.jetbrains.jps.cmdline.BuildRunner.runBuild(BuildRunner.java:138)

  	at org.jetbrains.jps.cmdline.BuildSession.runBuild(BuildSession.java:295)

  	at org.jetbrains.jps.cmdline.BuildSession.run(BuildSession.java:125)

  	at org.jetbrains.jps.cmdline.BuildMain$MyMessageHandler.lambda$channelRead0$0(BuildMain.java:236)

  	at org.jetbrains.jps.service.impl.SharedThreadPoolImpl.lambda$executeOnPooledThread$0(SharedThreadPoolImpl.java:42)

  	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)

  	at java.util.concurrent.FutureTask.run(FutureTask.java:266)

  	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)

  	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)

  	at java.lang.Thread.run(Thread.java:745)

    Error:Error:line (47)java: cannot find symbol
  symbol:   variable LOG
  location: class com.***.tests.***
    Error:Error:line (59)java: cannot find symbol
  symbol:   variable LOG
  location:class com.***.tests.***
    Error:Error:line (73)java: cannot find symbol
  symbol:   variable LOG
  location: class com.***.tests.***
    Error:Error:line (86)java: cannot find symbol
  symbol:   variable LOG
  location: class com.***.tests.***
    Error:Error:line (124)java: cannot find symbol
  symbol:   variable LOG
  location: class com.***.tests.***
    Error:Error:line (179)java: cannot find symbol
  symbol:   variable LOG
  location: class com.***.tests.***
    Error:Error:line (181)java: cannot find symbol
  symbol:   variable LOG
  location: class com.***.tests.***
    Error:Error:line (262)java: cannot find symbol
  symbol:   variable LOG
  location: class com.***.tests.***
    Error:Error:line (268)java: cannot find symbol
  symbol:   variable LOG
  location: class com.***.tests.***
    Error:Error:line (276)java: cannot find symbol
  symbol:   variable LOG
  location: class com.***.tests.***
    Error:Error:line (297)java: cannot find symbol
  symbol:   variable LOG
  location: class com.***.tests.***
    Error:Error:line (302)java: cannot find symbol
  symbol:   variable LOG
  location: class com.***.tests.***
    Error:Error:line (323)java: cannot find symbol
  symbol:   variable LOG
  location: class com.***.tests.***
    Error:Error:line (325)java: cannot find symbol
  symbol:   variable LOG
  location: class com.***.tests.***
    Error:Error:line (329)java: cannot find symbol
  symbol:   variable LOG
  location: class com.***.tests.***
    Error:Error:line (331)java: cannot find symbol
  symbol:   variable LOG
  location: class com.***.tests.***
    Error:Error:line (368)java: cannot find symbol
  symbol:   variable LOG
  location: class com.***.tests.***
@rspilker
Copy link
Collaborator

Hmm, this is another error-prone usage. Does this occur in IntelliJ?

@rspilker
Copy link
Collaborator

Can you try the edge release?

@KroArtem
Copy link
Author

KroArtem commented Jul 18, 2017

@rspilker, indeed it's IntelliJ, forgot to mention.
I've downloaded edge release, added it as a jar dependency to all modules in my multimodule project.
Now the stacktrace is the following:

Information:java: Errors occurred while compiling module 'utils'
Information:error-prone compiler was used to compile java sources
Information:Module "utils" was fully rebuilt due to project configuration/dependencies changes
Information:18.07.2017 10:18 - Compilation completed with 1 error and 1 warning in 3s 483ms
D:\qa_***\utils\src\main\java\com\***\utils\config\SetupConfig.java
    Warning:Warning:line (13)java: lombok.javac.apt.LombokProcessor could not be initialized. Lombok will not run during this compilation: java.lang.IllegalArgumentException: com.sun.tools.javac.api.ClientCodeWrapper$WrappedStandardJavaFileManager extends com.sun.tools.javac.api.ClientCodeWrapper$WrappedJavaFileManager implements javax.tools.StandardJavaFileManager
  	at lombok.javac.apt.LombokFileObjects.getCompiler(LombokFileObjects.java:143)
  	at lombok.javac.apt.InterceptingJavaFileManager.<init>(InterceptingJavaFileManager.java:40)
  	at lombok.javac.apt.LombokProcessor.placePostCompileAndDontMakeForceRoundDummiesHook(LombokProcessor.java:164)
  	at lombok.javac.apt.LombokProcessor.init(LombokProcessor.java:85)
  	at lombok.core.AnnotationProcessor$JavacDescriptor.want(AnnotationProcessor.java:87)
  	at lombok.core.AnnotationProcessor.init(AnnotationProcessor.java:140)
  	at lombok.launch.AnnotationProcessorHider$AnnotationProcessor.init(AnnotationProcessor.java:69)
  	at com.sun.tools.javac.processing.JavacProcessingEnvironment$ProcessorState.<init>(JavacProcessingEnvironment.java:539)
  	at com.sun.tools.javac.processing.JavacProcessingEnvironment$DiscoveredProcessors$ProcessorStateIterator.next(JavacProcessingEnvironment.java:636)
  	at com.sun.tools.javac.processing.JavacProcessingEnvironment.discoverAndRunProcs(JavacProcessingEnvironment.java:727)
  	at com.sun.tools.javac.processing.JavacProcessingEnvironment.access$2000(JavacProcessingEnvironment.java:100)
  	at com.sun.tools.javac.processing.JavacProcessingEnvironment$Round.run(JavacProcessingEnvironment.java:1046)
  	at com.sun.tools.javac.processing.JavacProcessingEnvironment.doProcessing(JavacProcessingEnvironment.java:1153)
  	at com.sun.tools.javac.main.JavaCompiler.processAnnotations(JavaCompiler.java:1120)
  	at com.sun.tools.javac.main.JavaCompiler.compile(JavaCompiler.java:814)
  	at com.sun.tools.javac.api.JavacTaskImpl$1.call(JavacTaskImpl.java:97)
  	at com.sun.tools.javac.api.JavacTaskImpl$1.call(JavacTaskImpl.java:93)
  	at com.sun.tools.javac.api.JavacTaskImpl.handleExceptions(JavacTaskImpl.java:128)
  	at com.sun.tools.javac.api.JavacTaskImpl.doCall(JavacTaskImpl.java:93)
  	at com.sun.tools.javac.api.JavacTaskImpl.call(JavacTaskImpl.java:87)
  	at com.google.errorprone.BaseErrorProneJavaCompiler$1.call(BaseErrorProneJavaCompiler.java:99)
  	at org.jetbrains.jps.javac.JavacMain.compile(JavacMain.java:190)
  	at org.jetbrains.jps.incremental.java.JavaBuilder.compileJava(JavaBuilder.java:473)
  	at org.jetbrains.jps.incremental.java.JavaBuilder.compile(JavaBuilder.java:328)
  	at org.jetbrains.jps.incremental.java.JavaBuilder.doBuild(JavaBuilder.java:255)
  	at org.jetbrains.jps.incremental.java.JavaBuilder.build(JavaBuilder.java:208)
  	at org.jetbrains.jps.incremental.IncProjectBuilder.runModuleLevelBuilders(IncProjectBuilder.java:1260)
  	at org.jetbrains.jps.incremental.IncProjectBuilder.runBuildersForChunk(IncProjectBuilder.java:937)
  	at org.jetbrains.jps.incremental.IncProjectBuilder.buildTargetsChunk(IncProjectBuilder.java:1009)
  	at org.jetbrains.jps.incremental.IncProjectBuilder.buildChunkIfAffected(IncProjectBuilder.java:900)
  	at org.jetbrains.jps.incremental.IncProjectBuilder.buildChunks(IncProjectBuilder.java:733)
  	at org.jetbrains.jps.incremental.IncProjectBuilder.runBuild(IncProjectBuilder.java:385)
  	at org.jetbrains.jps.incremental.IncProjectBuilder.build(IncProjectBuilder.java:192)
  	at org.jetbrains.jps.cmdline.BuildRunner.runBuild(BuildRunner.java:138)
  	at org.jetbrains.jps.cmdline.BuildSession.runBuild(BuildSession.java:295)
  	at org.jetbrains.jps.cmdline.BuildSession.run(BuildSession.java:125)
  	at org.jetbrains.jps.cmdline.BuildMain$MyMessageHandler.lambda$channelRead0$0(BuildMain.java:236)
  	at org.jetbrains.jps.service.impl.SharedThreadPoolImpl.lambda$executeOnPooledThread$0(SharedThreadPoolImpl.java:42)
  	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
  	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
  	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
  	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
  	at java.lang.Thread.run(Thread.java:745)
    Error:Error:line (92)java: cannot find symbol
  symbol:   variable LOG
  location: class com.***.utils.config.SetupConfig

Lines are not the same so I assume this jar was used, not the previous lombok version.

@solomkinmv
Copy link

I have the same issue which occurs only with IntelliJ IDEA. If I run tests with gradle everything is fine

@gregorko
Copy link

gregorko commented Sep 4, 2017

I see the same issue with 1.16.18 in IntelliJ IDEA.
Once I remove the error prone compiler option everything runs fine.

@Maaartinus
Copy link
Contributor

For me, it never worked (I've tried it several times in the last two years). Currently I'm using

Gradle 2.12
org.projectlombok:lombok:1.16.18
net.ltgt.gradle:gradle-errorprone-plugin:0.0.11
com.google.errorprone:error_prone_core:2.0.15

and I get
google/error-prone#502
With a newer errorprone version like 2.0.16 or 2.1.1, I get
google/error-prone#690
(which is IIUIC worse).

I've also tried gradle 3.0, 4.0 and 4.1 (though I don't believe, it could help) and nothing changed.

tmurakam added a commit to tmurakam/lombok that referenced this issue Oct 15, 2017
tmurakam added a commit to tmurakam/lombok that referenced this issue Oct 15, 2017
tmurakam added a commit to tmurakam/lombok that referenced this issue Oct 15, 2017
tmurakam added a commit to tmurakam/lombok that referenced this issue Oct 15, 2017
tmurakam added a commit to tmurakam/lombok that referenced this issue Oct 15, 2017
@rspilker
Copy link
Collaborator

We've created an edge release. Can someone verify that this version fixes the problem?

@KroArtem
Copy link
Author

Glad to hear something is done but I don't use Lombok anymore and won't be able to check.

@jasonzhao3
Copy link

@rspilker I tried with the edge release, but it's still not working with a different stacktrace:

@Builder
^
     Please report this at https://github.com/google/error-prone/issues/new and include the following:

     error-prone version: 2.1.1
     Stack Trace:
     java.lang.IllegalArgumentException: Invalid range: [466..-1)
  	at com.google.common.collect.Range.<init>(Range.java:352)
  	at com.google.common.collect.Range.create(Range.java:146)
  	at com.google.common.collect.Range.closedOpen(Range.java:182)
  	at com.google.errorprone.fixes.Replacement.create(Replacement.java:38)
  	at com.google.errorprone.fixes.SuggestedFix$ReplacementFix.getReplacement(SuggestedFix.java:374)
  	at com.google.errorprone.fixes.SuggestedFix.getReplacements(SuggestedFix.java:86)
  	at com.google.errorprone.fixes.AppliedFix$Applier.apply(AppliedFix.java:66)
  	at com.google.errorprone.JavacErrorDescriptionListener.lambda$new$0(JavacErrorDescriptionListener.java:62)
  	at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193)
  	at java.util.Collections$2.tryAdvance(Collections.java:4717)
  	at java.util.Collections$2.forEachRemaining(Collections.java:4725)
  	at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:481)
  	at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:471)
  	at java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:708)
  	at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
  	at java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:499)
  	at com.google.errorprone.JavacErrorDescriptionListener.onDescribed(JavacErrorDescriptionListener.java:76)
  	at com.google.errorprone.RefactoringCollection$DelegatingDescriptionListener.onDescribed(RefactoringCollection.java:212)
  	at com.google.errorprone.VisitorState.reportMatch(VisitorState.java:158)
  	at com.google.errorprone.scanner.Scanner.reportMatch(Scanner.java:153)
  	at com.google.errorprone.scanner.ErrorProneScanner.visitMethod(ErrorProneScanner.java:892)
  	at com.google.errorprone.scanner.ErrorProneScanner.visitMethod(ErrorProneScanner.java:146)
  	at com.sun.tools.javac.tree.JCTree$JCMethodDecl.accept(JCTree.java:898)
  	at com.sun.source.util.TreePathScanner.scan(TreePathScanner.java:82)
  	at com.google.errorprone.scanner.Scanner.scan(Scanner.java:82)
  	at com.google.errorprone.scanner.Scanner.scan(Scanner.java:42)
  	at com.sun.source.util.TreeScanner.scanAndReduce(TreeScanner.java:90)
  	at com.sun.source.util.TreeScanner.scan(TreeScanner.java:105)
  	at com.sun.source.util.TreeScanner.scanAndReduce(TreeScanner.java:113)
  	at com.sun.source.util.TreeScanner.visitClass(TreeScanner.java:187)
  	at com.google.errorprone.scanner.ErrorProneScanner.visitClass(ErrorProneScanner.java:590)
  	at com.google.errorprone.scanner.ErrorProneScanner.visitClass(ErrorProneScanner.java:146)
  	at com.sun.tools.javac.tree.JCTree$JCClassDecl.accept(JCTree.java:808)
  	at com.sun.source.util.TreePathScanner.scan(TreePathScanner.java:82)
  	at com.google.errorprone.scanner.Scanner.scan(Scanner.java:82)
  	at com.google.errorprone.scanner.Scanner.scan(Scanner.java:42)
  	at com.sun.source.util.TreeScanner.scanAndReduce(TreeScanner.java:90)
  	at com.sun.source.util.TreeScanner.scan(TreeScanner.java:105)
  	at com.sun.source.util.TreeScanner.scanAndReduce(TreeScanner.java:113)
  	at com.sun.source.util.TreeScanner.visitClass(TreeScanner.java:187)
  	at com.google.errorprone.scanner.ErrorProneScanner.visitClass(ErrorProneScanner.java:590)
  	at com.google.errorprone.scanner.ErrorProneScanner.visitClass(ErrorProneScanner.java:146)
  	at com.sun.tools.javac.tree.JCTree$JCClassDecl.accept(JCTree.java:808)
  	at com.sun.source.util.TreePathScanner.scan(TreePathScanner.java:82)
  	at com.google.errorprone.scanner.Scanner.scan(Scanner.java:82)
  	at com.google.errorprone.scanner.Scanner.scan(Scanner.java:42)
  	at com.sun.source.util.TreeScanner.scan(TreeScanner.java:105)
  	at com.sun.source.util.TreeScanner.scanAndReduce(TreeScanner.java:113)
  	at com.sun.source.util.TreeScanner.visitCompilationUnit(TreeScanner.java:144)
  	at com.google.errorprone.scanner.ErrorProneScanner.visitCompilationUnit(ErrorProneScanner.java:605)
  	at com.google.errorprone.scanner.ErrorProneScanner.visitCompilationUnit(ErrorProneScanner.java:146)
  	at com.sun.tools.javac.tree.JCTree$JCCompilationUnit.accept(JCTree.java:591)
  	at com.sun.source.util.TreePathScanner.scan(TreePathScanner.java:56)
  	at com.google.errorprone.scanner.Scanner.scan(Scanner.java:64)
  	at com.google.errorprone.scanner.ErrorProneScannerTransformer.apply(ErrorProneScannerTransformer.java:41)
  	at com.google.errorprone.ErrorProneAnalyzer.finished(ErrorProneAnalyzer.java:145)
  	at com.sun.tools.javac.api.MultiTaskListener.finished(MultiTaskListener.java:120)
  	at com.sun.tools.javac.main.JavaCompiler.flow(JavaCompiler.java:1425)
  	at com.sun.tools.javac.main.JavaCompiler.flow(JavaCompiler.java:1374)
  	at com.sun.tools.javac.main.JavaCompiler.compile(JavaCompiler.java:973)
  	at com.sun.tools.javac.api.JavacTaskImpl.lambda$doCall$0(JavacTaskImpl.java:100)
  	at com.sun.tools.javac.api.JavacTaskImpl.handleExceptions(JavacTaskImpl.java:142)
  	at com.sun.tools.javac.api.JavacTaskImpl.doCall(JavacTaskImpl.java:96)
  	at com.sun.tools.javac.api.JavacTaskImpl.call(JavacTaskImpl.java:90)
  	at com.google.errorprone.BaseErrorProneCompiler.run(BaseErrorProneCompiler.java:137)
  	at com.google.errorprone.BaseErrorProneCompiler.run(BaseErrorProneCompiler.java:108)
  	at com.google.errorprone.ErrorProneCompiler.run(ErrorProneCompiler.java:118)
  	at com.google.errorprone.ErrorProneCompiler.compile(ErrorProneCompiler.java:65)
  	at org.codehaus.plexus.compiler.javac.errorprone.JavacCompilerWithErrorProne$CompilerInvoker.compile(JavacCompilerWithErrorProne.java:219)
  	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
  	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
  	at java.lang.reflect.Method.invoke(Method.java:498)
  	at org.codehaus.plexus.compiler.javac.errorprone.JavacCompilerWithErrorProne.performCompile(JavacCompilerWithErrorProne.java:91)
  	at org.apache.maven.plugin.compiler.AbstractCompilerMojo.execute(AbstractCompilerMojo.java:884)
  	at org.apache.maven.plugin.compiler.CompilerMojo.execute(CompilerMojo.java:129)
  	at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:134)
  	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:207)
  	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
  	at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
  	at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:116)
  	at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:80)
  	at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
  	at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128)
  	at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:307)
  	at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:193)
  	at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:106)
  	at org.apache.maven.cli.MavenCli.execute(MavenCli.java:863)
  	at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:288)
  	at org.apache.maven.cli.MavenCli.main(MavenCli.java:199)
  	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
  	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
  	at java.lang.reflect.Method.invoke(Method.java:498)
  	at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
  	at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
  	at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
  	at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
1 error

@yanyandenuonuo
Copy link

yanyandenuonuo commented Dec 7, 2017

I get the same error at 1.16.18 and jdk 9.

Warning:(14, 8) java: lombok.javac.apt.LombokProcessor could not be initialized. Lombok will not run during this compilation: java.lang.IllegalArgumentException: com.sun.tools.javac.api.ClientCodeWrapper$WrappedStandardJavaFileManager extends com.sun.tools.javac.api.ClientCodeWrapper$WrappedJavaFileManager implements javax.tools.StandardJavaFileManager at lombok.javac.apt.LombokFileObjects.getCompiler(LombokFileObjects.java:130) at lombok.javac.apt.InterceptingJavaFileManager.<init>(InterceptingJavaFileManager.java:40) at lombok.javac.apt.LombokProcessor.placePostCompileAndDontMakeForceRoundDummiesHook(LombokProcessor.java:164) at lombok.javac.apt.LombokProcessor.init(LombokProcessor.java:85) at lombok.core.AnnotationProcessor$JavacDescriptor.want(AnnotationProcessor.java:87) at lombok.core.AnnotationProcessor.init(AnnotationProcessor.java:140) at lombok.launch.AnnotationProcessorHider$AnnotationProcessor.init(AnnotationProcessor.java:69) at jdk.compiler/com.sun.tools.javac.processing.JavacProcessingEnvironment$ProcessorState.<init>(JavacProcessingEnvironment.java:675) at jdk.compiler/com.sun.tools.javac.processing.JavacProcessingEnvironment$DiscoveredProcessors$ProcessorStateIterator.next(JavacProcessingEnvironment.java:774) at jdk.compiler/com.sun.tools.javac.processing.JavacProcessingEnvironment.discoverAndRunProcs(JavacProcessingEnvironment.java:869) at jdk.compiler/com.sun.tools.javac.processing.JavacProcessingEnvironment.access$2200(JavacProcessingEnvironment.java:108) at jdk.compiler/com.sun.tools.javac.processing.JavacProcessingEnvironment$Round.run(JavacProcessingEnvironment.java:1206) at jdk.compiler/com.sun.tools.javac.processing.JavacProcessingEnvironment.doProcessing(JavacProcessingEnvironment.java:1315) at jdk.compiler/com.sun.tools.javac.main.JavaCompiler.processAnnotations(JavaCompiler.java:1246) at jdk.compiler/com.sun.tools.javac.main.JavaCompiler.compile(JavaCompiler.java:922) at jdk.compiler/com.sun.tools.javac.api.JavacTaskImpl.lambda$doCall$0(JavacTaskImpl.java:100) at jdk.compiler/com.sun.tools.javac.api.JavacTaskImpl.handleExceptions(JavacTaskImpl.java:142) at jdk.compiler/com.sun.tools.javac.api.JavacTaskImpl.doCall(JavacTaskImpl.java:96) at jdk.compiler/com.sun.tools.javac.api.JavacTaskImpl.call(JavacTaskImpl.java:90) at org.jetbrains.jps.javac.JavacMain.compile(JavacMain.java:190) at org.jetbrains.jps.incremental.java.JavaBuilder.compileJava(JavaBuilder.java:481) at org.jetbrains.jps.incremental.java.JavaBuilder.compile(JavaBuilder.java:331) at org.jetbrains.jps.incremental.java.JavaBuilder.doBuild(JavaBuilder.java:258) at org.jetbrains.jps.incremental.java.JavaBuilder.build(JavaBuilder.java:216) at org.jetbrains.jps.incremental.IncProjectBuilder.runModuleLevelBuilders(IncProjectBuilder.java:1260) at org.jetbrains.jps.incremental.IncProjectBuilder.runBuildersForChunk(IncProjectBuilder.java:937) at org.jetbrains.jps.incremental.IncProjectBuilder.buildTargetsChunk(IncProjectBuilder.java:1009) at org.jetbrains.jps.incremental.IncProjectBuilder.buildChunkIfAffected(IncProjectBuilder.java:900) at org.jetbrains.jps.incremental.IncProjectBuilder.buildChunks(IncProjectBuilder.java:733) at org.jetbrains.jps.incremental.IncProjectBuilder.runBuild(IncProjectBuilder.java:385) at org.jetbrains.jps.incremental.IncProjectBuilder.build(IncProjectBuilder.java:192) at org.jetbrains.jps.cmdline.BuildRunner.runBuild(BuildRunner.java:138) at org.jetbrains.jps.cmdline.BuildSession.runBuild(BuildSession.java:308) at org.jetbrains.jps.cmdline.BuildSession.run(BuildSession.java:138) at org.jetbrains.jps.cmdline.BuildMain$MyMessageHandler.lambda$channelRead0$0(BuildMain.java:235) at org.jetbrains.jps.service.impl.SharedThreadPoolImpl.lambda$executeOnPooledThread$0(SharedThreadPoolImpl.java:42) at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:514) at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167) at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641) at java.base/java.lang.Thread.run(Thread.java:844)

@rspilker
Copy link
Collaborator

Can you please try with the edge release?

@GlennMatthys
Copy link

Works for me on 1.16.19 in combination with the error-prone compiler.

@mkurz
Copy link
Contributor

mkurz commented Jan 10, 2018

Lombok 1.16.20 is out - give it a try

@denis111
Copy link

I have strange error like this with jdk9:
`
error: An unhandled exception was thrown by the Error Prone static analysis plugin.
@slf4j
^
Please report this at https://github.com/google/error-prone/issues/new and include the following:

 error-prone version: 2.2.0
 Stack Trace:

`

Yes, with empty stack trace. Maybe error-prone's issue or #985 related.

@SharpMan
Copy link

@denis111
@slf4j is working fine for me with the edge version + intellij idea plugin updated.
Try to look if all your dependencies are correctly updated.

@kkman2008
Copy link

kkman2008 commented Jun 12, 2019

it seems working to update the version accordingly.

@rzwitserloot
Copy link
Collaborator

Sounds like this one can be closed. 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests