After Migrating to MySQL Error for Business Data Model

Hi,

After migrating to MySQL databases successfully (one for Bonita and another one for BDM) I defined a Business Data Model "Claim" to do a test and I'm getting following error. In setup/database.properties I have modified the reference to MySQL databases for both. However the web-portal is accessible now. It looks like it's specifically still searching for H2 db when deploying the BDM or during Bonita Studio startup. I wonder whether is there any other places that we need to change the configuration. Your reply is much appreciated.

07-Jul-2020 21:10:34.554 INFO [http-nio-8080-exec-3] org.bonitasoft.engine.log.technical.TechnicalLoggerSLF4JImpl.log THREAD_ID=45 | HOSTNAME=SUJITHT-W10DT | TENANT_ID=1 | Updating classes: [com.company.model.Claim]

07-Jul-2020 21:10:34.565 WARN [http-nio-8080-exec-3] org.hibernate.dialect.H2Dialect. HHH000431: Unable to determine H2 database version, certain features may not work

07-Jul-2020 21:10:34.581 ERROR [http-nio-8080-exec-3] org.hibernate.tool.hbm2ddl.SchemaUpdate.execute HHH000319: Could not get database metadata

    java.sql.SQLSyntaxErrorException: Unknown table 'sequences' in information_schema

        at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:120)

        at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:97)

        at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:122)

        at com.mysql.cj.jdbc.StatementImpl.executeQuery(StatementImpl.java:1218)

        at org.apache.tomcat.dbcp.dbcp2.DelegatingStatement.executeQuery(DelegatingStatement.java:310)

        at org.apache.tomcat.dbcp.dbcp2.DelegatingStatement.executeQuery(DelegatingStatement.java:310)

        at org.hibernate.tool.hbm2ddl.DatabaseMetadata.initSequences(DatabaseMetadata.java:178)

        at org.hibernate.tool.hbm2ddl.DatabaseMetadata.(DatabaseMetadata.java:92)

        at org.hibernate.tool.hbm2ddl.DatabaseMetadata.(DatabaseMetadata.java:84)

        at org.hibernate.tool.hbm2ddl.SchemaUpdate.execute(SchemaUpdate.java:221)

        at org.bonitasoft.engine.business.data.impl.SchemaManagerUpdate.update(SchemaManagerUpdate.java:89)

        at org.bonitasoft.engine.business.data.impl.BusinessDataModelRepositoryImpl.update(BusinessDataModelRepositoryImpl.java:183)

        at org.bonitasoft.engine.business.data.impl.BusinessDataModelRepositoryImpl.createAndDeployServerBDMJar(BusinessDataModelRepositoryImpl.java:175)

        at org.bonitasoft.engine.business.data.impl.BusinessDataModelRepositoryImpl.install(BusinessDataModelRepositoryImpl.java:160)

        at org.bonitasoft.engine.api.impl.TenantAdministrationAPIImpl.installBusinessDataModel(TenantAdministrationAPIImpl.java:156)

        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

        at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)

        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)

        at java.lang.reflect.Method.invoke(Unknown Source)

        at org.bonitasoft.engine.api.impl.ServerAPIImpl.invokeAPI(ServerAPIImpl.java:427)

        at org.bonitasoft.engine.api.impl.ServerAPIImpl.lambda$invokeAPIInTransaction$1(ServerAPIImpl.java:395)

        at org.bonitasoft.engine.transaction.JTATransactionServiceImpl.executeInTransaction(JTATransactionServiceImpl.java:286)

        at org.bonitasoft.engine.api.impl.ServerAPIImpl.invokeAPIInTransaction(ServerAPIImpl.java:391)

        at org.bonitasoft.engine.api.impl.ServerAPIImpl.invokeAPI(ServerAPIImpl.java:265)

        at org.bonitasoft.engine.api.impl.ServerAPIImpl.invokeMethod(ServerAPIImpl.java:121)

        at org.bonitasoft.engine.api.internal.servlet.HttpAPIServletCall.doPost(HttpAPIServletCall.java:112)

        at org.bonitasoft.engine.api.internal.servlet.HttpAPIServlet.doPost(HttpAPIServlet.java:36)

        at javax.servlet.http.HttpServlet.service(HttpServlet.java:660)

        at javax.servlet.http.HttpServlet.service(HttpServlet.java:741)

        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231)

        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)

        at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)

        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)

        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)

        at org.tuckey.web.filters.urlrewrite.RuleChain.handleRewrite(RuleChain.java:176)

        at org.tuckey.web.filters.urlrewrite.RuleChain.doRules(RuleChain.java:145)

        at org.tuckey.web.filters.urlrewrite.UrlRewriter.processRequest(UrlRewriter.java:92)

        at org.tuckey.web.filters.urlrewrite.UrlRewriteFilter.doFilter(UrlRewriteFilter.java:394)

        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)

        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)

        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:199)

        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96)

        at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:543)

        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:139)

        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:81)

        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87)

        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343)

        at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:615)

        at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:65)

        at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:818)

        at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1623)

        at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)

        at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)

        at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)

        at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)

        at java.lang.Thread.run(Unknown Source)

