org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'exceptionMeteredAnnotationBeanPostProcessor' defined in class path resource [com/ryantenney/metrics/spring/config/annotation/DelegatingMetricsConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.beans.factory.config.BeanPostProcessor]: Factory method 'exceptionMeteredAnnotationBeanPostProcessor' threw exception; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'getMetricRegistry' defined in class path resource [com/ryantenney/metrics/spring/config/annotation/DelegatingMetricsConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [com.codahale.metrics.MetricRegistry]: Factory method 'getMetricRegistry' threw exception; nested exception is java.lang.IllegalStateException: Failed to introspect annotations on public com.codahale.metrics.MetricRegistry com.ryantenney.metrics.spring.config.annotation.DelegatingMetricsConfiguration.getMetricRegistry()

GitHub | nickcodefresh | 6 months ago
tip
Click on the to mark the solution that helps you, Samebug will learn from it.
As a community member, you’ll be rewarded for you help.
  1. 1

    Not working when upgrading to Spring Boot 1.4

    GitHub | 6 months ago | nickcodefresh
    org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'exceptionMeteredAnnotationBeanPostProcessor' defined in class path resource [com/ryantenney/metrics/spring/config/annotation/DelegatingMetricsConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.beans.factory.config.BeanPostProcessor]: Factory method 'exceptionMeteredAnnotationBeanPostProcessor' threw exception; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'getMetricRegistry' defined in class path resource [com/ryantenney/metrics/spring/config/annotation/DelegatingMetricsConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [com.codahale.metrics.MetricRegistry]: Factory method 'getMetricRegistry' threw exception; nested exception is java.lang.IllegalStateException: Failed to introspect annotations on public com.codahale.metrics.MetricRegistry com.ryantenney.metrics.spring.config.annotation.DelegatingMetricsConfiguration.getMetricRegistry()

    Root Cause Analysis

    1. java.lang.IllegalStateException

      Failed to introspect annotations on public com.codahale.metrics.MetricRegistry com.ryantenney.metrics.spring.config.annotation.DelegatingMetricsConfiguration.getMetricRegistry()

      at org.springframework.core.annotation.AnnotatedElementUtils.searchWithFindSemantics()
    2. Spring Core
      AnnotatedElementUtils.findMergedAnnotation
      1. org.springframework.core.annotation.AnnotatedElementUtils.searchWithFindSemantics(AnnotatedElementUtils.java:1091)
      2. org.springframework.core.annotation.AnnotatedElementUtils.searchWithFindSemantics(AnnotatedElementUtils.java:1060)
      3. org.springframework.core.annotation.AnnotatedElementUtils.findMergedAnnotationAttributes(AnnotatedElementUtils.java:656)
      4. org.springframework.core.annotation.AnnotatedElementUtils.findMergedAnnotation(AnnotatedElementUtils.java:730)
      4 frames
    3. Spring Context
      ConfigurationClassEnhancer$BeanMethodInterceptor.intercept
      1. org.springframework.context.annotation.ConfigurationClassEnhancer$BeanMethodInterceptor.intercept(ConfigurationClassEnhancer.java:314)
      1 frame
    4. com.ryantenney.metrics
      DelegatingMetricsConfiguration$$EnhancerBySpringCGLIB$$ebc91b57$$FastClassBySpringCGLIB$$f5aaeb49.invoke
      1. com.ryantenney.metrics.spring.config.annotation.DelegatingMetricsConfiguration$$EnhancerBySpringCGLIB$$ebc91b57.getMetricRegistry(<generated>)
      2. com.ryantenney.metrics.spring.config.annotation.MetricsConfigurerComposite.getMetricRegistry(MetricsConfigurerComposite.java:52)
      3. com.ryantenney.metrics.spring.config.annotation.DelegatingMetricsConfiguration.getMetricRegistry(DelegatingMetricsConfiguration.java:59)
      4. com.ryantenney.metrics.spring.config.annotation.DelegatingMetricsConfiguration$$EnhancerBySpringCGLIB$$ebc91b57.CGLIB$getMetricRegistry$2(<generated>)
      5. com.ryantenney.metrics.spring.config.annotation.DelegatingMetricsConfiguration$$EnhancerBySpringCGLIB$$ebc91b57$$FastClassBySpringCGLIB$$f5aaeb49.invoke(<generated>)
      5 frames
    5. Spring Core
      MethodProxy.invokeSuper
      1. org.springframework.cglib.proxy.MethodProxy.invokeSuper(MethodProxy.java:228)
      1 frame
    6. Spring Context
      ConfigurationClassEnhancer$BeanMethodInterceptor.intercept
      1. org.springframework.context.annotation.ConfigurationClassEnhancer$BeanMethodInterceptor.intercept(ConfigurationClassEnhancer.java:356)
      1 frame
    7. com.ryantenney.metrics
      DelegatingMetricsConfiguration$$EnhancerBySpringCGLIB$$ebc91b57$$FastClassBySpringCGLIB$$f5aaeb49.invoke
      1. com.ryantenney.metrics.spring.config.annotation.DelegatingMetricsConfiguration$$EnhancerBySpringCGLIB$$ebc91b57.getMetricRegistry(<generated>)
      2. com.ryantenney.metrics.spring.config.annotation.MetricsConfigurerComposite.getMetricRegistry(MetricsConfigurerComposite.java:52)
      3. com.ryantenney.metrics.spring.config.annotation.DelegatingMetricsConfiguration.getMetricRegistry(DelegatingMetricsConfiguration.java:59)
      4. com.ryantenney.metrics.spring.config.annotation.DelegatingMetricsConfiguration$$EnhancerBySpringCGLIB$$ebc91b57.CGLIB$getMetricRegistry$2(<generated>)
      5. com.ryantenney.metrics.spring.config.annotation.DelegatingMetricsConfiguration$$EnhancerBySpringCGLIB$$ebc91b57$$FastClassBySpringCGLIB$$f5aaeb49.invoke(<generated>)
      5 frames
    8. Spring Core
      MethodProxy.invokeSuper
      1. org.springframework.cglib.proxy.MethodProxy.invokeSuper(MethodProxy.java:228)
      1 frame
    9. Spring Context
      ConfigurationClassEnhancer$BeanMethodInterceptor.intercept
      1. org.springframework.context.annotation.ConfigurationClassEnhancer$BeanMethodInterceptor.intercept(ConfigurationClassEnhancer.java:356)
      1 frame
    10. com.ryantenney.metrics
      DelegatingMetricsConfiguration$$EnhancerBySpringCGLIB$$ebc91b57$$FastClassBySpringCGLIB$$f5aaeb49.invoke
      1. com.ryantenney.metrics.spring.config.annotation.DelegatingMetricsConfiguration$$EnhancerBySpringCGLIB$$ebc91b57.getMetricRegistry(<generated>)
      2. com.ryantenney.metrics.spring.config.annotation.MetricsConfigurerComposite.getMetricRegistry(MetricsConfigurerComposite.java:52)
      3. com.ryantenney.metrics.spring.config.annotation.DelegatingMetricsConfiguration.getMetricRegistry(DelegatingMetricsConfiguration.java:59)
      4. com.ryantenney.metrics.spring.config.annotation.DelegatingMetricsConfiguration$$EnhancerBySpringCGLIB$$ebc91b57.CGLIB$getMetricRegistry$2(<generated>)
      5. com.ryantenney.metrics.spring.config.annotation.DelegatingMetricsConfiguration$$EnhancerBySpringCGLIB$$ebc91b57$$FastClassBySpringCGLIB$$f5aaeb49.invoke(<generated>)
      5 frames
    11. Spring Core
      MethodProxy.invokeSuper
      1. org.springframework.cglib.proxy.MethodProxy.invokeSuper(MethodProxy.java:228)
      1 frame
    12. Spring Context
      ConfigurationClassEnhancer$BeanMethodInterceptor.intercept
      1. org.springframework.context.annotation.ConfigurationClassEnhancer$BeanMethodInterceptor.intercept(ConfigurationClassEnhancer.java:356)
      1 frame
    13. com.ryantenney.metrics
      DelegatingMetricsConfiguration$$EnhancerBySpringCGLIB$$ebc91b57$$FastClassBySpringCGLIB$$f5aaeb49.invoke
      1. com.ryantenney.metrics.spring.config.annotation.DelegatingMetricsConfiguration$$EnhancerBySpringCGLIB$$ebc91b57.getMetricRegistry(<generated>)
      2. com.ryantenney.metrics.spring.config.annotation.MetricsConfigurerComposite.getMetricRegistry(MetricsConfigurerComposite.java:52)
      3. com.ryantenney.metrics.spring.config.annotation.DelegatingMetricsConfiguration.getMetricRegistry(DelegatingMetricsConfiguration.java:59)
      4. com.ryantenney.metrics.spring.config.annotation.DelegatingMetricsConfiguration$$EnhancerBySpringCGLIB$$ebc91b57.CGLIB$getMetricRegistry$2(<generated>)
      5. com.ryantenney.metrics.spring.config.annotation.DelegatingMetricsConfiguration$$EnhancerBySpringCGLIB$$ebc91b57$$FastClassBySpringCGLIB$$f5aaeb49.invoke(<generated>)
      5 frames
    14. Spring Core
      MethodProxy.invokeSuper
      1. org.springframework.cglib.proxy.MethodProxy.invokeSuper(MethodProxy.java:228)
      1 frame
    15. Spring Context
      ConfigurationClassEnhancer$BeanMethodInterceptor.intercept
      1. org.springframework.context.annotation.ConfigurationClassEnhancer$BeanMethodInterceptor.intercept(ConfigurationClassEnhancer.java:356)
      1 frame
    16. com.ryantenney.metrics
      DelegatingMetricsConfiguration$$EnhancerBySpringCGLIB$$ebc91b57$$FastClassBySpringCGLIB$$f5aaeb49.invoke
      1. com.ryantenney.metrics.spring.config.annotation.DelegatingMetricsConfiguration$$EnhancerBySpringCGLIB$$ebc91b57.getMetricRegistry(<generated>)
      2. com.ryantenney.metrics.spring.config.annotation.MetricsConfigurerComposite.getMetricRegistry(MetricsConfigurerComposite.java:52)
      3. com.ryantenney.metrics.spring.config.annotation.DelegatingMetricsConfiguration.getMetricRegistry(DelegatingMetricsConfiguration.java:59)
      4. com.ryantenney.metrics.spring.config.annotation.DelegatingMetricsConfiguration$$EnhancerBySpringCGLIB$$ebc91b57.CGLIB$getMetricRegistry$2(<generated>)
      5. com.ryantenney.metrics.spring.config.annotation.DelegatingMetricsConfiguration$$EnhancerBySpringCGLIB$$ebc91b57$$FastClassBySpringCGLIB$$f5aaeb49.invoke(<generated>)
      5 frames
    17. Spring Core
      MethodProxy.invokeSuper
      1. org.springframework.cglib.proxy.MethodProxy.invokeSuper(MethodProxy.java:228)
      1 frame