Unable to start Flowable 6.4.0 with HSQLDB 2.4.1


#1

Hi all,

We are using Flowable 6.4.0 with Oracle / SqlServer without problem, but for the unit and integrations tests we have HSQLDB as database and Flowable fails to start with an empty database:

org.flowable.common.engine.api.FlowableException: couldn’t create db schema: create table ACT_RE_PROCDEF (
ID_ varchar(64) NOT NULL,
REV_ integer,
CATEGORY_ varchar(255),
NAME_ varchar(255),
KEY_ varchar(255) NOT NULL,
VERSION_ integer NOT NULL,
DEPLOYMENT_ID_ varchar(64),
RESOURCE_NAME_ varchar(4000),
DGRM_RESOURCE_NAME_ varchar(4000),
DESCRIPTION_ varchar(4000),
HAS_START_FORM_KEY_ bit,
HAS_GRAPHICAL_NOTATION_ bit,
SUSPENSION_STATE_ integer,
TENANT_ID_ varchar(255) default ‘’,
DERIVED_FROM_ varchar(64),
DERIVED_FROM_ROOT_ varchar(64),
DERIVED_VERSION_ integer NOT NULL default 0,
ENGINE_VERSION_ varchar(255),
primary key (ID_)
)

The create table statement as present in flowable.hsql.create.engine.sql has a default 0 value for the DERIVED_VERSION_ column which is not accepted by HSQLDB (tested with versions 2.3.2 and 2.4.1)
The correct format for a default value with NOT NULL in HSQLDB is
DERIVED_VERSION_ integer default 0 NOT NULL,

The issue can be solved by changing the query into:

create table ACT_RE_PROCDEF (
ID_ varchar(64) NOT NULL,
REV_ integer,
CATEGORY_ varchar(255),
NAME_ varchar(255),
KEY_ varchar(255) NOT NULL,
VERSION_ integer NOT NULL,
DEPLOYMENT_ID_ varchar(64),
RESOURCE_NAME_ varchar(4000),
DGRM_RESOURCE_NAME_ varchar(4000),
DESCRIPTION_ varchar(4000),
HAS_START_FORM_KEY_ bit,
HAS_GRAPHICAL_NOTATION_ bit,
SUSPENSION_STATE_ integer,
TENANT_ID_ varchar(255) default ‘’,
DERIVED_FROM_ varchar(64),
DERIVED_FROM_ROOT_ varchar(64),
DERIVED_VERSION_ integer default 0 NOT NULL ,
ENGINE_VERSION_ varchar(255),
primary key (ID_)
);


#2

Hi,

We use H2 for that kind of set up, which works fine. Maybe someone else that uses HSQLDB has some answers.

Regards
Paul.