07-Jul-2020 21:10:34.581 ERROR [http-nio-8080-exec-3] org.hibernate.tool.hbm2ddl.SchemaUpdate.execute HHH000299: Could not complete schema update

    java.sql.SQLSyntaxErrorException: Unknown table 'sequences' in information_schema

        at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:120)

        at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:97)

        at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:122)

        at com.mysql.cj.jdbc.StatementImpl.executeQuery(StatementImpl.java:1218)

        at org.apache.tomcat.dbcp.dbcp2.DelegatingStatement.executeQuery(DelegatingStatement.java:310)

        at org.apache.tomcat.dbcp.dbcp2.DelegatingStatement.executeQuery(DelegatingStatement.java:310)

        at org.hibernate.tool.hbm2ddl.DatabaseMetadata.initSequences(DatabaseMetadata.java:178)

        at org.hibernate.tool.hbm2ddl.DatabaseMetadata.(DatabaseMetadata.java:92)

        at org.hibernate.tool.hbm2ddl.DatabaseMetadata.(DatabaseMetadata.java:84)

        at org.hibernate.tool.hbm2ddl.SchemaUpdate.execute(SchemaUpdate.java:221)

        at org.bonitasoft.engine.business.data.impl.SchemaManagerUpdate.update(SchemaManagerUpdate.java:89)

        at org.bonitasoft.engine.business.data.impl.BusinessDataModelRepositoryImpl.update(BusinessDataModelRepositoryImpl.java:183)

        at org.bonitasoft.engine.business.data.impl.BusinessDataModelRepositoryImpl.createAndDeployServerBDMJar(BusinessDataModelRepositoryImpl.java:175)

        at org.bonitasoft.engine.business.data.impl.BusinessDataModelRepositoryImpl.install(BusinessDataModelRepositoryImpl.java:160)

        at org.bonitasoft.engine.api.impl.TenantAdministrationAPIImpl.installBusinessDataModel(TenantAdministrationAPIImpl.java:156)

        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

        at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)

        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)

        at java.lang.reflect.Method.invoke(Unknown Source)

        at org.bonitasoft.engine.api.impl.ServerAPIImpl.invokeAPI(ServerAPIImpl.java:427)

        at org.bonitasoft.engine.api.impl.ServerAPIImpl.lambda$invokeAPIInTransaction$1(ServerAPIImpl.java:395)

        at org.bonitasoft.engine.transaction.JTATransactionServiceImpl.executeInTransaction(JTATransactionServiceImpl.java:286)

        at org.bonitasoft.engine.api.impl.ServerAPIImpl.invokeAPIInTransaction(ServerAPIImpl.java:391)

        at org.bonitasoft.engine.api.impl.ServerAPIImpl.invokeAPI(ServerAPIImpl.java:265)

        at org.bonitasoft.engine.api.impl.ServerAPIImpl.invokeMethod(ServerAPIImpl.java:121)

        at org.bonitasoft.engine.api.internal.servlet.HttpAPIServletCall.doPost(HttpAPIServletCall.java:112)

        at org.bonitasoft.engine.api.internal.servlet.HttpAPIServlet.doPost(HttpAPIServlet.java:36)

        at javax.servlet.http.HttpServlet.service(HttpServlet.java:660)

        at javax.servlet.http.HttpServlet.service(HttpServlet.java:741)

        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:231)

        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)

        at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)

        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)

        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)

        at org.tuckey.web.filters.urlrewrite.RuleChain.handleRewrite(RuleChain.java:176)

        at org.tuckey.web.filters.urlrewrite.RuleChain.doRules(RuleChain.java:145)

        at org.tuckey.web.filters.urlrewrite.UrlRewriter.processRequest(UrlRewriter.java:92)

        at org.tuckey.web.filters.urlrewrite.UrlRewriteFilter.doFilter(UrlRewriteFilter.java:394)

        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)

        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:166)

        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:199)

        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:96)

        at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:543)

        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:139)

        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:81)

        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:87)

        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:343)

        at org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:615)

        at org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:65)

        at org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:818)

        at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1623)

        at org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:49)

        at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)

        at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)

        at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)

        at java.lang.Thread.run(Unknown Source)

Hi,

When you talk about "migrating to Mysql" are you talking about your Bonita Server or Bonita Studio?

In which system do you get the errors (Server or Studio)?

In fact it's not possible / advisable to change the Bonita Studio database that should be always h2.

You are highly encouraged to migrate your Bonita Server database from h2 to Mysql or even better Postgresql.

Regards

Hello,

Can you show your 'database.properties' ?

Regards

# valid values are (h2, postgres, sqlserver, oracle, mysql)
db.vendor=mysql
# when using h2, no server or port setting is needed since connexion is made using file protocol mode using relative directory:
db.server.name=localhost
db.server.port=3306
db.database.name=bonita_engine
db.user=root
db.password=******

###################################
# Business Data database properties
###################################
# valid values are (h2, postgres, sqlserver, oracle, mysql)
bdm.db.vendor=mysql
bdm.db.server.name=localhost
bdm.db.server.port=3306
bdm.db.database.name=bonita_bdm
bdm.db.user=root
bdm.db.password=******

Hi,

Thanks for your update. I tried with the Studio and so it's not possible to change BDM DB there? Only it's possible to migrate in the Runtime (Server). Which means we develop the application on studio and need to separately deploy on the server so that BDM will get created on MySQL. Please correct me if my understanding is wrong.

Best Regards

I think that you can't change your Studio database.