Spring异常分析

异常报错


2019-01-14 10:40:18.427 ERROR 11776 --- [ost-startStop-1] o.s.b.w.e.t.TomcatStarter                : Error starting Tomcat context. 

Exception: org.springframework.beans.factory.BeanCreationException. Message: Error creating bean with name 'servletEndpointRegistrar' defined in class path resource [org/springframework/boot/actuate/autoconfigure/endpoint/web/ServletEndpointManagementContextConfiguration$WebMvcServletEndpointManagementContextConfiguration.class]: 


Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: 

Failed to instantiate [org.springframework.boot.actuate.endpoint.web.ServletEndpointRegistrar]: 


Factory method 'servletEndpointRegistrar' threw exception; nested exception is org.springframework.beans.factory.BeanCreationException:



 Error creating bean with name 'healthEndpoint' defined in class path resource [org/springframework/boot/actuate/autoconfigure/health/HealthEndpointConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.boot.actuate.health.HealthEndpoint]: Factory method 'healthEndpoint' threw exception; nested exception is org.springframework.beans.factory.BeanCreationException: 


 Error creating bean with name 'org.springframework.boot.actuate.autoconfigure.jdbc.DataSourceHealthIndicatorAutoConfiguration':
  Bean instantiation via constructor failed; nested exception is org.springframework.beans.BeanInstantiationException: 


  Failed to instantiate [org.springframework.boot.actuate.autoconfigure.jdbc.DataSourceHealthIndicatorAutoConfiguration$$EnhancerBySpringCGLIB$$caa88ea6]: Constructor threw exception; nested exception is org.springframework.beans.factory.BeanCreationException: 

  Error creating bean with name 'dataSource': Post-processing of FactoryBean's singleton object failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'scopedTarget.dataSource' defined in class path resource [org/springframework/boot/autoconfigure/jdbc/DataSourceConfiguration$Hikari.class]: 

  Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [com.zaxxer.hikari.HikariDataSource]: Factory method 'dataSource' threw exception; nested exception is org.springframework.boot.autoconfigure.jdbc.DataSourceProperties$DataSourceBeanCreationException: Failed to determine a suitable driver class

Tomcat的Bean创建异常。不能创建的Bean的名字是ServletEndpointRegistrar



public class ServletEndpointManagementContextConfiguration {

        @Configuration
    @ConditionalOnClass(ResourceConfig.class)
    @ConditionalOnMissingClass("org.springframework.web.servlet.DispatcherServlet")
    public static class JerseyServletEndpointManagementContextConfiguration {

        @Bean
        public ServletEndpointRegistrar servletEndpointRegistrar(
                WebEndpointProperties properties,
                ServletEndpointsSupplier servletEndpointsSupplier) {
            return new ServletEndpointRegistrar(properties.getBasePath(),
                    servletEndpointsSupplier.getEndpoints());
        }

    }

}

猜你喜欢

转载自www.cnblogs.com/fonxian/p/10265953.html