Camunda Spring boot oracle

Hi, I’m with camunda spring boot starter, with default h2 db it works fine,but when I change to Oracle, it failed.Here is my console info:

 ____                                 _         ____  ____  __  __
/ ___| __ _ _ __ ___  _   _ _ __   __| | __ _  | __ )|  _ \|  \/  |
| |   / _` | '_ ` _ \| | | | '_ \ / _` |/ _` | |  _ \| |_) | |\/| |
| |__| (_| | | | | | | |_| | | | | (_| | (_| | | |_) |  __/| |  | |
\____/\__,_|_| |_| |_|\__,_|_| |_|\__,_|\__,_| |____/|_|   |_|  |_|

  Spring-Boot:  (v2.1.5.RELEASE)
  Camunda BPM: (v7.11.0)
  Camunda BPM Spring Boot Starter: (v3.3.2)

2019-07-11 16:22:10.827  INFO 11104 --- [           main] com.richfit.workflow.Application         : Starting Application on DESKTOP-ELQ0B2Q with PID 11104 (F:\testspace\workflow\target\classes started by Amanda in F:\testspace\workflow)
2019-07-11 16:22:10.831  INFO 11104 --- [           main] com.richfit.workflow.Application         : No active profile set, falling back to default profiles: default
2019-07-11 16:22:12.321  INFO 11104 --- [           main] o.s.b.w.embedded.tomcat.TomcatWebServer  : Tomcat initialized with port(s): 8080 (http)
2019-07-11 16:22:12.348  INFO 11104 --- [           main] o.apache.catalina.core.StandardService   : Starting service [Tomcat]
2019-07-11 16:22:12.349  INFO 11104 --- [           main] org.apache.catalina.core.StandardEngine  : Starting Servlet engine: [Apache Tomcat/9.0.19]
2019-07-11 16:22:12.474  INFO 11104 --- [           main] o.a.c.c.C.[Tomcat].[localhost].[/]       : Initializing Spring embedded WebApplicationContext
2019-07-11 16:22:12.474  INFO 11104 --- [           main] o.s.web.context.ContextLoader            : Root WebApplicationContext: initialization completed in 1585 ms
2019-07-11 16:22:12.898  WARN 11104 --- [           main] ConfigServletWebServerApplicationContext : Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'org.camunda.bpm.spring.boot.starter.SpringBootProcessApplication': Unsatisfied dependency expressed through field 'processEngine'; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'org.camunda.bpm.spring.boot.starter.CamundaBpmAutoConfiguration$ProcessEngineConfigurationImplDependingConfiguration': Unsatisfied dependency expressed through field 'processEngineConfigurationImpl'; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'processEngineConfigurationImpl' defined in class path resource [org/camunda/bpm/spring/boot/starter/CamundaBpmConfiguration.class]: Unsatisfied dependency expressed through method 'processEngineConfigurationImpl' parameter 0; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'camundaDatasourceConfiguration': Unsatisfied dependency expressed through field 'transactionManager'; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type 'org.springframework.transaction.PlatformTransactionManager' available: expected at least 1 bean which qualifies as autowire candidate. Dependency annotations: {@org.springframework.beans.factory.annotation.Autowired(required=true)}
2019-07-11 16:22:12.901  INFO 11104 --- [           main] o.apache.catalina.core.StandardService   : Stopping service [Tomcat]
2019-07-11 16:22:12.908 ERROR 11104 --- [           main] o.a.c.c.C.[Tomcat].[localhost].[/]       : Failed to destroy the filter named [Engines Filter] of type [org.camunda.bpm.spring.boot.starter.webapp.filter.LazyProcessEnginesFilter]

java.lang.NullPointerException: null
	at org.camunda.bpm.spring.boot.starter.webapp.filter.LazyDelegateFilter.destroy(LazyDelegateFilter.java:65) ~[camunda-bpm-spring-boot-starter-webapp-core-3.3.2.jar:3.3.2]
	at org.apache.catalina.core.ApplicationFilterConfig.release(ApplicationFilterConfig.java:301) ~[tomcat-embed-core-9.0.19.jar:9.0.19]
	at org.apache.catalina.core.StandardContext.filterStop(StandardContext.java:4562) [tomcat-embed-core-9.0.19.jar:9.0.19]
	at org.apache.catalina.core.StandardContext.stopInternal(StandardContext.java:5380) [tomcat-embed-core-9.0.19.jar:9.0.19]
	at org.apache.catalina.util.LifecycleBase.stop(LifecycleBase.java:257) [tomcat-embed-core-9.0.19.jar:9.0.19]
	at org.apache.catalina.core.ContainerBase$StopChild.call(ContainerBase.java:1393) [tomcat-embed-core-9.0.19.jar:9.0.19]
	at org.apache.catalina.core.ContainerBase$StopChild.call(ContainerBase.java:1382) [tomcat-embed-core-9.0.19.jar:9.0.19]
	at java.util.concurrent.FutureTask.run(FutureTask.java:266) [na:1.8.0_171]
	at org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75) [tomcat-embed-core-9.0.19.jar:9.0.19]
	at java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:134) [na:1.8.0_171]
	at org.apache.catalina.core.ContainerBase.stopInternal(ContainerBase.java:969) [tomcat-embed-core-9.0.19.jar:9.0.19]
	at org.apache.catalina.util.LifecycleBase.stop(LifecycleBase.java:257) [tomcat-embed-core-9.0.19.jar:9.0.19]
	at org.apache.catalina.core.ContainerBase$StopChild.call(ContainerBase.java:1393) [tomcat-embed-core-9.0.19.jar:9.0.19]
	at org.apache.catalina.core.ContainerBase$StopChild.call(ContainerBase.java:1382) [tomcat-embed-core-9.0.19.jar:9.0.19]
	at java.util.concurrent.FutureTask.run(FutureTask.java:266) [na:1.8.0_171]
	at org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75) [tomcat-embed-core-9.0.19.jar:9.0.19]
	at java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:134) [na:1.8.0_171]
	at org.apache.catalina.core.ContainerBase.stopInternal(ContainerBase.java:969) [tomcat-embed-core-9.0.19.jar:9.0.19]
	at org.apache.catalina.util.LifecycleBase.stop(LifecycleBase.java:257) [tomcat-embed-core-9.0.19.jar:9.0.19]
	at org.apache.catalina.core.StandardService.stopInternal(StandardService.java:475) [tomcat-embed-core-9.0.19.jar:9.0.19]
	at org.apache.catalina.util.LifecycleBase.stop(LifecycleBase.java:257) [tomcat-embed-core-9.0.19.jar:9.0.19]
	at org.apache.catalina.core.StandardServer.stopInternal(StandardServer.java:994) [tomcat-embed-core-9.0.19.jar:9.0.19]
	at org.apache.catalina.util.LifecycleBase.stop(LifecycleBase.java:257) [tomcat-embed-core-9.0.19.jar:9.0.19]
	at org.apache.catalina.startup.Tomcat.stop(Tomcat.java:465) [tomcat-embed-core-9.0.19.jar:9.0.19]
	at org.springframework.boot.web.embedded.tomcat.TomcatWebServer.stopTomcat(TomcatWebServer.java:250) [spring-boot-2.1.5.RELEASE.jar:2.1.5.RELEASE]
	at org.springframework.boot.web.embedded.tomcat.TomcatWebServer.stop(TomcatWebServer.java:306) [spring-boot-2.1.5.RELEASE.jar:2.1.5.RELEASE]
	at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.stopAndReleaseWebServer(ServletWebServerApplicationContext.java:320) [spring-boot-2.1.5.RELEASE.jar:2.1.5.RELEASE]
	at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:145) [spring-boot-2.1.5.RELEASE.jar:2.1.5.RELEASE]
	at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:775) [spring-boot-2.1.5.RELEASE.jar:2.1.5.RELEASE]
	at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:397) [spring-boot-2.1.5.RELEASE.jar:2.1.5.RELEASE]
	at org.springframework.boot.SpringApplication.run(SpringApplication.java:316) [spring-boot-2.1.5.RELEASE.jar:2.1.5.RELEASE]
	at org.springframework.boot.SpringApplication.run(SpringApplication.java:1260) [spring-boot-2.1.5.RELEASE.jar:2.1.5.RELEASE]
	at org.springframework.boot.SpringApplication.run(SpringApplication.java:1248) [spring-boot-2.1.5.RELEASE.jar:2.1.5.RELEASE]
	at com.richfit.workflow.Application.main(Application.java:12) [classes/:na]

