Camunda web app spring boot project start failed


#1

Java version: JDK 11
Spring boot version: 2.0.2.RELEASE
Camunda version: 7.9.0
Camunda spring boot version: 3.0.0

When i startup my camunda spring boot project, it encounters the following error:

Error: Could not find or load main class See.m2\repository\org\camunda\bpm\springboot\camunda-bpm-spring-boot-starter\3.0.0\camunda-bpm-spring-boot-starter-3.0.0.jar;C:\Users\Darren
Caused by: java.lang.ClassNotFoundException: See/m2\repository\org\camunda\bpm\springboot\camunda-bpm-spring-boot-starter\3/0/0\camunda-bpm-spring-boot-starter-3/0/0/jar;C:\Users\Darren

I have confirmed that camunda-bpm-spring-boot-starter-3.0.0.jar is inside my .m2 folder. Can help to look into this issue?

Attached here are the pom.xml for both camunda-bpm-service-v1 and customized-camunda-webapp-webjar-lib.

Please help.

Thankscamunda-bpm-service-v1.xml (3.5 KB)
customized-camunda-webapp-webjar-lib.xml (5.3 KB)


#2

JDK 11 is not supported with camunda spring boot starter 3.0.0, you need to switch to 3.2.0, Camunda version 7.10, spring boot 2.1.1
https://docs.camunda.org/manual/7.10/user-guide/spring-boot-integration/version-compatibility/


#3

Tested with JDK 10, camunda spring boot starter 3.0.0, Camunda version 7.9.0 and spring boot 2.0.2, same error too when startup in STS.


#4

starter 3.0.0 works only with java <= 8. If you need 10 or 11, you will have to upgrade like Yana said.


#5

Hi

I am trying out this tutorial with this jdk/runtime:

openjdk version “11.0.2” 2019-01-15
OpenJDK Runtime Environment 18.9 (build 11.0.2+9)
OpenJDK 64-Bit Server VM 18.9 (build 11.0.2+9, mixed mode)

When trying to build, it works fine. But when I run it, it fails. Could you please add the correct POM dependencies to run the example/s:


#6

You will need spring Boot 2.1.1 , camunda 7.10 and starter 3.2 for Java 11


#7

For version compatibility check this.

https://docs.camunda.org/manual/7.10/user-guide/spring-boot-integration/version-compatibility/


#8

Thanks for pointing out on the version incompatibility. But the problem only happened when starting the camunda project through STS boot dashboard. If i use command prompt to start the spring boot project java -jar camunda-bpm-service-v1.jar, there is no issue in startup.


#9

Are you using any JVM args? can you provide your runtime jvm args for application startup parameters?


#10

Hi aravindhrs,

There is none. You can refer to the attached screenshot on both the error and also the command prompt. The command prompt case will start successfully.


#11

@seedarren, please provide complete error message.

It seems some dependency issues or classpath issues for dependencies.


#12

Hi aravindhrs,

The complete error is as follow:

Error: Could not find or load main class See.m2\repository\org\camunda\bpm\springboot\camunda-bpm-spring-boot-starter\3.0.0\camunda-bpm-spring-boot-starter-3.0.0.jar;C:\Users\Darren
Caused by: java.lang.ClassNotFoundException: See/m2\repository\org\camunda\bpm\springboot\camunda-bpm-spring-boot-starter\3/0/0\camunda-bpm-spring-boot-starter-3/0/0/jar;C:\Users\Darren

FYI, i also tested with spring boot version 2.1.1.RELEASE, camunda spring boot starter 3.2.0, camunda version to 7.10.0 together with adopt open JDK 11, the same error happened as below:

Error: Could not find or load main class See.m2\repository\org\camunda\bpm\springboot\camunda-bpm-spring-boot-starter\3.2.0\camunda-bpm-spring-boot-starter-3.2.0.jar;C:\Users\Darren
Caused by: java.lang.ClassNotFoundException: See/m2\repository\org\camunda\bpm\springboot\camunda-bpm-spring-boot-starter\3/2/0\camunda-bpm-spring-boot-starter-3/2/0/jar;C:\Users\Darren


#13

Try build your application. Make sure the scope is set to compile.

And also share your pom.xml/build.gradle file.

Classloader is not able to find the class in the classpath. How did you added your dependencies to the project?

For dependencies, you must specify maven repo.


#14

pom.xml (3.5 KB)
Here is the pom file and the scope by default is compile. I have maven update in STS and perform clean and build. Any idea to troubleshoot?


#15

I just wonder is it the issue caused by my pom has camunda-bpm-spring-boot-starter as compile dependencies but at the same time the pom file point to parent pom of spring-boot-starter-parent?