1
votes

Following the quick-start guide, i'm facing a really annoying behavior. I get the following error : java.sql.SQLSyntaxErrorException: Table 'mydatabase.ACT_GE_PROPERTY' doesn't exist

Here is the simple code I use, giving a working datasource (MySQL database 'mydatabase')

ProcessEngineConfiguration cfg = new StandaloneProcessEngineConfiguration()
  .setDatabaseSchemaUpdate(ProcessEngineConfiguration.DB_SCHEMA_UPDATE_TRUE)
  .setDataSource(ds);

processEngine = cfg.buildProcessEngine();

Basically Activiti is not creating any of its tables as it should do.

Debugging it, i found that Activiti check if ACT_RU_EXECUTION exists to decide to create tables or not. To check this table, it calls "isTablePresent(String tableName)" This function seems to be misfunctionning with MySQL if another database has Activiti enabled (in my environment I have an Alfresco database on the same MySQL instance) : querying databaseMetaData.getTables() gives a wrong result (Table alfresco.ACT_RU_EXECUTION) instead of nothing.

I tried to add some table-prefix and/or catalog parameters to ProcessEngineConfiguration. Setting a catalog makes databaseMetaData.getTables() give a correct result, so Activiti tables are created in 'mydatabase', but gives an exception later when Activiti try to connect to database using a catalog (that mysql does not support).

Same result with older (5.5) and newer (5.7) mysql versions. Has anybody a workaround/correct configuration to propose ? I cannot just change database rights so db user would not see alfresco database.

I suppose a change-request should be made to make boolean "isTablePresent(String tableName)" filter on catalog when database-type is MySQL.

Regards

1

1 Answers

3
votes

After some searches in GitHub issues, i found something similar.

If I add "nullCatalogMeansCurrent=true" to connection's url, it's working. Only useful for recent version of connector/j