2019-07-11 16:22:12.909 ERROR 11104 --- [           main] o.a.c.c.C.[Tomcat].[localhost].[/]       : Failed to destroy the filter named [Security Filter] of type [org.camunda.bpm.spring.boot.starter.webapp.filter.LazySecurityFilter]

java.lang.NullPointerException: null
	at org.camunda.bpm.spring.boot.starter.webapp.filter.LazyDelegateFilter.destroy(LazyDelegateFilter.java:65) ~[camunda-bpm-spring-boot-starter-webapp-core-3.3.2.jar:3.3.2]
	at org.apache.catalina.core.ApplicationFilterConfig.release(ApplicationFilterConfig.java:301) ~[tomcat-embed-core-9.0.19.jar:9.0.19]
	at org.apache.catalina.core.StandardContext.filterStop(StandardContext.java:4562) [tomcat-embed-core-9.0.19.jar:9.0.19]
	at org.apache.catalina.core.StandardContext.stopInternal(StandardContext.java:5380) [tomcat-embed-core-9.0.19.jar:9.0.19]
	at org.apache.catalina.util.LifecycleBase.stop(LifecycleBase.java:257) [tomcat-embed-core-9.0.19.jar:9.0.19]
	at org.apache.catalina.core.ContainerBase$StopChild.call(ContainerBase.java:1393) [tomcat-embed-core-9.0.19.jar:9.0.19]
	at org.apache.catalina.core.ContainerBase$StopChild.call(ContainerBase.java:1382) [tomcat-embed-core-9.0.19.jar:9.0.19]
	at java.util.concurrent.FutureTask.run(FutureTask.java:266) [na:1.8.0_171]
	at org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75) [tomcat-embed-core-9.0.19.jar:9.0.19]
	at java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:134) [na:1.8.0_171]
	at org.apache.catalina.core.ContainerBase.stopInternal(ContainerBase.java:969) [tomcat-embed-core-9.0.19.jar:9.0.19]
	at org.apache.catalina.util.LifecycleBase.stop(LifecycleBase.java:257) [tomcat-embed-core-9.0.19.jar:9.0.19]
	at org.apache.catalina.core.ContainerBase$StopChild.call(ContainerBase.java:1393) [tomcat-embed-core-9.0.19.jar:9.0.19]
	at org.apache.catalina.core.ContainerBase$StopChild.call(ContainerBase.java:1382) [tomcat-embed-core-9.0.19.jar:9.0.19]
	at java.util.concurrent.FutureTask.run(FutureTask.java:266) [na:1.8.0_171]
	at org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75) [tomcat-embed-core-9.0.19.jar:9.0.19]
	at java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:134) [na:1.8.0_171]
	at org.apache.catalina.core.ContainerBase.stopInternal(ContainerBase.java:969) [tomcat-embed-core-9.0.19.jar:9.0.19]
	at org.apache.catalina.util.LifecycleBase.stop(LifecycleBase.java:257) [tomcat-embed-core-9.0.19.jar:9.0.19]
	at org.apache.catalina.core.StandardService.stopInternal(StandardService.java:475) [tomcat-embed-core-9.0.19.jar:9.0.19]
	at org.apache.catalina.util.LifecycleBase.stop(LifecycleBase.java:257) [tomcat-embed-core-9.0.19.jar:9.0.19]
	at org.apache.catalina.core.StandardServer.stopInternal(StandardServer.java:994) [tomcat-embed-core-9.0.19.jar:9.0.19]
	at org.apache.catalina.util.LifecycleBase.stop(LifecycleBase.java:257) [tomcat-embed-core-9.0.19.jar:9.0.19]
	at org.apache.catalina.startup.Tomcat.stop(Tomcat.java:465) [tomcat-embed-core-9.0.19.jar:9.0.19]
	at org.springframework.boot.web.embedded.tomcat.TomcatWebServer.stopTomcat(TomcatWebServer.java:250) [spring-boot-2.1.5.RELEASE.jar:2.1.5.RELEASE]
	at org.springframework.boot.web.embedded.tomcat.TomcatWebServer.stop(TomcatWebServer.java:306) [spring-boot-2.1.5.RELEASE.jar:2.1.5.RELEASE]
	at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.stopAndReleaseWebServer(ServletWebServerApplicationContext.java:320) [spring-boot-2.1.5.RELEASE.jar:2.1.5.RELEASE]
	at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:145) [spring-boot-2.1.5.RELEASE.jar:2.1.5.RELEASE]
	at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:775) [spring-boot-2.1.5.RELEASE.jar:2.1.5.RELEASE]
	at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:397) [spring-boot-2.1.5.RELEASE.jar:2.1.5.RELEASE]
	at org.springframework.boot.SpringApplication.run(SpringApplication.java:316) [spring-boot-2.1.5.RELEASE.jar:2.1.5.RELEASE]
	at org.springframework.boot.SpringApplication.run(SpringApplication.java:1260) [spring-boot-2.1.5.RELEASE.jar:2.1.5.RELEASE]
	at org.springframework.boot.SpringApplication.run(SpringApplication.java:1248) [spring-boot-2.1.5.RELEASE.jar:2.1.5.RELEASE]
	at com.richfit.workflow.Application.main(Application.java:12) [classes/:na]

