Improve exception analysis when no tables are present

Description

In DbSqlSessionFactory, following section should be changed to accomodate the different databases that can throw different exception messages:

if ((exceptionMessage.indexOf("Table") != -1) && (exceptionMessage.indexOf("not found") != -1)) {
throw new ActivitiException(
"no activiti tables in db. set property db.schema.strategy=create-drop in activiti.properties for automatic schema creation", e);
} else {
if (e instanceof RuntimeException) {
throw (RuntimeException) e;
} else {
throw new ActivitiException("couldn't get db schema version", e);
}
}

Michael reported following exception:
Error querying database. Cause: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Table 'XXXXXX.act_ge_property' doesn't exist

Assignee

Frederik Heremans

Reporter

Tom Baeyens

Labels

None

Components

Fix versions

Priority

Major
Configure