Camunda REST with Mysql and Spring boot

Spring boot application with camunda rest run perfectly with h2 but Mysql give following error
Caused by: java.sql.SQLSyntaxErrorException: Unknown column ‘TYPE_’ in ‘field list’
------------Full trace below
org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name ‘restserverApplication’: Unsatisfied dependency expressed through field ‘runtimeService’; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name ‘org.camunda.bpm.engine.spring.SpringProcessEngineServicesConfiguration’: Unsatisfied dependency expressed through field ‘processEngine’; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘processEngineFactoryBean’: FactoryBean threw exception on object creation; nested exception is org.camunda.bpm.engine.ProcessEngineException: ENGINE-03083 Exception while executing Batch Database Operations with message ’

Error flushing statements. Cause: org.apache.ibatis.executor.BatchExecutorException: org.camunda.bpm.engine.impl.persistence.entity.ResourceEntity.insertResource (batch index #3) failed. 2 prior sub executor(s) completed successfully, but will be rolled back. Cause: java.sql.BatchUpdateException: Unknown column ‘TYPE_’ in ‘field list’

Cause: org.apache.ibatis.executor.BatchExecutorException: org.camunda.bpm.engine.impl.persistence.entity.ResourceEntity.insertResource (batch index #3) failed. 2 prior sub executor(s) completed successfully, but will be rolled back. Cause: java.sql.BatchUpdateException: Unknown column ‘TYPE_’ in ‘field list’

java.sql.BatchUpdateException: Unknown column ‘TYPE_’ in ‘field list’
java.sql.SQLSyntaxErrorException: Unknown column ‘TYPE_’ in ‘field list’
'. Flush summary:
[
INSERT JobDefinitionEntity[fc751295-a6ab-11e9-a129-62c8f45cebfb]
INSERT JobDefinitionEntity[fc751296-a6ab-11e9-a129-62c8f45cebfb]
INSERT JobDefinitionEntity[fc751297-a6ab-11e9-a129-62c8f45cebfb]
INSERT JobDefinitionEntity[fc75d5e9-a6ab-11e9-a129-62c8f45cebfb]
INSERT JobDefinitionEntity[fc75d5ea-a6ab-11e9-a129-62c8f45cebfb]
INSERT JobDefinitionEntity[fc77f8d0-a6ab-11e9-a129-62c8f45cebfb]
INSERT DeploymentEntity[fc28c74c-a6ab-11e9-a129-62c8f45cebfb]
INSERT ResourceEntity[fc29156d-a6ab-11e9-a129-62c8f45cebfb]
INSERT ResourceEntity[fc29156e-a6ab-11e9-a129-62c8f45cebfb]
INSERT ResourceEntity[fc29156f-a6ab-11e9-a129-62c8f45cebfb]
INSERT ResourceEntity[fc291570-a6ab-11e9-a129-62c8f45cebfb]
INSERT ResourceEntity[fc291571-a6ab-11e9-a129-62c8f45cebfb]
INSERT ResourceEntity[fc291572-a6ab-11e9-a129-62c8f45cebfb]
INSERT ResourceEntity[fc291573-a6ab-11e9-a129-62c8f45cebfb]
INSERT ProcessDefinitionEntity[intentout:1:fc76993c-a6ab-11e9-a129-62c8f45cebfb]
INSERT ProcessDefinitionEntity[itemsave:1:fc75d5e8-a6ab-11e9-a129-62c8f45cebfb]
INSERT ProcessDefinitionEntity[process-payment:1:fc77f8cf-a6ab-11e9-a129-62c8f45cebfb]
INSERT ProcessDefinitionEntity[processSales:1:fc76240b-a6ab-11e9-a129-62c8f45cebfb]
INSERT ProcessDefinitionEntity[purchase:1:fc751294-a6ab-11e9-a129-62c8f45cebfb]
INSERT ProcessDefinitionEntity[stocktransferin:1:fc770e6d-a6ab-11e9-a129-62c8f45cebfb]
INSERT ProcessDefinitionEntity[stocktransferout:1:fc77839e-a6ab-11e9-a129-62c8f45cebfb]
]
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:626) ~[spring-beans-5.2.0.M2.jar!/:5.2.0.M2]
at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:116) ~[spring-beans-5.2.0.M2.jar!/:5.2.0.M2]
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessProperties(AutowiredAnnotationBeanPostProcessor.java:385) ~[spring-beans-5.2.0.M2.jar!/:5.2.0.M2]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1416) ~[spring-beans-5.2.0.M2.jar!/:5.2.0.M2]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:592) ~[spring-beans-5.2.0.M2.jar!/:5.2.0.M2]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:515) ~[spring-beans-5.2.0.M2.jar!/:5.2.0.M2]
at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:320) ~[spring-beans-5.2.0.M2.jar!/:5.2.0.M2]
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222) ~[spring-beans-5.2.0.M2.jar!/:5.2.0.M2]
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:318) ~[spring-beans-5.2.0.M2.jar!/:5.2.0.M2]
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:199) ~[spring-beans-5.2.0.M2.jar!/:5.2.0.M2]
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:868) ~[spring-beans-5.2.0.M2.jar!/:5.2.0.M2]
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:877) ~[spring-context-5.2.0.M2.jar!/:5.2.0.M2]
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:549) ~[spring-context-5.2.0.M2.jar!/:5.2.0.M2]
at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:142) ~[spring-boot-2.2.0.M3.jar!/:2.2.0.M3]
at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:782) [spring-boot-2.2.0.M3.jar!/:2.2.0.M3]
at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:404) [spring-boot-2.2.0.M3.jar!/:2.2.0.M3]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:319) [spring-boot-2.2.0.M3.jar!/:2.2.0.M3]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1275) [spring-boot-2.2.0.M3.jar!/:2.2.0.M3]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1263) [spring-boot-2.2.0.M3.jar!/:2.2.0.M3]
at com.maple.restserver.RestserverApplication.main(RestserverApplication.java:76) [classes!/:0.0.1]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_131]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_131]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_131]
at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_131]
at org.springframework.boot.loader.MainMethodRunner.run(MainMethodRunner.java:48) [restserver-0.0.1.jar:0.0.1]
at org.springframework.boot.loader.Launcher.launch(Launcher.java:87) [restserver-0.0.1.jar:0.0.1]
at org.springframework.boot.loader.Launcher.launch(Launcher.java:50) [restserver-0.0.1.jar:0.0.1]
at org.springframework.boot.loader.JarLauncher.main(JarLauncher.java:51) [restserver-0.0.1.jar:0.0.1]
Caused by: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name ‘org.camunda.bpm.engine.spring.SpringProcessEngineServicesConfiguration’: Unsatisfied dependency expressed through field 'p