2019-07-11 16:22:12.946  INFO 11104 --- [           main] ConditionEvaluationReportLoggingListener : 

Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled.
2019-07-11 16:22:13.137 ERROR 11104 --- [           main] o.s.b.d.LoggingFailureAnalysisReporter   : 

***************************
APPLICATION FAILED TO START
***************************

Description:

Field transactionManager in org.camunda.bpm.spring.boot.starter.configuration.impl.DefaultDatasourceConfiguration required a bean of type 'org.springframework.transaction.PlatformTransactionManager' that could not be found.

The injection point has the following annotations:
	- @org.springframework.beans.factory.annotation.Autowired(required=true)

The following candidates were found but could not be injected:
	- Bean method 'transactionManager' in 'DataSourceTransactionManagerAutoConfiguration.DataSourceTransactionManagerConfiguration' not loaded because @ConditionalOnSingleCandidate (types: javax.sql.DataSource; SearchStrategy: all) did not find any beans


Action:

Consider revisiting the entries above or defining a bean of type 'org.springframework.transaction.PlatformTransactionManager' in your configuration.

and here is my pom.xml:

<dependencyManagement>
		<dependencies>
			<dependency>
				<groupId>org.springframework.boot</groupId>
				<artifactId>spring-boot-dependencies</artifactId>
				<version>2.1.5.RELEASE</version>
				<type>pom</type>
				<scope>import</scope>
			</dependency>
		</dependencies>
	</dependencyManagement>

	<dependencies>
		<dependency>
			<groupId>org.camunda.bpm.springboot</groupId>
			<artifactId>camunda-bpm-spring-boot-starter-webapp</artifactId>
			<version>3.3.2</version>
		</dependency>
		<dependency>
			<groupId>com.oracle</groupId>
			<artifactId>ojdbc6</artifactId>
			<version>11.2.0.4</version>
		</dependency>
		<!--
		<dependency>
			<groupId>com.h2database</groupId>
			<artifactId>h2</artifactId>
		</dependency>
		-->
	</dependencies>

	<build>
		<plugins>
			<plugin>
				<groupId>org.springframework.boot</groupId>
				<artifactId>spring-boot-maven-plugin</artifactId>
				<configuration>
					<layout>ZIP</layout>
				</configuration>
				<executions>
					<execution>
						<goals>
							<goal>repackage</goal>
						</goals>
					</execution>
				</executions>
			</plugin>
		</plugins>
	</build>

