title: Eureka server not working with Spring Boot 2.0.0.M4
body: <p>I tried to update my microservices-based web application from Spring Boot 2.0.0.M3 to the newest 2.0.0.M4.</p>
  
  <p>When running my Eureka server, I'm facing the following exception and the context won't load:</p>
  
  <pre><code>2017-09-19 10:22:05.455  INFO 16388 --- [           main] o.s.core.annotation.AnnotationUtils      : Failed to introspect annotations on [class org.springframework.cloud.netflix.hystrix.HystrixAutoConfiguration$$EnhancerBySpringCGLIB$$5d536e23]: java.lang.ArrayStoreException: sun.reflect.annotation.TypeNotPresentExceptionProxy
  2017-09-19 10:22:05.456  INFO 16388 --- [           main] o.s.core.annotation.AnnotationUtils      : Failed to introspect annotations on [class org.springframework.cloud.netflix.hystrix.HystrixAutoConfiguration$$EnhancerBySpringCGLIB$$5d536e23]: java.lang.ArrayStoreException: sun.reflect.annotation.TypeNotPresentExceptionProxy
  2017-09-19 10:22:05.572  INFO 16388 --- [           main] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/error],produces=[text/html]}" onto public org.springframework.web.servlet.ModelAndView org.springframework.boot.autoconfigure.web.servlet.error.BasicErrorController.errorHtml(javax.servlet.http.HttpServletRequest,javax.servlet.http.HttpServletResponse)
  2017-09-19 10:22:05.573  INFO 16388 --- [           main] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/error]}" onto public org.springframework.http.ResponseEntity&lt;java.util.Map&lt;java.lang.String, java.lang.Object&gt;&gt; org.springframework.boot.autoconfigure.web.servlet.error.BasicErrorController.error(javax.servlet.http.HttpServletRequest)
  2017-09-19 10:22:05.579  INFO 16388 --- [           main] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/lastn],methods=[GET]}" onto public java.lang.String org.springframework.cloud.netflix.eureka.server.EurekaController.lastn(javax.servlet.http.HttpServletRequest,java.util.Map&lt;java.lang.String, java.lang.Object&gt;)
  2017-09-19 10:22:05.580  INFO 16388 --- [           main] s.w.s.m.m.a.RequestMappingHandlerMapping : Mapped "{[/],methods=[GET]}" onto public java.lang.String org.springframework.cloud.netflix.eureka.server.EurekaController.status(javax.servlet.http.HttpServletRequest,java.util.Map&lt;java.lang.String, java.lang.Object&gt;)
  2017-09-19 10:22:05.582  WARN 16388 --- [           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
  2017-09-19 10:22:05.587  WARN 16388 --- [           main] o.s.b.f.support.DisposableBeanAdapter    : Invocation of destroy method 'close' failed on bean with name 'eurekaRegistration': org.springframework.beans.factory.BeanCreationNotAllowedException: Error creating bean with name 'org.springframework.cloud.netflix.eureka.EurekaClientAutoConfiguration$RefreshableEurekaClientConfiguration': Singleton bean creation not allowed while singletons of this factory are in destruction (Do not request a bean from a BeanFactory in a destroy method implementation!)
  2017-09-19 10:22:05.589  INFO 16388 --- [           main] o.apache.catalina.core.StandardService   : Stopping service [Tomcat]
  2017-09-19 10:22:05.612  INFO 16388 --- [           main] utoConfigurationReportLoggingInitializer : 
  
  Error starting ApplicationContext. To display the auto-configuration report re-run your application with 'debug' enabled.
  2017-09-19 10:22:05.615 ERROR 16388 --- [           main] o.s.boot.SpringApplication               : Application startup failed
  
  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
      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1702)
      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:583)
      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:502)
      at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:312)
      at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:228)
      at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:310)
      at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:200)
      at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:756)
      at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:868)
      at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:549)
      at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:122)
      at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:750)
      at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:386)
      at org.springframework.boot.SpringApplication.run(SpringApplication.java:327)
      at org.springframework.boot.SpringApplication.run(SpringApplication.java:1245)
      at org.springframework.boot.SpringApplication.run(SpringApplication.java:1233)
      at fr.auchan.wheatley.discovery.DiscoveryApplication.main(DiscoveryApplication.java:18)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:498)
      at org.springframework.boot.maven.AbstractRunMojo$LaunchRunner.run(AbstractRunMojo.java:496)
      at java.lang.Thread.run(Thread.java:745)
  Caused by: java.lang.ArrayStoreException: sun.reflect.annotation.TypeNotPresentExceptionProxy
      at sun.reflect.annotation.AnnotationParser.parseClassArray(AnnotationParser.java:724)
      at sun.reflect.annotation.AnnotationParser.parseArray(AnnotationParser.java:531)
      at sun.reflect.annotation.AnnotationParser.parseMemberValue(AnnotationParser.java:355)
      at sun.reflect.annotation.AnnotationParser.parseAnnotation2(AnnotationParser.java:286)
      at sun.reflect.annotation.AnnotationParser.parseAnnotations2(AnnotationParser.java:120)
      at sun.reflect.annotation.AnnotationParser.parseAnnotations(AnnotationParser.java:72)
      at java.lang.Class.createAnnotationData(Class.java:3521)
      at java.lang.Class.annotationData(Class.java:3510)
      at java.lang.Class.createAnnotationData(Class.java:3526)
      at java.lang.Class.annotationData(Class.java:3510)
      at java.lang.Class.getAnnotation(Class.java:3415)
      at java.lang.reflect.AnnotatedElement.isAnnotationPresent(AnnotatedElement.java:258)
      at java.lang.Class.isAnnotationPresent(Class.java:3425)
      at org.springframework.core.annotation.AnnotatedElementUtils.hasAnnotation(AnnotatedElementUtils.java:611)
      at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping.isHandler(RequestMappingHandlerMapping.java:177)
      at org.springframework.web.servlet.handler.AbstractHandlerMethodMapping.initHandlerMethods(AbstractHandlerMethodMapping.java:217)
      at org.springframework.web.servlet.handler.AbstractHandlerMethodMapping.afterPropertiesSet(AbstractHandlerMethodMapping.java:188)
      at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping.afterPropertiesSet(RequestMappingHandlerMapping.java:129)
      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1761)
      at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1698)
  </code></pre>
  
  <p>I wondered if it was due to some configuration on my side, so I tried to recreate an Eureka Server from scratch with Spring Boot 2.0.0.M4 using the Spring Initializr.</p>
  
  <p>The only fact of adding the <em>spring-cloud-starter-eureka-server</em> dependency to the POM triggers the error.</p>
  
  <p>Here's the configuration:</p>
  
  <ul>
  <li>Spring Boot 2.0.0.M4</li>
  <li>Spring Cloud Finchley M2</li>
  </ul>
  
  <p>Is there some incompatibility between Eureka and the last milestone version of Spring Boot? Or maybe some configuration point that I might miss? I didn't find anything about it in the migration guide.</p>
  
  <p>EDIT: in the end, the same exception also appears on my client microservices when the <em>spring-cloud-starter-eureka</em> dependency is present  in the POM.</p>