mvn clean install gets success with java (jdk1.8.0_201) but fails to build with java (C:\Program Files (x86)\Amazon Corretto\jdk1.8.0_392). I am trying this with Corretto8 to deploy using aws codepipeline. The application rarely builds success with corretto8 (like gets success 1 in 30 times). Not sure why the stackOverflowError occurs.
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.0:compile (default-compile) on project code-jip: Fatal error compiling: java.lang.StackOverflowError -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.0:compile (default-compile) on project code-jip: Fatal error compiling
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:215)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:156)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:148)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)
at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:56)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:305)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
at org.apache.maven.cli.MavenCli.execute (MavenCli.java:972)
at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:293)
at org.apache.maven.cli.MavenCli.main (MavenCli.java:196)
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:282)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:225)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:406)
at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:347)
Caused by: org.apache.maven.plugin.MojoExecutionException: Fatal error compiling
at org.apache.maven.plugin.compiler.AbstractCompilerMojo.execute (AbstractCompilerMojo.java:695)
at org.apache.maven.plugin.compiler.CompilerMojo.execute (CompilerMojo.java:118)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:137)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:210)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:156)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:148)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)
at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:56)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:305)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
at org.apache.maven.cli.MavenCli.execute (MavenCli.java:972)
at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:293)
at org.apache.maven.cli.MavenCli.main (MavenCli.java:196)
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:282)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:225)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:406)
at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:347)
Caused by: org.codehaus.plexus.compiler.CompilerException: java.lang.StackOverflowError
at org.codehaus.plexus.compiler.javac.JavaxToolsCompiler.compileInProcess (JavaxToolsCompiler.java:191)
at org.codehaus.plexus.compiler.javac.JavacCompiler.performCompile (JavacCompiler.java:170)
at org.apache.maven.plugin.compiler.AbstractCompilerMojo.execute (AbstractCompilerMojo.java:684)
at org.apache.maven.plugin.compiler.CompilerMojo.execute (CompilerMojo.java:118)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:137)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:210)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:156)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:148)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)
at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:56)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:305)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
at org.apache.maven.cli.MavenCli.execute (MavenCli.java:972)
at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:293)
at org.apache.maven.cli.MavenCli.main (MavenCli.java:196)
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:282)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:225)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:406)
at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:347)
Caused by: java.lang.RuntimeException: java.lang.StackOverflowError
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.codehaus.plexus.compiler.javac.JavaxToolsCompiler.compileInProcess (JavaxToolsCompiler.java:126)
at org.codehaus.plexus.compiler.javac.JavacCompiler.performCompile (JavacCompiler.java:170)
at org.apache.maven.plugin.compiler.AbstractCompilerMojo.execute (AbstractCompilerMojo.java:684)
at org.apache.maven.plugin.compiler.CompilerMojo.execute (CompilerMojo.java:118)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo (DefaultBuildPluginManager.java:137)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:210)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:156)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:148)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)
at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:56)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:305)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
at org.apache.maven.cli.MavenCli.execute (MavenCli.java:972)
at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:293)
at org.apache.maven.cli.MavenCli.main (MavenCli.java:196)
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:282)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch (Launcher.java:225)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode (Launcher.java:406)
at org.codehaus.plexus.classworlds.launcher.Launcher.main (Launcher.java:347)
Caused by: java.lang.StackOverflowError
at lombok.core.AST.fieldsOf (AST.java:234)
at lombok.javac.JavacAST.drill (JavacAST.java:421)
at lombok.javac.JavacAST.buildStatementOrExpression (JavacAST.java:387)
at lombok.javac.JavacAST.buildTree (JavacAST.java:196)
at lombok.javac.JavacAST.buildTree (JavacAST.java:1)
at lombok.core.AST.buildWithField0 (AST.java:394)
at lombok.core.AST.buildWithField (AST.java:292)
at lombok.javac.JavacAST.drill (JavacAST.java:421)
at lombok.javac.JavacAST.buildStatementOrExpression (JavacAST.java:387)
at lombok.javac.JavacAST.buildTree (JavacAST.java:196)
at lombok.javac.JavacAST.buildTree (JavacAST.java:1)
at lombok.core.AST.buildWithField0 (AST.java:394)
at lombok.core.AST.buildWithField (AST.java:292)
at lombok.javac.JavacAST.drill (JavacAST.java:421)
at lombok.javac.JavacAST.buildStatementOrExpression (JavacAST.java:387)
at lombok.javac.JavacAST.buildTree (JavacAST.java:196)
at lombok.javac.JavacAST.buildTree (JavacAST.java:1)
at lombok.core.AST.buildWithField0 (AST.java:394)
at lombok.core.AST.buildWithField (AST.java:292)
at lombok.javac.JavacAST.drill (JavacAST.java:421)
at lombok.javac.JavacAST.buildStatementOrExpression (JavacAST.java:387)
at lombok.javac.JavacAST.buildTree (JavacAST.java:196)
at lombok.javac.JavacAST.buildTree (JavacAST.java:1)
at lombok.core.AST.buildWithField0 (AST.java:394)
at lombok.core.AST.buildWithField (AST.java:292)
at lombok.javac.JavacAST.drill (JavacAST.java:421)
at lombok.javac.JavacAST.buildStatementOrExpression (JavacAST.java:387)
at lombok.javac.JavacAST.buildTree (JavacAST.java:196)
at lombok.javac.JavacAST.buildTree (JavacAST.java:1)
at lombok.core.AST.buildWithField0 (AST.java:394)
at lombok.core.AST.buildWithField (AST.java:292)
at lombok.javac.JavacAST.drill (JavacAST.java:421)
at lombok.javac.JavacAST.buildStatementOrExpression (JavacAST.java:387)
at lombok.javac.JavacAST.buildTree (JavacAST.java:196)
at lombok.javac.JavacAST.buildTree (JavacAST.java:1)
at lombok.core.AST.buildWithField0 (AST.java:394)
at lombok.core.AST.buildWithField (AST.java:292)
at lombok.javac.JavacAST.drill (JavacAST.java:421)
at lombok.javac.JavacAST.buildStatementOrExpression (JavacAST.java:387)
at lombok.javac.JavacAST.buildTree (JavacAST.java:196)
at lombok.javac.JavacAST.buildTree (JavacAST.java:1)
at lombok.core.AST.buildWithField0 (AST.java:394)
at lombok.core.AST.buildWithField (AST.java:292)
at lombok.javac.JavacAST.drill (JavacAST.java:421)
at lombok.javac.JavacAST.buildStatementOrExpression (JavacAST.java:387)
at lombok.javac.JavacAST.buildTree (JavacAST.java:196)
at lombok.javac.JavacAST.buildTree (JavacAST.java:1)
at lombok.core.AST.buildWithField0 (AST.java:394)
at lombok.core.AST.buildWithField (AST.java:292)
at lombok.javac.JavacAST.drill (JavacAST.java:421)
at lombok.javac.JavacAST.buildStatementOrExpression (JavacAST.java:387)
at lombok.javac.JavacAST.buildTree (JavacAST.java:196)
at lombok.javac.JavacAST.buildTree (JavacAST.java:1)
at lombok.core.AST.buildWithField0 (AST.java:394)
at lombok.core.AST.buildWithField (AST.java:292)
at lombok.javac.JavacAST.drill (JavacAST.java:421)
at lombok.javac.JavacAST.buildStatementOrExpression (JavacAST.java:387)
at lombok.javac.JavacAST.buildTree (JavacAST.java:196)
at lombok.javac.JavacAST.buildTree (JavacAST.java:1)
at lombok.core.AST.buildWithField0 (AST.java:394)
at lombok.core.AST.buildWithField (AST.java:292)
at lombok.javac.JavacAST.drill (JavacAST.java:421)
at lombok.javac.JavacAST.buildStatementOrExpression (JavacAST.java:387)
at lombok.javac.JavacAST.buildTree (JavacAST.java:196)
at lombok.javac.JavacAST.buildTree (JavacAST.java:1)
at lombok.core.AST.buildWithField0 (AST.java:394)
at lombok.core.AST.buildWithField (AST.java:292)
at lombok.javac.JavacAST.drill (JavacAST.java:421)
at lombok.javac.JavacAST.buildStatementOrExpression (JavacAST.java:387)
at lombok.javac.JavacAST.buildTree (JavacAST.java:196)
at lombok.javac.JavacAST.buildTree (JavacAST.java:1)
at lombok.core.AST.buildWithField0 (AST.java:394)
at lombok.core.AST.buildWithField (AST.java:292)
at lombok.javac.JavacAST.drill (JavacAST.java:421)
at lombok.javac.JavacAST.buildStatementOrExpression (JavacAST.java:387)
at lombok.javac.JavacAST.buildTree (JavacAST.java:196)
at lombok.javac.JavacAST.buildTree (JavacAST.java:1)
at lombok.core.AST.buildWithField0 (AST.java:394)
at lombok.core.AST.buildWithField (AST.java:292)
at lombok.javac.JavacAST.drill (JavacAST.java:421)
at lombok.javac.JavacAST.buildStatementOrExpression (JavacAST.java:387)
at lombok.javac.JavacAST.buildTree (JavacAST.java:196)
at lombok.javac.JavacAST.buildTree (JavacAST.java:1)
at lombok.core.AST.buildWithField0 (AST.java:394)
at lombok.core.AST.buildWithField (AST.java:292)
at lombok.javac.JavacAST.drill (JavacAST.java:421)
at lombok.javac.JavacAST.buildStatementOrExpression (JavacAST.java:387)
at lombok.javac.JavacAST.buildTree (JavacAST.java:196)
at lombok.javac.JavacAST.buildTree (JavacAST.java:1)
at lombok.core.AST.buildWithField0 (AST.java:394)
at lombok.core.AST.buildWithField (AST.java:292)
at lombok.javac.JavacAST.drill (JavacAST.java:421)
I have tried updating the source and target with different versions in pom. But not succeeded.
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.0</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
</configuration>
</plugin>
</plugins>
Q1. The project doesn't have lombok configured. Is corretto8 internally uses lombok? If so how to exclude it while compiling?
Q2. I have seen some post (but doesn't give me a solution) that it may cause due to circular dependency classes. If that's the case is there any tool i can use to figure out the classes to refactor it?