The Project example-camunda-custom-identity-provider dont work with spring-boot-starter 7.17.0

Hello,
I’m trying desperately to get the example project from example-camunda-custom-identity-provider running under the Camunda version and Spring-Boot-Starter version 7.17.0. Unfortunately, I keep getting some exceptions that I can not understand. The project compiles but spring-boot:run doesn’t work. Does anyone have a current version of the project with the latest versions? Attached is my maven file.


4.0.0
com.camunda.examples
example-camunda-custom-identity-service
1.0-SNAPSHOT

UTF-8 7.17.0 2.6.6 1.8 1.8 org.springframework spring-web org.springframework.boot spring-boot-starter-data-jpa compile org.camunda.bpm.springboot camunda-bpm-spring-boot-starter-rest ${camunda.spring-boot.version} org.camunda.bpm.springboot camunda-bpm-spring-boot-starter ${camunda.spring-boot.version} org.camunda.bpm camunda-engine compile org.camunda.bpm camunda-engine-spring compile org.camunda.commons camunda-commons-logging org.springframework.boot spring-boot-starter-test test junit junit 4.12 test org.projectlombok lombok 1.18.12 provided
<!-- API, java.xml.bind module -->
<dependency>
    <groupId>jakarta.xml.bind</groupId>
    <artifactId>jakarta.xml.bind-api</artifactId>
    <version>2.3.2</version>
</dependency>

<!-- Runtime, com.sun.xml.bind module -->
<dependency>
    <groupId>org.glassfish.jaxb</groupId>
    <artifactId>jaxb-runtime</artifactId>
    <version>2.3.2</version>
</dependency>



<dependency>
  <groupId>mysql</groupId>
  <artifactId>mysql-connector-java</artifactId>
  <version>8.0.20</version> 
  <scope>runtime</scope>
</dependency>
org.springframework.boot spring-boot-dependencies ${spring-boot.version} pom import org.camunda.bpm camunda-bom 7.17.0 import pom org.springframework.boot spring-boot-maven-plugin ${spring-boot.version}

Hi @ilyas ,

I think it would be helpful when you attach mentioned exceptions.
While some people might already guess the solution right out of the box, I could not :smiley:

Kind regards
Adagatiya

Hi,
here is the Stacktrace:

2022-09-19 08:17:49.381 ERROR 16944 — [ main] org.camunda.bpm.engine.persistence : ENGINE-03081 No startup lock property found in database
2022-09-19 08:17:49.389 ERROR 16944 — [ main] org.camunda.bpm.engine.context : ENGINE-16004 Exception while closing command context: historyLevel mismatch: configuration says HistoryLevelFull(name=full, id=3) and database says HistoryLevelAudit(name=audit, id=2)

org.camunda.bpm.engine.ProcessEngineException: historyLevel mismatch: configuration says HistoryLevelFull(name=full, id=3) and database says HistoryLevelAudit(name=audit, id=2)
at org.camunda.bpm.engine.impl.HistoryLevelSetupCommand.execute(HistoryLevelSetupCommand.java:60) ~[camunda-engine-7.17.0.jar:7.17.0]
at org.camunda.bpm.engine.impl.HistoryLevelSetupCommand.execute(HistoryLevelSetupCommand.java:34) ~[camunda-engine-7.17.0.jar:7.17.0]
at org.camunda.bpm.engine.impl.interceptor.CommandExecutorImpl.execute(CommandExecutorImpl.java:28) ~[camunda-engine-7.17.0.jar:7.17.0]
at org.camunda.bpm.engine.impl.interceptor.CommandContextInterceptor.execute(CommandContextInterceptor.java:110) ~[camunda-engine-7.17.0.jar:7.17.0]
at org.camunda.bpm.engine.spring.SpringTransactionInterceptor$1.doInTransaction(SpringTransactionInterceptor.java:72) ~[camunda-engine-spring-7.17.0.jar:7.17.0]
at org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:140) ~[spring-tx-5.3.18.jar:5.3.18]
at org.camunda.bpm.engine.spring.SpringTransactionInterceptor.execute(SpringTransactionInterceptor.java:70) ~[camunda-engine-spring-7.17.0.jar:7.17.0]
at org.camunda.bpm.engine.impl.interceptor.ProcessApplicationContextInterceptor.execute(ProcessApplicationContextInterceptor.java:70) ~[camunda-engine-7.17.0.jar:7.17.0]

Hi @ilyas ,

depending on which history level you need, you can configure the following configuration parameter camunda.bpm.historyLevel = full
or
camunda.bpm.historyLevel = audit
It seems your database is currently configured to use history level audit so you would need to either reprovision your database schema or change the configuration parameter.

Kind regards
Adagatiya

1 Like

Hi,
i configure this in two files, but it still not working…

applicationContext.xml:

<?xml version="1.0" encoding="UTF-8"?>

  <bean id="processEngineConfiguration"
    class="org.camunda.bpm.engine.spring.SpringProcessEngineConfiguration"
    <property name="history" value="audit" />
 </bean>                   

src/main/resources/META-INF/processes.xml:

<?xml version="1.0" encoding="UTF-8" ?>

<process-archive name="customIdService">
    <process-engine>default</process-engine>
    <properties>
        <property name="isDeleteUponUndeploy">false</property>
        <property name="isScanForProcessDefinitions">true</property>
    </properties>
</process-archive>

<process-engine name="default">
  <job-acquisition>default</job-acquisition>
  <configuration>org.camunda.bpm.engine.impl.cfg.StandaloneProcessEngineConfiguration</configuration>
  <datasource>java:jdbc/ProcessEngine</datasource>

  <properties>
    <property name="history">audit</property>
    <property name="databaseSchemaUpdate">true</property>
    <property name="authorizationEnabled">true</property>
    <property name="jobExecutorDeploymentAware">true</property>
  </properties>

</process-engine>

Hi,

i made it in Application.xml, and now the server started. But even if it shows me in the console:
o.s.b.w.embedded.tomcat.TomcatWebServer : Tomcat started on port(s): 8080 (http) with context path ‘/camunda’
when I type http://localhost:8080/camunda/ in the browser, it shows me Http Status 404 -NOT FOUND.
do you have any idea?
thanks
Best Regards

Hi @ilyas ,

using the spring boot starter the webapps should be available out-of-the-box.

Could you please try to reach “http://localhost:8080/camunda/app/” or “http://localhost:8080/camunda/app/welcome/”. The trailing slash in the end is neccessary or at least it was in my setup.

Kind regards
Adagatiya

Hi @Adagatiya
unfortunately neither works.
unfortunately neither works. Should I perhaps define an application-path in the @SpringBootApplication class?
thanks

Hi,

http://localhost:8080/engine-rest/user and http://localhost:8080/engine-rest/group works

When you connect your app to an existing DB, try to set the history level to “auto” … it will then just accept the existing history level.

Hi @jangalinski ,
the Tomcat started now , but it still an Error there:
org.camunda.bpm.engine.persistence : ENGINE-03081 No startup lock property found in database

maybe it is the reason why the page (“http://localhost:8080/camunda/app/ ) are not accessible ?
Thanks

I found The Problem, it was a missing spring-boot-starter-web dependency. Thanks

1 Like