Antonio Sanchez opened SPR-15969 and commented
Hi
I have the following error, searching in several forums (ie stackoverflow, springio, so on) I could not find any response, because I have the following scenario:
I have a Rest spring boot app, but this app reuses many modules and other apps, all the includes / imports is by maven dependency, all modules (persistence, model, service) are working well but at the moment to start with REST project all heritaged configuration it's not working with the Rest project, I tried to follow the rest config from reference, guides or examples without success, I was able to create a common rest service but at the moment to reuse projects are not working. I was able to start the spring boot app with the parameter spring.main.web-environment=false, but once the app up all context and services qhe rest app is turned off, following forums and discussions I can see is a bug from spring boot.
I hava the following config: Spring Boot 1.5.6.RELEASE Spring 4.3.10 Java 8
I paste the complete error.
[2017-09-15@15:28:41.927] [main] [WARN ] [o.s.b.c.e.AnnotationConfigEmbeddedWebApplicationContext:551] Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'requestMappingHandlerAdapter' defined in class path resource [org/springframework/boot/autoconfigure/web/WebMvcAutoConfiguration$EnableWebMvcConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter]: Factory method 'requestMappingHandlerAdapter' threw exception; nested exception is java.lang.IllegalStateException: @Bean
method WebMvcConfigurationSupport.mvcConversionService called as a bean reference for type [org.springframework.format.support.FormattingConversionService] but overridden by non-compatible bean instance of type [com.sun.proxy.$Proxy173]. Overriding bean of same name declared in: class path resource [org/springframework/boot/autoconfigure/web/WebMvcAutoConfiguration$EnableWebMvcConfiguration.class]
Affects: 4.3.10
Attachments: - springboot_error_buildingcontext.JPG (283.16 kB)
Comment From: spring-projects-issues
Stéphane Nicoll commented
That sounds like more of a question of why this is failing rather than a bug report. We do use StackOverflow for those so please ask there. When you do, it would be helpful to provide a reference to a sample project that we can run to reproduce the problem. Feel free to add a comment here with the link to your question so that others can find it. Thanks!
Comment From: xhli096
how to solve this question?
Comment From: apurvakokate
Getting the same error. What is the solution?
Comment From: fredhansen
Cannot find this on stackoverflow. Did any of you find a solution?