How I do for create the second engine ?
I created a class that is implemented the ApplicationRunner interface
The code of for create second engine was writed in the run method.
Here is the code
The database of the second engine was empty but camunda says :
2018-12-12 17:20:07,803 ERROR [restartedMain] o.c.b.e.context [BaseLogger.java:156] ENGINE-16004 Exception while closing command context:
### Error querying database. Cause: java.sql.SQLSyntaxErrorException: Table 'hikedu_default.ACT_GE_PROPERTY' doesn't exist
### The error may exist in org/camunda/bpm/engine/impl/mapping/entity/Property.xml
### The error may involve org.camunda.bpm.engine.impl.persistence.entity.PropertyEntity.selectProperty-Inline
### The error occurred while setting parameters
### SQL: select * from ACT_GE_PROPERTY where NAME_ = ?
### Cause: java.sql.SQLSyntaxErrorException: Table 'hikedu_default.ACT_GE_PROPERTY' doesn't exist
org.apache.ibatis.exceptions.PersistenceException:
### Error querying database. Cause: java.sql.SQLSyntaxErrorException: Table 'hikedu_default.ACT_GE_PROPERTY' doesn't exist
### The error may exist in org/camunda/bpm/engine/impl/mapping/entity/Property.xml
### The error may involve org.camunda.bpm.engine.impl.persistence.entity.PropertyEntity.selectProperty-Inline
### The error occurred while setting parameters
### SQL: select * from ACT_GE_PROPERTY where NAME_ = ?
### Cause: java.sql.SQLSyntaxErrorException: Table 'hikedu_default.ACT_GE_PROPERTY' doesn't exist
If i change the datasource of second engine to another mysql instance then camunda work all right.
New datasource config is (The port changed to 33306 that is a new mysql instance)
The exception says that the Camunda tables don’t exist in the schema you specified. You must create them before you start the engine. The scripts can be found in the Camunda distributions.
Thank you for your reply that is helped me so much.
But I still have a question about camunda.
I was think the camunda will create the tables automally if the tables is not exists in the database.
For make sure I am not wrong about this I test a lot. And finally I find camunda will not create the tables automally at the two schema of same database but will create the table automally only in one schema for each database.
So my question is why camunda will not create tables automally in two schema of same database.
And how I can do for make sure camunda will create tables in two schema of same database automally.
Thans you.
I have the same problem. Several camunda instances on the same postgres database, but with different schemas. The first spring boot camunda starts fine, the second gets the error which is mentioned above.
Yes. I was find the solution but that is not a good solution but any way that solved the promble.
Here is the solution
1.download the script of create tables from camunda doc
2.Run the script to each shema.
After the above steps done. Each schema will has the tables of camunda.
Becaue you created the tables before start your application So the application will not create them And will not throw error.
How to make sure camunda will automally create the tables to each shema ?
I am not find the answer.
But i know why the camunda will not create the tables to Each shema.
I was read a lot source code of camunda.
I find the canunda will search whole database that mean all shema to find out the tables is or not created.
When you only have one shema that is ok.
But if you have two or more then the camunda will throw you an error.
Imagen you have two shemas And the tables did not created to them.
When you start your application the camunda will seach all shema to find out tables is or not exist.
The answer is false then the camunda will create them to your first shema.
After This done the camunda will search whole shema again for to create them to your second shema.
But at This time the answer is true then the camunda will ignore your second shema.
And the camunda will send query to your two schema
The first will not throw error because the tables is exist the sql is not wrong.
When send query to your second schema the mybatis will throw error because the tables of camunda did not exist in your second schema.
And you are welcome. I am glad to helo you.
By the way my english is So bad forgive me please.
Then we will see how we should solve this. Making the schemas manually could be the solution, but, we are using openshift, and the we will have to remake them manually each time.
My english is so bad so I am not able to report this bug to camunda. But I hope someone will report this bug to camunda.
I think the final solution is camunda will take care this issue and fix it.