Creating an embedded Webapp using Springboot

After reading the documentation at https://docs.camunda.org/get-started/spring-boot/.
I created a new Gradle Springboot Project with springboot 2.1.6.

I added springboot starter as below;

implementation 'org.camunda.bpm.springboot:camunda-bpm-spring-boot-starter-webapp:3.3.1'

then i run the application which throws the error as below;

2019-07-12 15:01:47.119  INFO 13772 --- [           main] o.s.b.w.embedded.tomcat.TomcatWebServer  : Tomcat initialized with port(s): 8080 (http)
2019-07-12 15:01:47.159  INFO 13772 --- [           main] o.apache.catalina.core.StandardService   : Starting service [Tomcat]
2019-07-12 15:01:47.159  INFO 13772 --- [           main] org.apache.catalina.core.StandardEngine  : Starting Servlet engine: [Apache Tomcat/9.0.21]
2019-07-12 15:01:47.439  INFO 13772 --- [           main] o.a.c.c.C.[Tomcat].[localhost].[/]       : Initializing Spring embedded WebApplicationContext
2019-07-12 15:01:47.439  INFO 13772 --- [           main] o.s.web.context.ContextLoader            : Root WebApplicationContext: initialization completed in 2047 ms
2019-07-12 15:01:47.761  WARN 13772 --- [           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.NoSuchBeanDefinitionException: No qualifying bean of type 'org.camunda.bpm.engine.ProcessEngine' available: expected at least 1 bean which qualifies as autowire candidate. Dependency annotations: {@org.springframework.beans.factory.annotation.Autowired(required=true)}
2019-07-12 15:01:47.773  INFO 13772 --- [           main] o.apache.catalina.core.StandardService   : Stopping service [Tomcat]
2019-07-12 15:01:47.779 ERROR 13772 --- [           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:49) ~[camunda-bpm-spring-boot-starter-webapp-core-3.0.0.jar:3.0.0]
	at org.apache.catalina.core.ApplicationFilterConfig.release(ApplicationFilterConfig.java:301) ~[tomcat-embed-core-9.0.21.jar:9.0.21]

anyone experienced this or with any fix?
Thanx.

@kavi please check by adding this dependency. Also make sure to set up the datasource and transaction manager

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

2 Likes

That was so fast!
Thank you aravindhrs, you dependency worked and pointed me to other missing datasource dependencies.