Springboot...
Trying to run my application using terminal using command : 'mvn clean package -Dspring.profiles.active=dev -e'
Getting Error: Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.10.1:compile (default-compile) on project journalApp: Fatal error compiling: java.lang.ExceptionInInitializerError: com.sun.tools.javac.code.TypeTag :: UNKNOWN
Can anyone help with this?
19 Replies
β This post has been reserved for your question.
Hey @Batman! Please useTIP: Narrow down your issue to simple and precise questions to maximize the chance that others will reply in here./closeor theClose Postbutton above when your problem is solved. Please remember to follow the help guidelines. This post will be automatically marked as dormant after 300 minutes of inactivity.
Are you using any annotation processor?
What Java version are you using? Can you show the pom.xml?
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.10.1:compile (default-compile) on project journalApp: Fatal error compiling: java.lang.ExceptionInInitializerError: com.sun.tools.javac.code.TypeTag :: UNKNOWN -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.10.1:compile (default-compile) on project journalApp: Fatal error compiling
at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute2 (MojoExecutor.java:333)
at org.apache.maven.lifecycle.internal.MojoExecutor.doExecute (MojoExecutor.java:316)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:212)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:174)
at org.apache.maven.lifecycle.internal.MojoExecutor.access$000 (MojoExecutor.java:75)
at org.apache.maven.lifecycle.internal.MojoExecutor$1.run (MojoExecutor.java:162)
at org.apache.maven.plugin.DefaultMojosExecutionStrategy.execute (DefaultMojosExecutionStrategy.java:39)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:159)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:105)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:73)
at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:53)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:118)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:261)
at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:173)
at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:101)
this is the full log, what i got from chatgpt is that springboot application using old version of java8, while my system is having 24
Can you show the pom.xml as well as the output of
mvn -v?Apache Maven 3.9.11
Java version: 24.0.2
try updating lombok to version 1.18.42
just to let you know - I am learning Springboot
Is it a new project?
yes, from a youtube tutorial
Lombok generally doesn't work for newer Java versions. So if you use Lombok in your project, you have to use a Lombok version that's newer (= released later) than the Java version
You might want to learn from a recent tutorial that uses a recent Spring version
i.e. Spring Boot 3 or later
Spring Boot 2.x is no longer supported
Okay, and thanks it worked.
Yeah, so like I am new to springboot and have already half way down, now once its over i will switch to newer version, also at the end only he has updated version too, maybe the guy updated the configurations later.
If you are finished with your post, please close it.
If you are not, please ignore this message.
Note that you will not be able to send further messages here after this post have been closed but you will be able to create new posts.
I guess the video was released before JDK 24
current video I am on was uploaded 1 year back, am not sure what java version was thereπ
anyway thanks for letting me know and helping, was stuck like for an hour with this
if it was one year ago and not longer, it would be JDK 23 which was released in September 2024
There is a JDK release every 6 months
JDK 24 is supported since Lombok 1.18.38
but Lombok 1.18.34 only supported JDKs up to JDK 22
This is documented in Lombok's changelog if you are interested: https://projectlombok.org/changelog
Thanks for sharing and helping π
If you are finished with your post, please close it.
If you are not, please ignore this message.
Note that you will not be able to send further messages here after this post have been closed but you will be able to create new posts.
π€ Post marked as dormant
This post has been inactive for over 300 minutes, thus, it has been archived.
If your question was not answered yet, feel free to re-open this post or create a new one.
In case your post is not getting any attention, you can try to use /help ping.
Warning: abusing this will result in moderative actions taken against you.
Before your post will be closed, would you like to express your gratitude to any of the people who helped you? When you're done, click I'm done here. Close this post!.Post Closed
This post has been closed by <@658802265246793748>.