Error when running Maven on a new Project

Good day ,

I am new in Camunda ,

Can you please help me to identify what could be causing the error below ,

I followed the steps on the course ,

Please assist ,

"C:\Program Files\Java\jdk1.8.0_221\bin\java.exe" -Dmaven.multiModuleProjectDirectory=C:\Users\nt69765\Downloads\LearningProject\LearningProject -Djansi.passthrough=true "-Dmaven.home=C:\Users\nt69765\AppData\Local\JetBrains\IntelliJ IDEA 2024.2\plugins\maven\lib\maven3" "-Dclassworlds.conf=C:\Users\nt69765\AppData\Local\JetBrains\IntelliJ IDEA 2024.2\plugins\maven\lib\maven3\bin\m2.conf" "-Dmaven.ext.class.path=C:\Users\nt69765\AppData\Local\JetBrains\IntelliJ IDEA 2024.2\plugins\maven\lib\maven-event-listener.jar" "-javaagent:C:\Users\nt69765\AppData\Local\JetBrains\IntelliJ IDEA 2024.2\lib\idea_rt.jar=55412:C:\Users\nt69765\AppData\Local\JetBrains\IntelliJ IDEA 2024.2\bin" -Dfile.encoding=UTF-8 -classpath "C:\Users\nt69765\AppData\Local\JetBrains\IntelliJ IDEA 2024.2\plugins\maven\lib\maven3\boot\plexus-classworlds-2.8.0.jar;C:\Users\nt69765\AppData\Local\JetBrains\IntelliJ IDEA 2024.2\plugins\maven\lib\maven3\boot\plexus-classworlds.license" org.codehaus.classworlds.Launcher -Didea.version=2024.2 install
[INFO] Scanning for projects...
[INFO]
[INFO] ----------------< com.example.workflow:LearningProject >----------------
[INFO] Building LearningProject 1.0.0-SNAPSHOT
[INFO] from pom.xml
[INFO] --------------------------------[ jar ]---------------------------------
[INFO]
[INFO] --- resources:3.3.1:resources (default-resources) @ LearningProject ---
[INFO] Copying 2 resources from src\main\resources to target\classes
[INFO]
[INFO] --- compiler:3.13.0:compile (default-compile) @ LearningProject ---
[INFO] Recompiling the module because of changed source code.
[INFO] Compiling 1 source file with javac [debug target 17] to target\classes
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 5.409 s
[INFO] Finished at: 2024-08-13T19:42:54+02:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.13.0:compile (default-compile) on project LearningProject: Fatal error compiling: invalid target release: 17 -> [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

Process finished with exit code 1

Pom file details :
4.0.0

com.example.workflow
LearningProject
1.0.0-SNAPSHOT

UTF-8 17 17 org.springframework.boot spring-boot-dependencies 3.2.2 pom import

  <dependency>
    <groupId>org.camunda.bpm</groupId>
    <artifactId>camunda-bom</artifactId>
    <version>7.21.0</version>
    <scope>import</scope>
    <type>pom</type>
  </dependency>
</dependencies>

org.camunda.bpm.springboot camunda-bpm-spring-boot-starter-rest

<dependency>
  <groupId>org.camunda.bpm.springboot</groupId>
  <artifactId>camunda-bpm-spring-boot-starter-webapp</artifactId>
</dependency>

<dependency>
  <groupId>org.camunda.bpm</groupId>
  <artifactId>camunda-engine-plugin-spin</artifactId>
</dependency>

<dependency>
  <groupId>org.camunda.spin</groupId>
  <artifactId>camunda-spin-dataformat-all</artifactId>
</dependency>

<dependency>
  <groupId>com.h2database</groupId>
  <artifactId>h2</artifactId>
</dependency>

<dependency>
  <groupId>org.springframework.boot</groupId>
  <artifactId>spring-boot-starter-jdbc</artifactId>
</dependency>

org.springframework.boot spring-boot-maven-plugin 3.2.2

Hi, and welcome to the forum!

I believe this error indicates that you have an incompatible version of java that you’re using to compile to project. Since it’s trying to use Java 17 components, Java 8 doesn’t know what to do with it.

Try it again with Java 17 and see if that improves things.

1 Like

I changed to V17, and it worked , thanks a lot