cancel
Showing results for 
Search instead for 
Did you mean: 

How to configure Activiti with AS400/DB2

nxd1184
Champ in-the-making
Champ in-the-making
databaseTypeMappings.setProperty("H2","h2");
    databaseTypeMappings.setProperty("MySQL","mysql");
    databaseTypeMappings.setProperty("Oracle","oracle");
    databaseTypeMappings.setProperty("PostgreSQL","postgres");
    databaseTypeMappings.setProperty("Microsoft SQL Server","mssql");
    databaseTypeMappings.setProperty("DB2","db2");
    databaseTypeMappings.setProperty("DB2","db2");
    databaseTypeMappings.setProperty("DB2/NT","db2");
    databaseTypeMappings.setProperty("DB2/NT64","db2");
    databaseTypeMappings.setProperty("DB2 UDP","db2");
    databaseTypeMappings.setProperty("DB2/LINUX","db2");
    databaseTypeMappings.setProperty("DB2/LINUX390","db2");
    databaseTypeMappings.setProperty("DB2/LINUXX8664","db2");
    databaseTypeMappings.setProperty("DB2/LINUXZ64","db2");
    databaseTypeMappings.setProperty("DB2/400 SQL","db2");
    databaseTypeMappings.setProperty("DB2/6000","db2");
    databaseTypeMappings.setProperty("DB2 UDB iSeries","db2");
    databaseTypeMappings.setProperty("DB2/AIX64","db2");
    databaseTypeMappings.setProperty("DB2/HPUX","db2");
    databaseTypeMappings.setProperty("DB2/HP64","db2");
    databaseTypeMappings.setProperty("DB2/SUN","db2");
    databaseTypeMappings.setProperty("DB2/SUN64","db2");
    databaseTypeMappings.setProperty("DB2/PTX","db2");
    databaseTypeMappings.setProperty("DB2/2","db2");

"databaseTypeMappings.setProperty("DB2 UDB iSeries","db2");" I think it should be DB2 UDB AS400 instead. If I use jt400 to connect AS400/DB2 then Database Product Name is "DB2 UDB AS400". Please correct me or advise how to config Activiti with AS400/DB2
9 REPLIES 9

trademak
Star Contributor
Star Contributor
We can of course add DB2 UDB AS400 to the mapping list. Would that solve your issue?

Best regards,

nxd1184
Champ in-the-making
Champ in-the-making
Below are db properties, I create schema activiti in AS/400 DB2 and when I run activiti-explorer (deploy in tomcat 7 on windows 7) then exception is "couldn't deduct database type from database product name DB2 UDB for AS/400".

db=db2
jdbc.driver=com.ibm.as400.access.AS400JDBCDriver
jdbc.url=jdbc:as400://192.168.0.54/activiti
jdbc.username=username
jdbc.password=password

trademak
Star Contributor
Star Contributor
I've added DB2 UDB AS400 to the mapping list.

Best regards,

nxd1184
Champ in-the-making
Champ in-the-making
please change databaseTypeMappings.setProperty("DB2 UDB AS400", "db2") to databaseTypeMappings.setProperty("DB2 UDB for AS/400", "db2");

nxd1184
Champ in-the-making
Champ in-the-making
I checked out source code of version 5.15.1 and add "DB2 UDB for AS/400" and it works but after activiti tables have been created then spring transaction commit failed and roll back everything (means activiti tables are deleted)

nxd1184
Champ in-the-making
Champ in-the-making
We're also put jt400 (maven) into pom.xml so that we can use AS/400 DB2 Driver

trademak
Star Contributor
Star Contributor
So, adding the additional mapping doesn't solve it? Is there a specific error message logged?

nxd1184
Champ in-the-making
Champ in-the-making
Adding the additional mapping solve AS/400 DB2 connection, but now, I'm facing activiti tables can not create automatically issue. When I debug on class: SpringTransactionInterceptor on the line "return next.execute(config, command)" I check in database and the tables still exists but if I step over this step then activiti tables are deleted.

trademak
Star Contributor
Star Contributor
How do you test this? Do you have a unit test? Can you share the code and the Activiti Engine configuration you are using?

Best regards,