Hi everyone,
I am trying to run Camunda with the docker image and connect it to a MySQL database:
This is my MySQL-Dockerfile:
FROM mysql:5.7.24
COPY file1_create_db.sql /docker-entrypoint-initdb.d
COPY file2_mysql_identity_7.9.0.sql /docker-entrypoint-initdb.d
COPY file3_mysql_engine_7.9.0.sql /docker-entrypoint-initdb.d
WORKDIR /docker-entrypoint-initdb.d
RUN chmod +x /docker-entrypoint-initdb.d/file1_create_db.sql
RUN chmod +x /docker-entrypoint-initdb.d/file2_mysql_identity_7.9.0.sql
RUN chmod +x /docker-entrypoint-initdb.d/file3_mysql_engine_7.9.0.sql
This is my Camunda-Dockerfile:
FROM camunda/camunda-bpm-platform
And this is my docker-compose.yaml file:
version: '3'
services:
mysql:
container_name: "mysql"
build: mysql
ports:
- "3307:3306"
healthcheck:
interval: 30s
timeout: 10s
retries: 5
networks:
- webnet
command: --default-authentication-plugin=mysql_native_password
environment:
MYSQL_ROOT_PASSWORD: testpwd
camunda:
container_name: "camunda"
build: camunda
restart: on-failure
ports:
- "80:8080"
networks:
- webnet
depends_on:
- "mysql"
environment:
- DB_DRIVER=com.mysql.jdbc.Driver
- DB_URL=jdbc:mysql://mysql:3306/camunda_db?useUnicode=true&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=CET
- DB_USERNAME=root
- DB_PASSWORD=testpwd
- WAIT_FOR=mysql:3306
links:
- mysql
volumes:
web_mysql:
networks:
webnet:
driver: bridge
And when I run this I keep getting this error:
04-Dec-2018 08:29:25.056 SEVERE [main] org.camunda.commons.logging.BaseLogger.logError ENGINE-16004 Exception while closing command context: ENGINE-03083 Exception while executing Batch Database Operations with message ’
camunda | ### Error flushing statements. Cause: org.apache.ibatis.executor.BatchExecutorException: org.camunda.bpm.engine.impl.persistence.entity.HistoricJobLogEntity.insertHistoricJobLogEvent (batch index #1) failed. Cause: java.sql.BatchUpdateException: Unknown column ‘ROOT_PROC_INST_ID_’ in ‘field list’
camunda | ### Cause: org.apache.ibatis.executor.BatchExecutorException: org.camunda.bpm.engine.impl.persistence.entity.HistoricJobLogEntity.insertHistoricJobLogEvent (batch index #1) failed. Cause: java.sql.BatchUpdateException: Unknown column ‘ROOT_PROC_INST_ID_’ in ‘field list’
camunda | java.sql.BatchUpdateException: Unknown column ‘ROOT_PROC_INST_ID_’ in ‘field list’
camunda | com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Unknown column ‘ROOT_PROC_INST_ID_’ in ‘field list’
camunda | '. Flush summary:
camunda | [
camunda | INSERT HistoricJobLogEventEntity[b51e3803-f79e-11e8-9ebd-0242ac120003]
camunda | INSERT EverLivingJobEntity[b51c8a52-f79e-11e8-9ebd-0242ac120003]
camunda | ]
camunda | org.camunda.bpm.engine.ProcessEngineException: ENGINE-03083 Exception while executing Batch Database Operations with message ’
camunda | ### Error flushing statements. Cause: org.apache.ibatis.executor.BatchExecutorException: org.camunda.bpm.engine.impl.persistence.entity.HistoricJobLogEntity.insertHistoricJobLogEvent (batch index #1) failed. Cause: java.sql.BatchUpdateException: Unknown column ‘ROOT_PROC_INST_ID_’ in ‘field list’
camunda | ### Cause: org.apache.ibatis.executor.BatchExecutorException: org.camunda.bpm.engine.impl.persistence.entity.HistoricJobLogEntity.insertHistoricJobLogEvent (batch index #1) failed. Cause: java.sql.BatchUpdateException: Unknown column ‘ROOT_PROC_INST_ID_’ in ‘field list’
camunda | java.sql.BatchUpdateException: Unknown column ‘ROOT_PROC_INST_ID_’ in ‘field list’
camunda | com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Unknown column ‘ROOT_PROC_INST_ID_’ in ‘field list’
camunda | '. Flush summary:
camunda | [
camunda | INSERT HistoricJobLogEventEntity[b51e3803-f79e-11e8-9ebd-0242ac120003]
camunda | INSERT EverLivingJobEntity[b51c8a52-f79e-11e8-9ebd-0242ac120003]
camunda | ]
camunda | at org.camunda.bpm.engine.impl.db.EnginePersistenceLogger.flushDbOperationsException(EnginePersistenceLogger.java:692)
camunda | at org.camunda.bpm.engine.impl.db.entitymanager.DbEntityManager.flushDbOperations(DbEntityManager.java:361)
camunda | at org.camunda.bpm.engine.impl.db.entitymanager.DbEntityManager.flushDbOperationManager(DbEntityManager.java:324)
camunda | at org.camunda.bpm.engine.impl.db.entitymanager.DbEntityManager.flush(DbEntityManager.java:296)
camunda | at org.camunda.bpm.engine.impl.interceptor.CommandContext.flushSessions(CommandContext.java:207)
camunda | at org.camunda.bpm.engine.impl.interceptor.CommandContext.close(CommandContext.java:136)
camunda | at org.camunda.bpm.engine.impl.interceptor.CommandContextInterceptor.execute(CommandContextInterceptor.java:115)
camunda | at org.camunda.bpm.engine.impl.interceptor.ProcessApplicationContextInterceptor.execute(ProcessApplicationContextInterceptor.java:69)
camunda | at org.camunda.bpm.engine.impl.interceptor.LogInterceptor.execute(LogInterceptor.java:32)
camunda | at org.camunda.bpm.engine.impl.ProcessEngineImpl.executeSchemaOperations(ProcessEngineImpl.java:123)
camunda | at org.camunda.bpm.engine.impl.ProcessEngineImpl.(ProcessEngineImpl.java:92)
camunda | at org.camunda.bpm.engine.impl.cfg.ProcessEngineConfigurationImpl.buildProcessEngine(ProcessEngineConfigurationImpl.java:786)
camunda | at org.camunda.bpm.container.impl.jmx.services.JmxManagedProcessEngineController.start(JmxManagedProcessEngineController.java:37)
camunda | at org.camunda.bpm.container.impl.jmx.MBeanServiceContainer.startService(MBeanServiceContainer.java:76)
camunda | at org.camunda.bpm.container.impl.jmx.MBeanServiceContainer.startService(MBeanServiceContainer.java:62)
camunda | at org.camunda.bpm.container.impl.deployment.StartProcessEngineStep.performOperationStep(StartProcessEngineStep.java:115)
camunda | at org.camunda.bpm.container.impl.spi.DeploymentOperation.execute(DeploymentOperation.java:119)
camunda | at org.camunda.bpm.container.impl.jmx.MBeanServiceContainer.executeDeploymentOperation(MBeanServiceContainer.java:159)
camunda | at org.camunda.bpm.container.impl.spi.DeploymentOperation$DeploymentOperationBuilder.execute(DeploymentOperation.java:215)
camunda | at org.camunda.bpm.container.impl.tomcat.TomcatBpmPlatformBootstrap.deployBpmPlatform(TomcatBpmPlatformBootstrap.java:82)
camunda | at org.camunda.bpm.container.impl.tomcat.TomcatBpmPlatformBootstrap.lifecycleEvent(TomcatBpmPlatformBootstrap.java:60)
camunda | at org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:123)
camunda | at org.apache.catalina.util.LifecycleBase.setStateInternal(LifecycleBase.java:424)
camunda | at org.apache.catalina.util.LifecycleBase.setState(LifecycleBase.java:367)
camunda | at org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:763)
camunda | at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
camunda | at org.apache.catalina.startup.Catalina.start(Catalina.java:682)
camunda | at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
camunda | at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
camunda | at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
camunda | at java.lang.reflect.Method.invoke(Method.java:498)
camunda | at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:350)
camunda | at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:492)
camunda | Caused by: org.apache.ibatis.exceptions.PersistenceException:
camunda | ### Error flushing statements. Cause: org.apache.ibatis.executor.BatchExecutorException: org.camunda.bpm.engine.impl.persistence.entity.HistoricJobLogEntity.insertHistoricJobLogEvent (batch index #1) failed. Cause: java.sql.BatchUpdateException: Unknown column ‘ROOT_PROC_INST_ID_’ in ‘field list’
camunda | ### Cause: org.apache.ibatis.executor.BatchExecutorException: org.camunda.bpm.engine.impl.persistence.entity.HistoricJobLogEntity.insertHistoricJobLogEvent (batch index #1) failed. Cause: java.sql.BatchUpdateException: Unknown column ‘ROOT_PROC_INST_ID_’ in ‘field list’
camunda | at org.apache.ibatis.exceptions.ExceptionFactory.wrapException(ExceptionFactory.java:30)
camunda | at org.apache.ibatis.session.defaults.DefaultSqlSession.flushStatements(DefaultSqlSession.java:255)
camunda | at org.camunda.bpm.engine.impl.db.sql.DbSqlSession.flushOperations(DbSqlSession.java:90)
camunda | at org.camunda.bpm.engine.impl.db.entitymanager.DbEntityManager.flushDbOperations(DbEntityManager.java:356)
camunda | … 31 more
camunda | Caused by: org.apache.ibatis.executor.BatchExecutorException: org.camunda.bpm.engine.impl.persistence.entity.HistoricJobLogEntity.insertHistoricJobLogEvent (batch index #1) failed. Cause: java.sql.BatchUpdateException: Unknown column ‘ROOT_PROC_INST_ID_’ in ‘field list’
camunda | at org.apache.ibatis.executor.BatchExecutor.doFlushStatements(BatchExecutor.java:146)
camunda | at org.apache.ibatis.executor.BaseExecutor.flushStatements(BaseExecutor.java:129)
camunda | at org.apache.ibatis.executor.BaseExecutor.flushStatements(BaseExecutor.java:122)
camunda | at org.apache.ibatis.executor.CachingExecutor.flushStatements(CachingExecutor.java:114)
camunda | at org.apache.ibatis.session.defaults.DefaultSqlSession.flushStatements(DefaultSqlSession.java:253)
camunda | … 33 more
camunda | Caused by: java.sql.BatchUpdateException: Unknown column ‘ROOT_PROC_INST_ID_’ in ‘field list’
camunda | at com.mysql.jdbc.PreparedStatement.executeBatchSerially(PreparedStatement.java:2054)
camunda | at com.mysql.jdbc.PreparedStatement.executeBatch(PreparedStatement.java:1467)
camunda | at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
camunda | at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
camunda | at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
camunda | at java.lang.reflect.Method.invoke(Method.java:498)
camunda | at org.apache.tomcat.jdbc.pool.StatementFacade$StatementProxy.invoke(StatementFacade.java:114)
camunda | at com.sun.proxy.$Proxy4.executeBatch(Unknown Source)
camunda | at org.apache.ibatis.executor.BatchExecutor.doFlushStatements(BatchExecutor.java:122)
camunda | … 37 more
camunda | Caused by: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Unknown column ‘ROOT_PROC_INST_ID_’ in ‘field list’
camunda | at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
camunda | at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
camunda | at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
camunda | at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
camunda | at com.mysql.jdbc.Util.handleNewInstance(Util.java:411)
camunda | at com.mysql.jdbc.Util.getInstance(Util.java:386)
camunda | at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1053)
camunda | at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:4074)
camunda | at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:4006)
camunda | at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2468)
camunda | at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2629)
camunda | at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2719)
camunda | at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:2155)
camunda | at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:2450)
camunda | at com.mysql.jdbc.PreparedStatement.executeBatchSerially(PreparedStatement.java:2006)
camunda | … 45 more
Does anybody know how I do have to change my files to get this running?
Thanks in advance