Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No qualifying bean of type [org.camunda.bpm.spring.boot.starter.CamundaBpmProperties] #41

Closed
praveenbelkar opened this issue Feb 25, 2016 · 9 comments
Assignees
Labels
Milestone

Comments

@praveenbelkar
Copy link

We are creating SpringBoot gradle project with camunda-bpm dependencies in it. However when we run the Application.java - it throws following exception.

org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type [org.camunda.bpm.spring.boot.starter.CamundaBpmProperties] is defined at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBean(DefaultListableBeanFactory.java:371) ~[spring-beans-4.1.7.RELEASE.jar:4.1.7.RELEASE] at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBean(DefaultListableBeanFactory.java:331) ~[spring-beans-4.1.7.RELEASE.jar:4.1.7.RELEASE] at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:968) ~[spring-context-4.1.7.RELEASE.jar:4.1.7.RELEASE] at org.camunda.bpm.spring.boot.starter.runlistener.AbstractFinishedWithNoExceptionRunListener.getBean(AbstractFinishedWithNoExceptionRunListener.java:80) ~[camunda-bpm-spring-boot-starter-1.0.0.jar:1.0.0] at org.camunda.bpm.spring.boot.starter.runlistener.AbstractFinishedWithNoExceptionRunListener.finished(AbstractFinishedWithNoExceptionRunListener.java:42) ~[camunda-bpm-spring-boot-starter-1.0.0.jar:1.0.0] at org.springframework.boot.SpringApplication.run(SpringApplication.java:323) [spring-boot-1.2.5.RELEASE.jar:1.2.5.RELEASE] at org.springframework.boot.builder.SpringApplicationBuilder.run(SpringApplicationBuilder.java:139) [spring-boot-1.2.5.RELEASE.jar:1.2.5.RELEASE] at org.springframework.cloud.bootstrap.BootstrapApplicationListener.bootstrapServiceContext(BootstrapApplicationListener.java:126) [spring-cloud-context-1.0.2.RELEASE.jar:1.0.2.RELEASE] at org.springframework.cloud.bootstrap.BootstrapApplicationListener.onApplicationEvent(BootstrapApplicationListener.java:75) [spring-cloud-context-1.0.2.RELEASE.jar:1.0.2.RELEASE] at org.springframework.cloud.bootstrap.BootstrapApplicationListener.onApplicationEvent(BootstrapApplicationListener.java:55) [spring-cloud-context-1.0.2.RELEASE.jar:1.0.2.RELEASE] at org.springframework.context.event.SimpleApplicationEventMulticaster.invokeListener(SimpleApplicationEventMulticaster.java:151) [spring-context-4.1.7.RELEASE.jar:4.1.7.RELEASE] at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:128) [spring-context-4.1.7.RELEASE.jar:4.1.7.RELEASE] at org.springframework.boot.context.event.EventPublishingRunListener.publishEvent(EventPublishingRunListener.java:100) [spring-boot-1.2.5.RELEASE.jar:1.2.5.RELEASE] at org.springframework.boot.context.event.EventPublishingRunListener.environmentPrepared(EventPublishingRunListener.java:59) [spring-boot-1.2.5.RELEASE.jar:1.2.5.RELEASE] at org.springframework.boot.SpringApplication.run(SpringApplication.java:285) [spring-boot-1.2.5.RELEASE.jar:1.2.5.RELEASE] at com.emc.gs.aaa.logic.service.Application.main(Application.java:53) [bin/:na]

The dependencies included in build.gradle is -
compile group: 'org.camunda.bpm.extension', name: 'camunda-bpm-spring-boot-starter', version: '1.1.0'
compile group: 'org.camunda.bpm.webapp', name: 'camunda-webapp-webjar', version: '7.4.0'

@jangalinski
Copy link
Contributor

Could you provide an example project somewhere? It might get hard to reproduce since the examples prove the setup (at least using maven) basically work ...

@qihaiyan
Copy link

qihaiyan commented Mar 3, 2016

when importing springcloud in gradle like:
compile("org.springframework.cloud:spring-cloud-starter-zuul")
compile("org.springframework.cloud:spring-cloud-starter-security")
the error will be reproduced.

@jangalinski
Copy link
Contributor

Ok, I will have a look

@hebbaa
Copy link

hebbaa commented Mar 16, 2016

any update on this issue?

@hebbaa
Copy link

hebbaa commented Mar 16, 2016

I am facing the same issue

@pixelthekid
Copy link

This is also happening for us, if we import spring cloud, Camunda will not start. This is using Maven.

@pixelthekid
Copy link

I think this is related to this fix: https://github.com/camunda/camunda-bpm-spring-boot-starter/pull/37/files

Something to do with spring cloud's parent context.

@hebbaa
Copy link

hebbaa commented Mar 22, 2016

Spring cloud will create its own bootstrap application context and Tries to invoke
org.camunda.bpm.spring.boot.starter.runlistener.AbstractFinishedWithNoExceptionRunListener
But this has got dependency of
CamundaBpmProperties which will
not be instantiated implicitly by
bootstrap context

To fix above

Create directory
META-INF/spring.factories
Under resource directory
And add key, value
org.springframework.cloud.bootstrap.BootstrapConfiguration=org.camunda.bpm.spring.boot.starter.CamundaBpmProperties to
spring.factories

@jangalinski jangalinski added this to the 1.2 milestone Mar 26, 2016
@jangalinski jangalinski self-assigned this Mar 26, 2016
@jangalinski
Copy link
Contributor

I added an example that adds dependency to cloud. Could reproduce the error. Fixed it by adding the cloud-bootSTrapConfiguration to the existing spring.factories. Thanks @hebbaa for the solution idea.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants