AnsweredAssumed Answered

Problem with DB2 Support in 5.4

Question asked by saatsch on Apr 8, 2011
Latest reply on Apr 11, 2011 by frederikheremans1
Hey all !

when running
ant db.create

I got the following Error:

     [java] org.activiti.engine.ActivitiException: couldn't deduct database type from database product name 'DB2/LINUXZ64'
     [java]     at org.activiti.engine.impl.cfg.ProcessEngineConfigurationImpl.initDatabaseType(
     [java]     at org.activiti.engine.impl.cfg.ProcessEngineConfigurationImpl.initDataSource(
     [java]     at org.activiti.engine.impl.cfg.ProcessEngineConfigurationImpl.init(
     [java]     at org.activiti.engine.impl.cfg.ProcessEngineConfigurationImpl.buildProcessEngine(
     [java]     at org.activiti.engine.ProcessEngines.buildProcessEngine(
     [java]     at org.activiti.engine.ProcessEngines.initProcessEnginFromResource(
     [java]     at org.activiti.engine.ProcessEngines.init(
     [java]     at org.activiti.engine.ProcessEngines.getProcessEngine(
     [java]     at org.activiti.engine.ProcessEngines.getDefaultProcessEngine(
     [java]     at org.activiti.engine.impl.db.DbSchemaUpdate.main(

I think you should add this database type to the databaseTypeMappings here:

Anyway, after some hacking, I got it to work.
But I think I have found a bug here:

where it says:
create table ACT_ID_INFO (
    ID_ varchar(64),
    REV_ integer,
    USER_ID_ varchar(64),
    TYPE_ varchar(64),
    KEY_ varchar(255),
    VALUE_ varchar(255),
    PARENT_ID_ varchar(255),
    primary key (ID_)

You should declare the column ID_ with NOT NULL, because DB2 cannot have a column in the primary key, where null values are allowed. See also

Greets, and keep up the good work !