Issue migrating a MySQL Database into a Mendix App
0
Hi I have an issue with the migration of an existing MySQL based application into a Mendix app. The MySQL DB consists out of 72 Tables each with a bunch of attributes. The MySQL Server is currently running on my windows machine accessible under localhost:3306 using the right db name, user and password. I started from scratch with a blank app template and added PRIOR the first start underneath the settings of the project the following custom settings: And under Custom: When I than fire up the app without any changes, the app fails with this console messages: Altering the cycle – first start up the app to create a db and than put in the custom settings also fails. After altering the details look like this: (Copy from the stacktrace) An error occurred while executing action 'Execute DDL commands'. -------- com.mendix.m2ee.api.AdminException: Executing DDL commands failed. at com.mendix.basis.component.internal.LocalComponentImpl.executeDDLCommands(LocalComponentImpl.scala:115) Caused by: com.mendix.basis.connectionbus.ConnectionBusException: Error (SQL State: 42504, Error Code: -5504) on executing: CREATE TABLE "mendixsystem$entity" ( "id" VARCHAR_IGNORECASE(36) NOT NULL, "entity_name" VARCHAR_IGNORECASE(511) NOT NULL, "table_name" VARCHAR_IGNORECASE(255) NOT NULL, "superentity_id" VARCHAR_IGNORECASE(255) NULL, "remote" BOOLEAN NULL, "remote_primary_key" BOOLEAN NULL, PRIMARY KEY("id")) All changes are rolled back. at com.mendix.connectionbus.modelsynchronization.DdlCommandExecutor.execute(DdlCommandExecutor.java:70) Caused by: java.sql.SQLSyntaxErrorException: object name already exists: mendixsystem$entity in statement [CREATE TABLE "mendixsystem$entity" ( "id" VARCHAR_IGNORECASE(36) NOT NULL, "entity_name" VARCHAR_IGNORECASE(511) NOT NULL, "table_name" VARCHAR_IGNORECASE(255) NOT NULL, "superentity_id" VARCHAR_IGNORECASE(255) NULL, "remote" BOOLEAN NULL, "remote_primary_key" BOOLEAN NULL, PRIMARY KEY("id"))] at org.hsqldb.jdbc.JDBCUtil.sqlException(Unknown Source) at org.hsqldb.jdbc.JDBCUtil.sqlException(Unknown Source) at org.hsqldb.jdbc.JDBCStatement.fetchResult(Unknown Source) at org.hsqldb.jdbc.JDBCStatement.execute(Unknown Source) at org.apache.commons.dbcp2.DelegatingStatement.execute(DelegatingStatement.java:175) at org.apache.commons.dbcp2.DelegatingStatement.execute(DelegatingStatement.java:175) at com.mendix.connectionbus.modelsynchronization.DdlCommandExecutorBase.$anonfun$executeDdlCommands$1(DdlCommandExecutorBase.scala:88) at com.mendix.connectionbus.modelsynchronization.DdlCommandExecutorBase.$anonfun$executeDdlCommands$1$adapted(DdlCommandExecutorBase.scala:63) at scala.collection.mutable.ResizableArray.foreach(ResizableArray.scala:62) at scala.collection.mutable.ResizableArray.foreach$(ResizableArray.scala:55) at scala.collection.mutable.ArrayBuffer.foreach(ArrayBuffer.scala:49) at com.mendix.connectionbus.modelsynchronization.DdlCommandExecutorBase.executeDdlCommands(DdlCommandExecutorBase.scala:63) at com.mendix.connectionbus.modelsynchronization.DdlCommandExecutor.execute(DdlCommandExecutor.java:34) at com.mendix.connectionbus.modelsynchronization.SynchronizationManager.synchronizeModel(SynchronizationManager.scala:207) at com.mendix.connectionbus.modelsynchronization.SynchronizationManager.execute(SynchronizationManager.scala:142) at com.mendix.connectionbus.ConnectionBusImpl.executeDDLCommands(ConnectionBusImpl.java:457) at com.mendix.basis.component.internal.LocalComponentImpl.executeDDLCommands(LocalComponentImpl.scala:107) at com.mendix.basis.impl.MxRuntimeImplBase.executeDDLCommands(MxRuntimeImplBase.java:1027) at com.mendix.basis.action.admin.ExecuteDDLCommandsAction.call(ExecuteDDLCommandsAction.java:31) at com.mendix.basis.action.admin.RuntimeAdminAction.execute(RuntimeAdminAction.java:24) at com.mendix.m2ee.appcontainer.server.handler.HttpAdminHandler.handle(HttpAdminHandler.java:129) at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127) at org.eclipse.jetty.server.Server.handle(Server.java:500) at org.eclipse.jetty.server.HttpChannel.lambda$handle$1(HttpChannel.java:383) at org.eclipse.jetty.server.HttpChannel.dispatch(HttpChannel.java:547) at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:375) at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:273) at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:311) at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:103) at org.eclipse.jetty.io.ChannelEndPoint$2.run(ChannelEndPoint.java:117) at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.runTask(EatWhatYouKill.java:336) at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:313) at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.tryProduce(EatWhatYouKill.java:171) at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKill.java:129) at org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(ReservedThreadExecutor.java:375) at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:806) at org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(QueuedThreadPool.java:938) at java.base/java.lang.Thread.run(Thread.java:834) Caused by: org.hsqldb.HsqlException: object name already exists: mendixsystem$entity at org.hsqldb.error.Error.error(Unknown Source) at org.hsqldb.error.Error.error(Unknown Source) at org.hsqldb.SchemaObjectSet.checkAdd(Unknown Source) at org.hsqldb.SchemaManager.checkSchemaObjectNotExists(Unknown Source) at org.hsqldb.StatementSchema.setOrCheckObjectName(Unknown Source) at org.hsqldb.StatementSchema.getResult(Unknown Source) at org.hsqldb.StatementSchema.execute(Unknown Source) at org.hsqldb.Session.executeCompiledStatement(Unknown Source) at org.hsqldb.Session.executeDirectStatement(Unknown Source) at org.hsqldb.Session.execute(Unknown Source) at org.hsqldb.jdbc.JDBCStatement.fetchResult(Unknown Source) at org.hsqldb.jdbc.JDBCStatement.execute(Unknown Source) at org.apache.commons.dbcp2.DelegatingStatement.execute(DelegatingStatement.java:175) at org.apache.commons.dbcp2.DelegatingStatement.execute(DelegatingStatement.java:175) at com.mendix.connectionbus.modelsynchronization.DdlCommandExecutorBase.$anonfun$executeDdlCommands$1(DdlCommandExecutorBase.scala:88) at com.mendix.connectionbus.modelsynchronization.DdlCommandExecutorBase.$anonfun$executeDdlCommands$1$adapted(DdlCommandExecutorBase.scala:63) at scala.collection.mutable.ResizableArray.foreach(ResizableArray.scala:62) at scala.collection.mutable.ResizableArray.foreach$(ResizableArray.scala:55) at scala.collection.mutable.ArrayBuffer.foreach(ArrayBuffer.scala:49) at com.mendix.connectionbus.modelsynchronization.DdlCommandExecutorBase.executeDdlCommands(DdlCommandExecutorBase.scala:63) at com.mendix.connectionbus.modelsynchronization.DdlCommandExecutor.execute(DdlCommandExecutor.java:34) at com.mendix.connectionbus.modelsynchronization.SynchronizationManager.synchronizeModel(SynchronizationManager.scala:207) at com.mendix.connectionbus.modelsynchronization.SynchronizationManager.execute(SynchronizationManager.scala:142) at com.mendix.connectionbus.ConnectionBusImpl.executeDDLCommands(ConnectionBusImpl.java:457) at com.mendix.basis.component.internal.LocalComponentImpl.executeDDLCommands(LocalComponentImpl.scala:107) at com.mendix.basis.impl.MxRuntimeImplBase.executeDDLCommands(MxRuntimeImplBase.java:1027) at com.mendix.basis.action.admin.ExecuteDDLCommandsAction.call(ExecuteDDLCommandsAction.java:31) at com.mendix.basis.action.admin.RuntimeAdminAction.execute(RuntimeAdminAction.java:24) at com.mendix.m2ee.appcontainer.server.handler.HttpAdminHandler.handle(HttpAdminHandler.java:129) at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:127) at org.eclipse.jetty.server.Server.handle(Server.java:500) at org.eclipse.jetty.server.HttpChannel.lambda$handle$1(HttpChannel.java:383) at org.eclipse.jetty.server.HttpChannel.dispatch(HttpChannel.java:547) at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:375) at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:273) at org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:311) at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:103) at org.eclipse.jetty.io.ChannelEndPoint$2.run(ChannelEndPoint.java:117) at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.runTask(EatWhatYouKill.java:336) at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.doProduce(EatWhatYouKill.java:313) at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.tryProduce(EatWhatYouKill.java:171) at org.eclipse.jetty.util.thread.strategy.EatWhatYouKill.run(EatWhatYouKill.java:129) at org.eclipse.jetty.util.thread.ReservedThreadExecutor$ReservedThread.run(ReservedThreadExecutor.java:375) at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:806) at org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(QueuedThreadPool.java:938) at java.base/java.lang.Thread.run(Thread.java:834) Any suggestions what went wrong or where to look? I tried this under 8.7 and 8.10.3 without success… BR, Axel
asked
Axel Thobaben
2 answers
0
you should change the database type to “MySQL” if you wish to connect to MySQL.
answered
TY Kueh Edison
0
Thanks – but I ran into another issue and one of my colleagues mentioned, that this is approach is not possible.