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

Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans #10

Open
eliassal opened this issue Jun 5, 2020 · 2 comments

Comments

@eliassal
Copy link

eliassal commented Jun 5, 2020

Hi Elton,
I followed instructions in the book for creating the container image-of-the-day(windows 10),
when I issue the command

docker container run --name iotd -d -p 3000:80 --network nat image-of-the-day

Container starts and stops, in the logs, I can see the following error:

. ____ _ __ _ _
/\ / ' __ _ () __ __ _ \ \ \
( ( )_
_ | '_ | '| | ' / ` | \ \ \
\/ )| |)| | | | | || (| | ) ) ) )
' |
| .__|| ||| |_, | / / / /
=========|
|==============|/=////
:: Spring Boot :: (v2.1.3.RELEASE)

2020-06-05 19:49:02.733 INFO 1384 --- [ main] iotd.Application : Starting Application v0.1.0 on 97c574e91764 with PID 1384 (C:\app\iotd-service-0.1.0.jar started by ContainerUser in C:\app)
2020-06-05 19:49:02.733 INFO 1384 --- [ main] iotd.Application : No active profile set, falling back to default profiles: default
2020-06-05 19:49:03.077 WARN 1384 --- [ main] ConfigServletWebServerApplicationContext : Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanDefinitionStoreException: Failed to parse configuration class [iotd.Application]; nested exception is org.springframework.context.annotation.ConflictingBeanDefinitionException: Annotation-specified bean name 'imageController' for bean class [iotd.ImageController] conflicts with existing, non-compatible bean definition of same name and class [iotd.controllers.ImageController]
2020-06-05 19:49:03.562 ERROR 1384 --- [ main] o.s.boot.SpringApplication : Application run failed

org.springframework.beans.factory.BeanDefinitionStoreException: Failed to parse configuration class [iotd.Application]; nested exception is org.springframework.context.annotation.ConflictingBeanDefinitionException: Annotation-specified bean name 'imageController' for bean class [iotd.ImageController] conflicts with existing, non-compatible bean definition of same name and class [iotd.controllers.ImageController]

I am not a Java expert, can you help please, here is a snaphot
diamol

@aswro
Copy link

aswro commented Dec 25, 2021

I am also running into the same issue. were you able to address it?

@eliassal
Copy link
Author

Not really, since no response from Elton, I did not follow

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

No branches or pull requests

2 participants