{"action":"created","issue":{"url":"https://api.github.com/repos/spring-projects/spring-boot/issues/11925","repository_url":"https://api.github.com/repos/spring-projects/spring-boot","labels_url":"https://api.github.com/repos/spring-projects/spring-boot/issues/11925/labels{/name}","comments_url":"https://api.github.com/repos/spring-projects/spring-boot/issues/11925/comments","events_url":"https://api.github.com/repos/spring-projects/spring-boot/issues/11925/events","html_url":"https://github.com/spring-projects/spring-boot/issues/11925","id":294808110,"number":11925,"title":"Adding spring-cloud-starter dependency on Spring-boot version 2.0.0.RC1 with spring-boot-actuator breaks application","user":{"login":"nbenjamin","id":870715,"avatar_url":"https://avatars1.githubusercontent.com/u/870715?v=4","gravatar_id":"","url":"https://api.github.com/users/nbenjamin","html_url":"https://github.com/nbenjamin","followers_url":"https://api.github.com/users/nbenjamin/followers","following_url":"https://api.github.com/users/nbenjamin/following{/other_user}","gists_url":"https://api.github.com/users/nbenjamin/gists{/gist_id}","starred_url":"https://api.github.com/users/nbenjamin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nbenjamin/subscriptions","organizations_url":"https://api.github.com/users/nbenjamin/orgs","repos_url":"https://api.github.com/users/nbenjamin/repos","events_url":"https://api.github.com/users/nbenjamin/events{/privacy}","received_events_url":"https://api.github.com/users/nbenjamin/received_events","type":"User","site_admin":false},"labels":[{"id":293438798,"url":"https://api.github.com/repos/spring-projects/spring-boot/labels/status:%20waiting-for-triage","name":"status: waiting-for-triage","color":"fef2c0","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-02-06T15:47:31Z","updated_at":"2018-02-06T16:02:45Z","closed_at":null,"author_association":"NONE","body":"Hi All,\r\n\r\nI have generated a spring boot project from [start.spring.io](start.spring.io) with the latest version of spring-boot `2.0.0.RC1`. When I add `spring-boot-actuator` with `spring-cloud-starter` application is failing with the following error\r\n\r\n### Exception on startup\r\n```log\r\n.HttpServletResponse)\r\n2018-02-06 10:42:59.833  WARN 39807 --- [           main] ConfigServletWebServerApplicationContext : Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'requestMappingHandlerMapping' defined in class path resource [org/springframework/boot/autoconfigure/web/servlet/WebMvcAutoConfiguration$EnableWebMvcConfiguration.class]: Invocation of init method failed; nested exception is java.lang.ArrayStoreException: sun.reflect.annotation.TypeNotPresentExceptionProxy\r\n2018-02-06 10:42:59.835  INFO 39807 --- [           main] o.apache.catalina.core.StandardService   : Stopping service [Tomcat]\r\n2018-02-06 10:42:59.852  INFO 39807 --- [           main] ConditionEvaluationReportLoggingListener : \r\n\r\nError starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled.\r\n2018-02-06 10:42:59.859 ERROR 39807 --- [           main] o.s.boot.SpringApplication               : Application run failed\r\n\r\norg.springframework.beans.factory.BeanCreationException: Error creating bean with name 'requestMappingHandlerMapping' defined in class path resource [org/springframework/boot/autoconfigure/web/servlet/WebMvcAutoConfiguration$EnableWebMvcConfiguration.class]: Invocation of init method failed; nested exception is java.lang.ArrayStoreException: sun.reflect.annotation.TypeNotPresentExceptionProxy\r\n\tat org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1710) ~[spring-beans-5.0.3.RELEASE.jar:5.0.3.RELEASE]\r\n\tat org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:583) ~[spring-beans-5.0.3.RELEASE.jar:5.0.3.RELEASE]\r\n\tat org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:502) ~[spring-beans-5.0.3.RELEASE.jar:5.0.3.RELEASE]\r\n\tat org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:312) ~[spring-beans-5.0.3.RELEASE.jar:5.0.3.RELEASE]\r\n\tat org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:228) ~[spring-beans-5.0.3.RELEASE.jar:5.0.3.RELEASE]\r\n\tat org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:310) ~[spring-beans-5.0.3.RELEASE.jar:5.0.3.RELEASE]\r\n\tat org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:200) ~[spring-beans-5.0.3.RELEASE.jar:5.0.3.RELEASE]\r\n\tat org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:761) ~[spring-beans-5.0.3.RELEASE.jar:5.0.3.RELEASE]\r\n\tat org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:868) ~[spring-context-5.0.3.RELEASE.jar:5.0.3.RELEASE]\r\n\tat org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:549) ~[spring-context-5.0.3.RELEASE.jar:5.0.3.RELEASE]\r\n\tat org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:138) ~[spring-boot-2.0.0.RC1.jar:2.0.0.RC1]\r\n\tat org.springframework.boot.SpringApplication.refresh(SpringApplication.java:752) [spring-boot-2.0.0.RC1.jar:2.0.0.RC1]\r\n\tat org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:388) [spring-boot-2.0.0.RC1.jar:2.0.0.RC1]\r\n\tat org.springframework.boot.SpringApplication.run(SpringApplication.java:327) [spring-boot-2.0.0.RC1.jar:2.0.0.RC1]\r\n\tat org.springframework.boot.SpringApplication.run(SpringApplication.java:1246) [spring-boot-2.0.0.RC1.jar:2.0.0.RC1]\r\n\tat org.springframework.boot.SpringApplication.run(SpringApplication.java:1234) [spring-boot-2.0.0.RC1.jar:2.0.0.RC1]\r\n\tat com.example.demo.DemoApplication.main(DemoApplication.java:13) [classes/:na]\r\nCaused by: java.lang.ArrayStoreException: sun.reflect.annotation.TypeNotPresentExceptionProxy\r\n\tat sun.reflect.annotation.AnnotationParser.parseClassArray(AnnotationParser.java:724) ~[na:1.8.0_74]\r\n\tat sun.reflect.annotation.AnnotationParser.parseArray(AnnotationParser.java:531) ~[na:1.8.0_74]\r\n\tat sun.reflect.annotation.AnnotationParser.parseMemberValue(AnnotationParser.java:355) ~[na:1.8.0_74]\r\n\tat sun.reflect.annotation.AnnotationParser.parseAnnotation2(AnnotationParser.java:286) ~[na:1.8.0_74]\r\n\tat sun.reflect.annotation.AnnotationParser.parseAnnotations2(AnnotationParser.java:120) ~[na:1.8.0_74]\r\n\tat sun.reflect.annotation.AnnotationParser.parseAnnotations(AnnotationParser.java:72) ~[na:1.8.0_74]\r\n\tat java.lang.Class.createAnnotationData(Class.java:3521) ~[na:1.8.0_74]\r\n\tat java.lang.Class.annotationData(Class.java:3510) ~[na:1.8.0_74]\r\n\tat java.lang.Class.createAnnotationData(Class.java:3526) ~[na:1.8.0_74]\r\n\tat java.lang.Class.annotationData(Class.java:3510) ~[na:1.8.0_74]\r\n\tat java.lang.Class.getAnnotation(Class.java:3415) ~[na:1.8.0_74]\r\n\tat java.lang.reflect.AnnotatedElement.isAnnotationPresent(AnnotatedElement.java:258) ~[na:1.8.0_74]\r\n\tat java.lang.Class.isAnnotationPresent(Class.java:3425) ~[na:1.8.0_74]\r\n\tat org.springframework.core.annotation.AnnotatedElementUtils.hasAnnotation(AnnotatedElementUtils.java:610) ~[spring-core-5.0.3.RELEASE.jar:5.0.3.RELEASE]\r\n\tat org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping.isHandler(RequestMappingHandlerMapping.java:177) ~[spring-webmvc-5.0.3.RELEASE.jar:5.0.3.RELEASE]\r\n\tat org.springframework.web.servlet.handler.AbstractHandlerMethodMapping.initHandlerMethods(AbstractHandlerMethodMapping.java:217) ~[spring-webmvc-5.0.3.RELEASE.jar:5.0.3.RELEASE]\r\n\tat org.springframework.web.servlet.handler.AbstractHandlerMethodMapping.afterPropertiesSet(AbstractHandlerMethodMapping.java:188) ~[spring-webmvc-5.0.3.RELEASE.jar:5.0.3.RELEASE]\r\n\tat org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping.afterPropertiesSet(RequestMappingHandlerMapping.java:129) ~[spring-webmvc-5.0.3.RELEASE.jar:5.0.3.RELEASE]\r\n\tat org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1769) ~[spring-beans-5.0.3.RELEASE.jar:5.0.3.RELEASE]\r\n\tat org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1706) ~[spring-beans-5.0.3.RELEASE.jar:5.0.3.RELEASE]\r\n\t... 16 common frames omitted\r\n```\r\n### How to reproduce \r\nCreate maven project with following pom.xml and java code\r\n#### pom.xml\r\n```xml\r\n<?xml version=\"1.0\" encoding=\"UTF-8\"?>\r\n<project xmlns=\"http://maven.apache.org/POM/4.0.0\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\r\n\txsi:schemaLocation=\"http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd\">\r\n\t<modelVersion>4.0.0</modelVersion>\r\n\r\n\t<groupId>com.example</groupId>\r\n\t<artifactId>demo</artifactId>\r\n\t<version>0.0.1-SNAPSHOT</version>\r\n\t<packaging>jar</packaging>\r\n\r\n\t<name>demo</name>\r\n\t<description>Demo project for Spring Boot</description>\r\n\r\n\t<parent>\r\n\t\t<groupId>org.springframework.boot</groupId>\r\n\t\t<artifactId>spring-boot-starter-parent</artifactId>\r\n\t\t<version>2.0.0.RC1</version>\r\n\t\t<relativePath/> <!-- lookup parent from repository -->\r\n\t</parent>\r\n\r\n\t<properties>\r\n\t\t<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>\r\n\t\t<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>\r\n\t\t<java.version>1.8</java.version>\r\n\t\t<spring-cloud.version>Finchley.BUILD-SNAPSHOT</spring-cloud.version>\r\n\t</properties>\r\n\r\n\t<dependencies>\r\n\t\t<dependency>\r\n\t\t\t<groupId>org.springframework.cloud</groupId>\r\n\t\t\t<artifactId>spring-cloud-starter</artifactId>\r\n\t\t</dependency>\r\n\t\t<dependency>\r\n\t\t\t<groupId>org.springframework.boot</groupId>\r\n\t\t\t<artifactId>spring-boot-starter-web</artifactId>\r\n\t\t</dependency>\r\n\t\t<dependency>\r\n\t\t\t<groupId>org.springframework.boot</groupId>\r\n\t\t\t<artifactId>spring-boot-actuator</artifactId>\r\n\t\t</dependency>\r\n\t\t<dependency>\r\n\t\t\t<groupId>org.springframework.boot</groupId>\r\n\t\t\t<artifactId>spring-boot-starter-test</artifactId>\r\n\t\t\t<scope>test</scope>\r\n\t\t</dependency>\r\n\t</dependencies>\r\n\r\n\t<dependencyManagement>\r\n\t\t<dependencies>\r\n\t\t\t<dependency>\r\n\t\t\t\t<groupId>org.springframework.cloud</groupId>\r\n\t\t\t\t<artifactId>spring-cloud-dependencies</artifactId>\r\n\t\t\t\t<version>${spring-cloud.version}</version>\r\n\t\t\t\t<type>pom</type>\r\n\t\t\t\t<scope>import</scope>\r\n\t\t\t</dependency>\r\n\t\t</dependencies>\r\n\t</dependencyManagement>\r\n\r\n\t<build>\r\n\t\t<plugins>\r\n\t\t\t<plugin>\r\n\t\t\t\t<groupId>org.springframework.boot</groupId>\r\n\t\t\t\t<artifactId>spring-boot-maven-plugin</artifactId>\r\n\t\t\t</plugin>\r\n\t\t</plugins>\r\n\t</build>\r\n\r\n\t<repositories>\r\n\t\t<repository>\r\n\t\t\t<id>spring-snapshots</id>\r\n\t\t\t<name>Spring Snapshots</name>\r\n\t\t\t<url>https://repo.spring.io/snapshot</url>\r\n\t\t\t<snapshots>\r\n\t\t\t\t<enabled>true</enabled>\r\n\t\t\t</snapshots>\r\n\t\t</repository>\r\n\t\t<repository>\r\n\t\t\t<id>spring-milestones</id>\r\n\t\t\t<name>Spring Milestones</name>\r\n\t\t\t<url>https://repo.spring.io/milestone</url>\r\n\t\t\t<snapshots>\r\n\t\t\t\t<enabled>false</enabled>\r\n\t\t\t</snapshots>\r\n\t\t</repository>\r\n\t</repositories>\r\n\r\n\t<pluginRepositories>\r\n\t\t<pluginRepository>\r\n\t\t\t<id>spring-snapshots</id>\r\n\t\t\t<name>Spring Snapshots</name>\r\n\t\t\t<url>https://repo.spring.io/snapshot</url>\r\n\t\t\t<snapshots>\r\n\t\t\t\t<enabled>true</enabled>\r\n\t\t\t</snapshots>\r\n\t\t</pluginRepository>\r\n\t\t<pluginRepository>\r\n\t\t\t<id>spring-milestones</id>\r\n\t\t\t<name>Spring Milestones</name>\r\n\t\t\t<url>https://repo.spring.io/milestone</url>\r\n\t\t\t<snapshots>\r\n\t\t\t\t<enabled>false</enabled>\r\n\t\t\t</snapshots>\r\n\t\t</pluginRepository>\r\n\t</pluginRepositories>\r\n\r\n\r\n</project>\r\n\r\n```\r\n```java\r\n@SpringBootApplication\r\npublic class DemoApplication {\r\n\r\n\tpublic static void main(String[] args) {\r\n\t\tSpringApplication.run(DemoApplication.class, args);\r\n\t}\r\n}\r\n\r\n```\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/spring-projects/spring-boot/issues/comments/363469563","html_url":"https://github.com/spring-projects/spring-boot/issues/11925#issuecomment-363469563","issue_url":"https://api.github.com/repos/spring-projects/spring-boot/issues/11925","id":363469563,"user":{"login":"wilkinsona","id":914682,"avatar_url":"https://avatars3.githubusercontent.com/u/914682?v=4","gravatar_id":"","url":"https://api.github.com/users/wilkinsona","html_url":"https://github.com/wilkinsona","followers_url":"https://api.github.com/users/wilkinsona/followers","following_url":"https://api.github.com/users/wilkinsona/following{/other_user}","gists_url":"https://api.github.com/users/wilkinsona/gists{/gist_id}","starred_url":"https://api.github.com/users/wilkinsona/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wilkinsona/subscriptions","organizations_url":"https://api.github.com/users/wilkinsona/orgs","repos_url":"https://api.github.com/users/wilkinsona/repos","events_url":"https://api.github.com/users/wilkinsona/events{/privacy}","received_events_url":"https://api.github.com/users/wilkinsona/received_events","type":"User","site_admin":false},"created_at":"2018-02-06T16:02:45Z","updated_at":"2018-02-06T16:02:45Z","author_association":"MEMBER","body":"This is a bug in Spring Cloud's `RefreshEndpointAutoConfiguration`. It references `EndpointAutoConfiguration` without checking that `spring-boot-actuator-autoconfigure` is on the class path. Can you please raise a [Spring Cloud Commons](/spring-cloud/spring-cloud-commons) issue?"}}
{"actor":{"display_login":"wilkinsona"}}