I set up a spring boot application with flowable 6.8.0. Then, I created a simple test following this example flowable-engine/SpringJunitJupiterTest.java at flowable-6.8.0 · flowable/flowable-engine · GitHub. But when I run the test, this error is thrown before the test method (simpleProcessTest(…)) starts.
17:17:37.984 [SpringContextShutdownHook] DEBUG org.apache.ibatis.transaction.managed.ManagedTransaction - Opening JDBC Connection
17:17:37.985 [SpringContextShutdownHook] DEBUG org.flowable.engine.impl.persistence.entity.ExecutionEntityImpl.clearAllProcessInstanceLockTimes - ==> Preparing: update ACT_RU_EXECUTION set LOCK_TIME_ = null, LOCK_OWNER_ = null where LOCK_OWNER_ = ?
17:17:37.991 [SpringContextShutdownHook] ERROR org.flowable.common.engine.impl.interceptor.CommandContext - Error while closing command context
org.apache.ibatis.exceptions.PersistenceException:
### Error updating database. Cause: org.h2.jdbc.JdbcSQLSyntaxErrorException: Table "ACT_RU_EXECUTION" not found (this database is empty); SQL statement:
update ACT_RU_EXECUTION
set
LOCK_TIME_ = null,
LOCK_OWNER_ = null
where LOCK_OWNER_ = ? [42104-214]
### The error may exist in org/flowable/db/mapping/entity/Execution.xml
### The error may involve org.flowable.engine.impl.persistence.entity.ExecutionEntityImpl.clearAllProcessInstanceLockTimes
### The error occurred while executing an update
### SQL: update ACT_RU_EXECUTION set LOCK_TIME_ = null, LOCK_OWNER_ = null where LOCK_OWNER_ = ?
### Cause: org.h2.jdbc.JdbcSQLSyntaxErrorException: Table "ACT_RU_EXECUTION" not found (this database is empty); SQL statement:
update ACT_RU_EXECUTION
set
LOCK_TIME_ = null,
LOCK_OWNER_ = null
where LOCK_OWNER_ = ? [42104-214]
at org.apache.ibatis.exceptions.ExceptionFactory.wrapException(ExceptionFactory.java:30)
My pom is the following:
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.7.10</version>
<relativePath/> <!-- lookup parent from repository -->
</parent>
<properties>
<java.version>17</java.version>
<flowable.version>6.8.0</flowable.version>
<groovy.version>3.0.16</groovy.version>
</properties>
...
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-actuator</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>org.postgresql</groupId>
<artifactId>postgresql</artifactId>
<version>42.6.0</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-api</artifactId>
<version>5.9.3</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.h2database</groupId>
<artifactId>h2</artifactId>
<version>2.1.214</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-configuration-processor</artifactId>
<optional>true</optional>
</dependency>
<!--Nashorn engine-->
<dependency>
<groupId>org.openjdk.nashorn</groupId>
<artifactId>nashorn-core</artifactId>
<version>15.4</version>
</dependency>
<!--Groovy complemento-->
<dependency>
<groupId>org.codehaus.groovy</groupId>
<artifactId>groovy-jsr223</artifactId>
<version>${groovy.version}</version>
</dependency>
<dependency>
<groupId>org.codehaus.groovy</groupId>
<artifactId>groovy-json</artifactId>
<version>${groovy.version}</version>
</dependency>
<dependency>
<groupId>org.codehaus.groovy</groupId>
<artifactId>groovy-xml</artifactId>
<version>${groovy.version}</version>
</dependency>
<!-- Flowable -->
<dependency>
<groupId>org.flowable</groupId>
<artifactId>flowable-engine</artifactId>
<version>${flowable.version}</version>
</dependency>
<dependency>
<groupId>org.flowable</groupId>
<artifactId>flowable-spring-boot-starter</artifactId>
<version>${flowable.version}</version>
</dependency>
<dependency>
<groupId>org.flowable</groupId>
<artifactId>flowable-spring-boot-starter-rest</artifactId>
<version>${flowable.version}</version>
</dependency>
<dependency>
<groupId>org.flowable</groupId>
<artifactId>flowable-spring-configurator</artifactId>
<version>${flowable.version}</version>
</dependency>
<dependency>
<groupId>org.flowable</groupId>
<artifactId>flowable-http</artifactId>
<version>${flowable.version}</version>
</dependency>