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

Maven build error on Java 21 #15

Open
2 tasks done
junsjang opened this issue Nov 1, 2024 · 2 comments
Open
2 tasks done

Maven build error on Java 21 #15

junsjang opened this issue Nov 1, 2024 · 2 comments

Comments

@junsjang
Copy link

junsjang commented Nov 1, 2024

Note: This is just a template, so feel free to use/remove the unnecessary things

Description

  • Type: Bug
  • Priority: Minor

Bug

Expected behavior
Compiles without any errors

Actual behavior

> mvn clean compile assembly:single
[INFO] Scanning for projects...
[INFO]
[INFO] -------------------------< AWS:GameLiftAgent >--------------------------
[INFO] Building GameLiftAgent 1.0
[INFO]   from pom.xml
[INFO] --------------------------------[ jar ]---------------------------------
[INFO]
[INFO] --- clean:3.2.0:clean (default-clean) @ GameLiftAgent ---
[INFO]
[INFO] --- resources:3.3.1:resources (default-resources) @ GameLiftAgent ---
[INFO] skip non existing resourceDirectory /Users/junsjang/Dev/gametech/amazon-gamelift-agent/src/main/resources
[INFO]
[INFO] --- compiler:3.11.0:compile (default-compile) @ GameLiftAgent ---
[INFO] Changes detected - recompiling the module! :source
[INFO] Compiling 126 source files with javac [debug target 17] to target/classes
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  1.580 s
[INFO] Finished at: 2024-11-01T14:34:10+09:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.11.0:compile (default-compile) on project GameLiftAgent: Fatal error compiling: java.lang.NoSuchFieldError: Class com.sun.tools.javac.tree.JCTree$JCImport does not have member field 'com.sun.tools.javac.tree.JCTree qualid' -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException

Steps to reproduce

> java -version
java version "21.0.2" 2024-01-16 LTS
Java(TM) SE Runtime Environment (build 21.0.2+13-LTS-58)
Java HotSpot(TM) 64-Bit Server VM (build 21.0.2+13-LTS-58, mixed mode, sharing)
> mvn -version
Apache Maven 3.9.8 (36645f6c9b5079805ea5009217e36f2cffd34256)
Maven home: /opt/homebrew/Cellar/maven/3.9.8/libexec
Java version: 22.0.2, vendor: Homebrew, runtime: /opt/homebrew/Cellar/openjdk/22.0.2/libexec/openjdk.jdk/Contents/Home
Default locale: ko_KR, platform encoding: UTF-8
OS name: "mac os x", version: "14.7", arch: "aarch64", family: "mac"
> mvn clean compile assembly:single

Enhancement\Feature Request

Justification - why does the library need this feature?

Suggested enhancement


Question

  • Read through all relevant documentation.
  • Make sure that you have searched through previous issues (incase this is to be a duplicate).
@junsjang
Copy link
Author

junsjang commented Nov 1, 2024

This issue can be fixed when upgrading lombok package's minor version according to https://howtodoinjava.com/lombok/lombok-nosuchfielderror-error/.

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

2 participants
@junsjang and others