AnsweredAssumed Answered

Tables missing for component(s) engine, history, identity

Question asked by rolf on Dec 17, 2013
Latest reply on Dec 18, 2013 by rolf
Hello!

I'm new to activiti and need some help…

I want to integrate activiti into an existing oracle 11 database.
I've created a new schema "activiti" with all the tables.

I must log on to the databse with a specific user e.g. "SUPPORT_USER".

I use this configuration:

setDatabaseSchemaUpdate(false);
setDatabaseSchema("ACTIVITI");
setDatabaseTablePrefix("ACTIVITI.");

I get this exception:
org.activiti.engine.ActivitiException: Activiti database problem: Tables missing for component(s) engine, history, identity

The problem is in DbSqlSession:
- dbSchemaCheckVersion calls "getDbVersion()" to get the version:
select VALUE_ from ACTIVITI.ACT_GE_PROPERTY where NAME_ = 'schema.version'
-> "5.14" is returned

- then "isEngineTablePresent()" is called which calles "isTablePresent()"
This code is executed:
tables = databaseMetaData.getTables(this.connectionMetadataDefaultCatalog, schema, tableName, JDBC_METADATA_TABLE_TYPES);

In my case this looks like this:
tables = databaseMetaData.getTables(null, "ACTIVITI", "ACTIVITI.ACT_RU_EXECUTION", JDBC_METADATA_TABLE_TYPES);

-> In Oracle 11 this does not work! The tables are not returned!
It should look like this:
tables = databaseMetaData.getTables(null, "ACTIVITI", "ACT_RU_EXECUTION", JDBC_METADATA_TABLE_TYPES);
The tableName parameter must not include the schema name!


So I the table perfix must be set to get the version in "getDbVersion()" but it must not be be set in "getTables(…)"

How can I fix this?

Another question:
Why is it necessary to check the DB every time the engine is created?
Could you implement a flag to configure if the check should be performed?

Thanks for you help!

Rolf






Outcomes