Hi,
I'm running Activiti ProcessEngine embedded inside my Java application.
I've succeeded in doing that.
Works GREAT by the way. EXACTLY what I want.
However, my initial implementation is running against Activiti tables installed in the "public" schema.
When I try to use Activiti tables inside my own schema ("gdb"), I get the following error during application startup:
<blockcode>
—-
2015-08-25 19:01:38.712 INFO 3779 — [ main] o.a.engine.impl.ProcessEngineImpl : ProcessEngine default created
2015-08-25 19:01:38.714 INFO 3779 — [ main] o.a.engine.impl.jobexecutor.JobExecutor : Starting up the JobExecutor[org.activiti.engine.impl.jobexecutor.DefaultJobExecutor].
2015-08-25 19:01:38.715 INFO 3779 — [ Thread-2] o.a.e.i.j.AcquireJobsRunnableImpl : JobExecutor[org.activiti.engine.impl.jobexecutor.DefaultJobExecutor] starting to acquire jobs
2015-08-25 19:01:38.822 INFO 3779 — [ main] o.a.e.impl.bpmn.deployer.BpmnDeployer : Processing resource diagrams/one-task-process.bpmn20.xml
2015-08-25 19:01:39.058 WARN 3779 — [ main] ationConfigEmbeddedWebApplicationContext : Exception encountered during context initialization - cancelling refresh attempt
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'activitiRepositoryService' defined in com.sm.gis.gdm.GdmServer: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.activiti.engine.RepositoryService]: Factory method 'activitiRepositoryService' threw exception; nested exception is org.apache.ibatis.exceptions.PersistenceException:
### Error querying database. Cause: org.postgresql.util.PSQLException: ERROR: relation "act_re_procdef" does not exist
Position: 53
### The error may exist in org/activiti/db/mapping/entity/Job.xml
### The error may involve org.activiti.engine.impl.persistence.entity.JobEntity.selectJobByTypeAndProcessDefinitionKeyNoTenantId-Inline
### The error occurred while setting parameters
### SQL: select J.* from gdb.ACT_RU_JOB J inner join ACT_RE_PROCDEF P on J.PROC_DEF_ID_ = P.ID_ where J.HANDLER_TYPE_ = ? and P.KEY_ = ? and (P.TENANT_ID_ = '' or P.TENANT_ID_ is null)
### Cause: org.postgresql.util.PSQLException: ERROR: relation "act_re_procdef" does not exist
—–
</blockcode>
The error occurs during during application startup.
I'm using…
. Activiti 5.18.0
. Postgres 9.4
. Spring Boot 1.2.5
I dropped all the Activiti tables from the "public" schema.
I created all the Activiti tables, indexes, etc. using the DDL supplied in the 5.18.0 download. (I edited the DDL to prefix the tables with "gdb.".)
I have confirmed that "act_re_procdef" does not exist and that "gdb.act_re_procdef" does.
I'm using the following configuration…
<blockcode>
SpringProcessEngineConfiguration config = new SpringProcessEngineConfiguration();
config.setTransactionManager( transactionManager() );
config.setDataSource( atomikosJdbcConnectionFactory() );
config.setDatabaseType("postgres");
config.setDatabaseSchemaUpdate("none");
config.setDatabaseSchema("gdb");
config.setDatabaseTablePrefix("gdb.");
config.setDeploymentMode("default");
config.setJobExecutorActivate(true);
</blockcode>
I may be configuring something wrong… but I'm a bit confused because, looking at the SQL in the exception message, the "gdb" prefix was applied to one table ("from gdb.ACT_RU_JOB"), but not to another ("inner join ACT_RE_PROCDEF").
Any guidance would be appreciated.
Thanks!
PS. I'm new to Activiti and to this forum. I believe this existing topic was the best place to post my question, but if I should post it elsewhere, just let me know. Thanks.