WswSummer15 opened a new issue #12869:
URL: https://github.com/apache/shardingsphere/issues/12869


   (MacOS IDEA)Program startup error:
   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.UnsatisfiedDependencyException: Error 
creating bean with name 'healthEndpoint' defined in class path resource 
[org/springframework/boot/actuate/autoconfigure/health/HealthEndpointConfiguration.class]:
 Unsatisfied dependency expressed through method 'healthEndpoint' parameter 0; 
nested exception is org.
 springframework.beans.factory.BeanCreationException: Error creating bean with 
name 'healthContributorRegistry' 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.HealthContributorRegistry]: Factory 
method 'healthContributorRegistry' threw exception; nested exception is 
org.springframework.beans.factory.UnsatisfiedDependencyException: Error 
creating bean with name 
'org.springframework.boot.actuate.autoconfigure.jdbc.DataSourceHealthContributorAutoConfiguration':
 Unsatisfied dependency expressed through constructor parameter 0; nested 
exception is org.springframework.beans.factory.BeanCreationException: Error 
creating bean with name 'dataSource' defined in class path resource 
[org/apache/shardingsphere/shardingjdbc/spring/boot/SpringBo
 otConfiguration.class]: Bean instantiation via factory method failed; nested 
exception is org.springframework.beans.BeanInstantiationException: Failed to 
instantiate [javax.sql.DataSource]: Factory method 'dataSource' threw 
exception; nested exception is java.lang.IllegalArgumentException: Data sources 
cannot be empty.
   
   springboot + shardingsphere + HikariDataSource 
   <java.version>1.8</java.version>
   <mysql.version>8.0.18</mysql.version>
   <spring.boot.version>2.2.2.RELEASE</spring.boot.version>
   <sharding-jdbc.version>4.0.0-RC1</sharding-jdbc.version>
   
   config.yaml here:
   spring:
     shardingsphere:
       datasource:
         names: ds0
         ds0:
           type: com.zaxxer.hikari.HikariDataSource
           driver-class-name: com.mysql.cj.jdbc.Driver
           jdbcUrl: 
           username: 
           password: 
           hikari:
             minimum-idle: 5
             max-lifetime: 1800000
             maximum-pool-size: 15
             auto-commit: true
             idle-timeout: 30000
             pool-name: DatebookHikariCP
             connection-timeout: 30000
       sharding:
         tables:
           task:
             actual-data-nodes: ds0.task_$->{2020..2021}
             table-strategy:
               standard:
                 sharding-column: create_date
                 precise-algorithm-class-name: 
                 range-algorithm-class-name:
             key-generator:
               column: task_id
               type: SNOWFLAKE
         defaultDataSourceName: ds0
       props:
         sql:
           show: true


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to