cancel
Showing results for 
Search instead for 
Did you mean: 

Activiti Multitenant + Postgres

mario_gallo
Champ in-the-making
Champ in-the-making
Hi,

I'm trying to implement a solution based on Activiti 5.19.0 and PostgreSQL with multi-tenancy support. The solution works well with one schema, but when i'm going to create another tenant I got the following exception:

00:32:19 | DEBUG | http-bio-9966-exec-1 | o.s.w.s.m.m.a.ExceptionHandlerExceptionResolver | Resolving exception from handler [public void com.newco.teamwork2.activiti.controller.TenantController.registerTenant(com.newco.teamwork2.activiti.dto.TenantDTO) throws java.sql.SQLException]: org.apache.ibatis.exceptions.PersistenceException:
### Error querying database.  Cause: org.postgresql.util.PSQLException: ERRORE: la relazione "act_ge_property" non esiste
  Posizione: 20
### The error may exist in org/activiti/db/mapping/entity/Property.xml
### The error may involve defaultParameterMap
### The error occurred while setting parameters
### SQL: select VALUE_ from ACT_GE_PROPERTY where NAME_ = 'schema.version'
### Cause: org.postgresql.util.PSQLException: ERRORE: la relazione "act_ge_property

I create one datasource for tenant with the search path included in it. I use the property currentSchema, because i'm on Postgresql 9.4.

Any clue?

Thanks in advance.
1 REPLY 1

martin_grofcik
Confirmed Champ
Confirmed Champ
Hi Mario,

it seems that property table is not created in the second schema.
Is it possible to reproduce the issue in the jUnit test?
https://forums.activiti.org/content/sticky-how-write-unit-test

Regards
Martin