Hi Regy,

What is your setup - Camunda, Spring Boot Starter, and Spring Boot versions, mysql version and your application properties?
What do you perform when the error occurred?

Spring boot version 2.2.0.M3
Mysql Version
Server version: 5.6.20
camunda-bpm-spring-boot-starter-webapp 3.2.0
camunda-bpm-spring-boot-starter-rest 3.3.1

----Application properties----
spring.jpa.hibernate.ddl-auto=create
spring.datasource.url=jdbc:mysql://localhost:3306/maple
spring.datasource.maxActive=500
spring.datasource.username=maple04
spring.datasource.password=maple04
spring.jpa.show-sql=true
spring.jpa.properties.hibernate.dialect = org.hibernate.dialect.MySQL5Dialect
spring.activemq.broker-url=tcp://localhost:61616
spring.activemq.user=admin
spring.activemq.password=admin
server.port=8080
camunda.host=http://localhost:8080

I tried to auto deploy BPM using spring boot and the error happens

Keep in mind that Spring boot 2.2.0 is not supported by the Starter yet.
Also please adjust your versions of rest and webapp to be the same minor version to avoid inconsistencies. Compatibility matrix:
https://docs.camunda.org/manual/7.11/user-guide/spring-boot-integration/version-compatibility/

2 Likes

Its working . issue was version mismatch