spring-cloud-config icon indicating copy to clipboard operation
spring-cloud-config copied to clipboard

Getting "Failed to determine a suitable driver class" when upgraded to Finchley.RELEASE and Springboot 2.0.5.RELEASE

Open Vasimkadiwala opened this issue 8 years ago • 2 comments

I am getting Getting "Failed to determine a suitable driver class" when upgraded to Finchley.RELEASE and Springboot 2.0.5.RELEASE

BootStrap.yml looks like

spring:
  application:
    name: OutboundEventEngine
  cloud:
    consul:
      config:
        enabled: true
        defaultContext: ZygrateOutboundService
        profileSeparator: '::'        
        watched: 
          enabled: true
        prefix: DEV
      host: 127.0.0.1
      port: 8500

Error logs:

Caused by: org.springframework.boot.web.server.WebServerException: Unable to start embedded Tomcat
        at org.springframework.boot.web.embedded.tomcat.TomcatWebServer.initialize(TomcatWebServer.java:126) ~[outbound-event-engine.jar:1.0.18-SNAPSHOT]
        at org.springframework.boot.web.embedded.tomcat.TomcatWebServer.<init>(TomcatWebServer.java:86) ~[outbound-event-engine.jar:1.0.18-SNAPSHOT]
        at org.springframework.boot.web.embedded.tomcat.TomcatServletWebServerFactory.getTomcatWebServer(TomcatServletWebServerFactory.java:413) ~[outbound-event-engine.jar:1.0.18-SNAPSHOT]
        at org.springframework.boot.web.embedded.tomcat.TomcatServletWebServerFactory.getWebServer(TomcatServletWebServerFactory.java:174) ~[outbound-event-engine.jar:1.0.18-SNAPSHOT]
        at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.createWebServer(ServletWebServerApplicationContext.java:179) ~[outbound-event-engine.jar:1.0.18-SNAPSHOT]
        at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.onRefresh(ServletWebServerApplicationContext.java:152) ~[outbound-event-engine.jar:1.0.18-SNAPSHOT]
        ... 8 more
Caused by: org.springframework.beans.factory.BeanCreationException: 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$$fd6c45dc]: 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

It works with Dalston.SR4 and Springboot 1.5.10.RELEASE.

Thanks !!!

Vasimkadiwala avatar Nov 20 '18 07:11 Vasimkadiwala

Closing in favor of stack overflow. https://stackoverflow.com/questions/53388612/getting-failed-to-determine-a-suitable-driver-class-when-upgraded-to-finchley

Please don't cross post.

spencergibb avatar Nov 20 '18 12:11 spencergibb

@spencergibb , I am facing same issue and i can see that u have posted a stackoverflow URL and the question is posted by me only (it is also unanswered there). could you please help me by providing a solution

sharadshah1234 avatar Nov 20 '18 13:11 sharadshah1234