and here is application.properties:

spring.datasource.url=jdbc:oracle:thin:@localhost:1521:orcl
spring.datasource.username=camunda_bpm
spring.datasource.password=camunda_2019
spring.datasource.driver-class=oracle.jdbc.driver.OracleDriver
camunda.bpm.database.type=oracle

@manda091x this problem is with your datasource setup. Datasource and transaction manager bean was not intialized properly.

Can you provide the implementation how you setup the datasource and transaction manager?

Hi @aravindhrs, right now I just have a datasource, no transaction manager. U mean I need to config a transaction manager ? thanks.

Hi @manda091x,

you have to add the spring-boot-starter-jdbc as well:

    <dependency>
      <groupId>org.springframework.boot</groupId>
      <artifactId>spring-boot-starter-jdbc</artifactId>
    </dependency>

Hope this helps, Ingo

Hi @Ingo_Richtsmeier, it works, thanks again

Hi @Ingo_Richtsmeier, I have another question, is it possible to update an existing bpmn file with java model api ? if true,how to do it ? I read the docs but didn’t find the infomation about it. What I know is:

  1. parse bpmn
  2. create new bpmn
    Thanks again

Hi @manda091x,

you can read the model from the engine (https://docs.camunda.org/javadoc/camunda-bpm-platform/7.11/org/camunda/bpm/engine/RepositoryService.html#getProcessModel-java.lang.String-), change it with the model api and deploy it to the engine again: https://docs.camunda.org/javadoc/camunda-bpm-platform/7.11/org/camunda/bpm/engine/RepositoryService.html#createDeployment--

Hope this helps, Ingo

@manda091x
Hii i am getting the same issue: abhle to connect with h2 db but not with oracle db. can you pls help you you resolved your issue .
error trace is:
2020-05-12 12:52:35.073 WARN 1892 — [ main] ConfigServletWebServerApplicationContext : Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name ‘org.camunda.bpm.spring.boot.starter.SpringBootProcessApplication$WebApplicationConfiguration’: Unsatisfied dependency expressed through constructor parameter 0; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name ‘org.camunda.bpm.spring.boot.starter.SpringBootProcessApplication’: Unsatisfied dependency expressed through field ‘processEngine’; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name ‘org.camunda.bpm.spring.boot.starter.CamundaBpmAutoConfiguration$ProcessEngineConfigurationImplDependingConfiguration’: Unsatisfied dependency expressed through field ‘processEngineConfigurationImpl’; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name ‘processEngineConfigurationImpl’ defined in class path resource [org/camunda/bpm/spring/boot/starter/CamundaBpmConfiguration.class]: Unsatisfied dependency expressed through method ‘processEngineConfigurationImpl’ parameter 0; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name ‘camundaDatasourceConfiguration’: Unsatisfied dependency expressed through field ‘transactionManager’; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type ‘org.springframework.transaction.PlatformTransactionManager’ available: expected at least 1 bean which qualifies as autowire candidate. Dependency annotations: {@org.springframework.beans.factory.annotation.Autowired(required=true)}
2020-05-12 12:52:35.078 INFO 1892 — [ main] o.apache.catalina.core.StandardService : Stopping service [Tomcat]
2020-05-12 12:52:35.325 INFO 1892 — [ main] ConditionEvaluationReportLoggingListener :

Error starting ApplicationContext. To display the conditions report re-run your application with ‘debug’ enabled.
2020-05-12 12:52:35.516 ERROR 1892 — [ main] o.s.b.d.LoggingFailureAnalysisReporter :


APPLICATION FAILED TO START


Description:

Field transactionManager in org.camunda.bpm.spring.boot.starter.configuration.impl.DefaultDatasourceConfiguration required a bean of type ‘org.springframework.transaction.PlatformTransactionManager’ that could not be found.

The following candidates were found but could not be injected:
- Bean method ‘transactionManager’ in ‘DataSourceTransactionManagerAutoConfiguration.DataSourceTransactionManagerConfiguration’ not loaded because @ConditionalOnSingleCandidate (types: javax.sql.DataSource; SearchStrategy: all) did not find any beans
- Bean method ‘transactionManager’ in ‘AtomikosJtaConfiguration’ not loaded because @ConditionalOnClass did not find required class ‘com.atomikos.icatch.jta.UserTransactionManager’
- Bean method ‘transactionManager’ in ‘BitronixJtaConfiguration’ not loaded because @ConditionalOnClass did not find required class ‘bitronix.tm.jndi.BitronixContext’
- Bean method ‘transactionManager’ in ‘JndiJtaConfiguration’ not loaded because @ConditionalOnJndi JNDI environment is not available

Action:

Consider revisiting the entries above or defining a bean of type ‘org.springframework.transaction.PlatformTransactionManager’ in your configuration.

@nehaec24

try to add spring-boot-starter-jdbc dependency

1 Like