Unable to create more than one database in same server (MySQL)

Hi Team,

Unable to create more than one database in same server in MySQL. We are getting below error.

Could anyone help me resolve this issue?

Caused by: org.apache.ibatis.exceptions.PersistenceException: 
### Error querying database.  Cause: java.sql.SQLSyntaxErrorException: Table 'omqadb1.act_ge_property' doesn't exist
### The error may exist in org/flowable/db/mapping/entity/Property.xml
### The error may involve org.flowable.engine.impl.persistence.entity.PropertyEntityImpl.selectProperty-Inline
### The error occurred while setting parameters
### SQL: select * from ACT_GE_PROPERTY where NAME_ = ?
### Cause: java.sql.SQLSyntaxErrorException: Table 'omqadb1.act_ge_property' doesn't exist
	at org.apache.ibatis.exceptions.ExceptionFactory.wrapException(ExceptionFactory.java:30) ~[mybatis-3.4.5.jar:3.4.5]
	at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:150) ~[mybatis-3.4.5.jar:3.4.5]
	at org.apache.ibatis.session.defaults.DefaultSqlSession.selectList(DefaultSqlSession.java:141) ~[mybatis-3.4.5.jar:3.4.5]
	at org.apache.ibatis.session.defaults.DefaultSqlSession.selectOne(DefaultSqlSession.java:77) ~[mybatis-3.4.5.jar:3.4.5]
	at org.flowable.common.engine.impl.db.DbSqlSession.selectById(DbSqlSession.java:234) ~[flowable-engine-common-6.3.1.jar:6.3.1]
	at org.flowable.common.engine.impl.db.DbSqlSession.selectById(DbSqlSession.java:218) ~[flowable-engine-common-6.3.1.jar:6.3.1]
	at org.flowable.engine.impl.db.ProcessDbSchemaManager.dbSchemaUpdate(ProcessDbSchemaManager.java:183) ~[flowable-engine-6.3.1.jar:6.3.1]
1 Like

What version of the Mysql JDBC driver are you using. If you are using the 8.x version, you can try with the 5.x version. You can check if the driver was detected or not before that stacktrace.

Hi @jorge.mora,

Thanks for quick help. After changing mysql-connector version from 8.x to 5.1.27 It fixed.

Below is my new dependency:

<dependency>
    <groupId>mysql</groupId>
    <artifactId>mysql-connector-java</artifactId>
    <version>5.1.27</version>
</dependency>

Just wanted to understand why with the latest version of mysql-connector-java its not working?

Hi,

This is something that we are investigating. Can you tell us which version of MySQL server you are using? Not only the version number, also if you are using anything different from the official MySQL server from Oracle.

Sorry for the inconveniences and thank you for your collaboration.
Jorge

@mtmanju for some reason there has been a change in some defaults of the MySQL JDBC Driver. More precisely in the nullCatalogMeansCurrent property.

In 5.1 the property default value is true. Which means that the catalog would match the current database in the URL. In 8.0 they changed this to false. Which means that it won’t match it.

In order to make this work on 8.0 you would need to add nullCatalogMeansCurrent=true to your JDBC URL.

See https://dev.mysql.com/doc/connector-j/5.1/en/connector-j-reference-configuration-properties.html
and https://dev.mysql.com/doc/connector-j/8.0/en/connector-j-reference-configuration-properties.html

In the meantime we are also going to look into if we can do something about this on our side.

6 Likes

Thanks @filiphr,

After changing the JDBC url as suggested it worked fine for me. Thanks a lot for the quick help.

Thanks,
Manjunath

I tried to add this property in JDBC url, it still gave the same error, however, I’m using postgresql instead of mysql.
Also, I noted that if a database has 2 schema, Schema-1 and Schema-2 and if Schema-1 has those 75 workflow tables and Schema-2 is empty, so if I switch to Schema-2 in my properties file, hoping that new tables will get created in this new Schema, it gives the same error described in post