Repository navigation
Description
Not sure if bugs against the snapshot version are tracked here, apologies if this should go somewhere else.
In any case, the issue is that actuator appears to be having some issues in the latest snapshot which prevent spring boot from starting up properly. This even happens with an empty project.
To reproduce it, set up a project using https://start.spring.io/ and keep the defaults except for these options:
- Type: Gradle Project
- Java Version: 1.8
- Spring boot Version: 1.3.0 (SNAPSHOT)
- Check Web and Actuator for project dependencies
Download the project and run it with gradle bootRun, and it will fail to start with lots of error messages that I don't know how to interpret :) If you remove actuator from the dependencies then it starts up without issue. This started happening within the last week at most. Here's the stack trace:
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'endpointHandlerMapping' defined in class path resource [org/springframework/boot/actuate/autoconfigure/EndpointW
ebMvcAutoConfiguration.class]: Invocation of init method failed; nested exception is java.lang.IllegalStateException: Cannot map public java.lang.Object org.springframework.boot.actuate.endpoint.mvc.E
ndpointMvcAdapter.invoke()
to {[/info],methods=[GET],params=[],headers=[],consumes=[],produces=[],custom=[]}.
It is already mapped to {[/env],methods=[GET],params=[],headers=[],consumes=[],produces=[],custom=[]}
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1578)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:545)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:482)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:304)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:300)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:195)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:766)
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:812)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContex521)va:
at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.refresh(EmbeddedWebApplicationContext.java:118)
at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:687)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:321)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:958)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:947)
at demo.DemoApplication.main(DemoApplication.java:10)
Caused by: java.lang.IllegalStateException: Cannot map public java.lang.Object org.springframework.boot.actuate.endpoint.mvc.EndpointMvcAdapter.invoke()
to {[/info],methods=[GET],params=[],headers=[],consumes=[],produces=[],custom=[]}.
It is already mapped to {[/env],methods=[GET],params=[],headers=[],consumes=[],produces=[],custom=[]}
at org.springframework.web.servlet.handler.AbstractHandlerMethodMapping$MappingRegistry.assertUniqueMethodMapping(AbstractHandlerMethodMapping.java:546)
at org.springframework.web.servlet.handler.AbstractHandlerMethodMapping$MappingRegistry.register(AbstractHandlerMethodMapping.java:507)
at org.springframework.web.servlet.handler.AbstractHandlerMethodMapping.registerHandlerMethod(AbstractHandlerMethodMapping.java:240)
at org.springframework.boot.actuate.endpoint.mvc.EndpointHandlerMapping.registerHandlerMethod(EndpointHandlerMapping.java:98)
at org.springframework.boot.actuate.endpoint.mvc.EndpointHandlerMapping.registerHandlerMethod(EndpointHandlerMapping.java:51)
at org.springframework.web.servlet.handler.AbstractHandlerMethodMapping.detectHandlerMethods(AbstractHandlerMethodMapping.java:215)
at org.springframework.boot.actuate.endpoint.mvc.EndpointHandlerMapping.afterPropertiesSet(EndpointHandlerMapping.java:77)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1637)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstrwireCapableBeanFactory.java:1574)
Thanks for taking a look, and thanks for this amazing project!
Activity
shakuzen commentedon May 4, 2015
I am having this issue too and it looks like it is from about an hour ago (https://build.spring.io/browse/BOOT-WIN-JOB1-290/log). I think #2908 might be the same issue and a pull request to fix it has been made. I hope this can be resolved soon.
rstoyanchev commentedon May 4, 2015
This is almost certainly a result of recent changes checked into Spring Framework master today. Looking into it.
rstoyanchev commentedon May 4, 2015
I've re-opened https://jira.spring.io/browse/SPR-11541 which is the underlying cause for this.
rstoyanchev commentedon May 4, 2015
I've pushed a fix to the Spring Framework after verifying it works with the above instructions. It should become available soon. Feel free to re-open if need be but it should work.
jordanjennings commentedon May 4, 2015
Thanks, for the moment until an updated snapshot is available I have worked around the problem by adding the following lines to my gradle build (uses the snapshot build from May 2nd instead of the one from today):
philwebb commentedon May 5, 2015
@jordanjennings The updated SNAPSHOT is available. You might need to run your build using
-Uto force maven to update snapshot dependencies.