You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by GitBox <gi...@apache.org> on 2020/01/16 02:42:53 UTC

[GitHub] [incubator-shardingsphere] cielswift opened a new issue #3993: Start error with yml

cielswift opened a new issue #3993: Start error with yml
URL: https://github.com/apache/incubator-shardingsphere/issues/3993
 
 
   spring boot version 2.2
   jdk 13
   sharding 4.0.0-RC3
   
   I searched most of the cases and configured them with properties
   But I used yml, but something went wrong
   
   Failed to configure a DataSource: 'url' attribute is not specified and no embedded datasource could be configured.
   Reason: Failed to determine a suitable driver class
   
   This is my configuration
   
     shardingsphere:  
       datasource:
         names: ds0,ds1
         ds0:
           type: com.alibaba.druid.pool.DruidDataSource
           driverClassName: com.mysql.cj.jdbc.Driver
           url: jdbc:mysql://mysql.ciel.cl:1600/ds0?seUnicode=true&characterEncoding=UTF-8&useSSL=false&serverTimezone=Asia/Shanghai
           username: root
           password: ciel
         ds1:
           type: com.alibaba.druid.pool.DruidDataSource
           driverClassName: com.mysql.cj.jdbc.Driver
           url: jdbc:mysql://mysql.ciel.cl:1601/ds1?seUnicode=true&characterEncoding=UTF-8&useSSL=false&serverTimezone=Asia/Shanghai
           username: root
           password: ciel
       sharding: 
         default-database-strategy:
           inline:
             sharding-column: id
             algorithm-expression: ds$->{id % 2}
   
         tables:   
           t_order:
             actual-data-nodes: ds$->{0..1}.t_order$->{0..2}
             table-strategy:
               inline:
                 sharding-column: id  
                 algorithm-expression: t_order$->{id % 2}
             key-generator: # 
               column: id
               type: SNOWFLAKE
   #        t_order_item:
   #          actual-data-nodes: ds$->{0..1}.t_order_item$->{0..1}
   #          table-strategy:
   #            inline:
   #              sharding-column: order_id
   #              algorithm-expression: t_order_item$->{order_id % 2}
       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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [incubator-shardingsphere] haetao commented on issue #3993: Start error with yml

Posted by GitBox <gi...@apache.org>.
haetao commented on issue #3993: Start error with yml
URL: https://github.com/apache/incubator-shardingsphere/issues/3993#issuecomment-575009767
 
 
   To be exact, ShardingSphere's compatibility with MySQL 8 is not good.

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [shardingsphere] jaedongjuly commented on issue #3993: Start error with yml

Posted by GitBox <gi...@apache.org>.
jaedongjuly commented on issue #3993:
URL: https://github.com/apache/shardingsphere/issues/3993#issuecomment-639215821


   I have same problem.
   same pom。
   same error。
   How to solve the problem????
   


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-shardingsphere] terrymanu closed issue #3993: Start error with yml

Posted by GitBox <gi...@apache.org>.
terrymanu closed issue #3993: Start error with yml
URL: https://github.com/apache/incubator-shardingsphere/issues/3993
 
 
   

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [incubator-shardingsphere] cielswift opened a new issue #3993: Start error with yml

Posted by GitBox <gi...@apache.org>.
cielswift opened a new issue #3993: Start error with yml
URL: https://github.com/apache/incubator-shardingsphere/issues/3993
 
 
   spring boot version 2.2
   jdk 13
   sharding 4.0.0-RC3
   
   I searched most of the cases and configured them with properties
   But I used yml, but something went wrong
   
   Failed to configure a DataSource: 'url' attribute is not specified and no embedded datasource could be configured.
   Reason: Failed to determine a suitable driver class
   
   This is my configuration
   ```yaml
     shardingsphere:  
       datasource:
         names: ds0,ds1
         ds0:
           type: com.alibaba.druid.pool.DruidDataSource
           driverClassName: com.mysql.cj.jdbc.Driver
           url: jdbc:mysql://mysql.ciel.cl:1600/ds0?seUnicode=true&characterEncoding=UTF-8&useSSL=false&serverTimezone=Asia/Shanghai
           username: root
           password: ciel
         ds1:
           type: com.alibaba.druid.pool.DruidDataSource
           driverClassName: com.mysql.cj.jdbc.Driver
           url: jdbc:mysql://mysql.ciel.cl:1601/ds1?seUnicode=true&characterEncoding=UTF-8&useSSL=false&serverTimezone=Asia/Shanghai
           username: root
           password: ciel
       sharding: 
         default-database-strategy:
           inline:
             sharding-column: id
             algorithm-expression: ds$->{id % 2}
   
         tables:   
           t_order:
             actual-data-nodes: ds$->{0..1}.t_order$->{0..2}
             table-strategy:
               inline:
                 sharding-column: id  
                 algorithm-expression: t_order$->{id % 2}
             key-generator: # 
               column: id
               type: SNOWFLAKE
   #        t_order_item:
   #          actual-data-nodes: ds$->{0..1}.t_order_item$->{0..1}
   #          table-strategy:
   #            inline:
   #              sharding-column: order_id
   #              algorithm-expression: t_order_item$->{order_id % 2}
       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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [shardingsphere] wang7241 commented on issue #3993: Start error with yml

Posted by GitBox <gi...@apache.org>.
wang7241 commented on issue #3993:
URL: https://github.com/apache/shardingsphere/issues/3993#issuecomment-673442262


   I have same problem too.
   same pom too。
   same error too。
   How to solve the problem?????
   My version is 4.1.1


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-shardingsphere] terrymanu closed issue #3993: Start error with yml

Posted by GitBox <gi...@apache.org>.
terrymanu closed issue #3993: Start error with yml
URL: https://github.com/apache/incubator-shardingsphere/issues/3993
 
 
   

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [incubator-shardingsphere] cielswift commented on issue #3993: Start error with yml

Posted by GitBox <gi...@apache.org>.
cielswift commented on issue #3993: Start error with yml
URL: https://github.com/apache/incubator-shardingsphere/issues/3993#issuecomment-575494939
 
 
   @terrymanu  
   ![image](https://user-images.githubusercontent.com/42295829/72589286-c9358800-3935-11ea-810c-1ab172709ec9.png)
   ![image](https://user-images.githubusercontent.com/42295829/72589315-d81c3a80-3935-11ea-9b78-843667829372.png)
   ![image](https://user-images.githubusercontent.com/42295829/72589426-2a5d5b80-3936-11ea-9002-8a8c07f5f17b.png)
   

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [incubator-shardingsphere] terrymanu commented on issue #3993: Start error with yml

Posted by GitBox <gi...@apache.org>.
terrymanu commented on issue #3993: Start error with yml
URL: https://github.com/apache/incubator-shardingsphere/issues/3993#issuecomment-582879925
 
 
   Any update?

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [incubator-shardingsphere] terrymanu commented on issue #3993: Start error with yml

Posted by GitBox <gi...@apache.org>.
terrymanu commented on issue #3993: Start error with yml
URL: https://github.com/apache/incubator-shardingsphere/issues/3993#issuecomment-584203184
 
 
   Closed because no response anymore.

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [incubator-shardingsphere] cielswift commented on issue #3993: Start error with yml

Posted by GitBox <gi...@apache.org>.
cielswift commented on issue #3993: Start error with yml
URL: https://github.com/apache/incubator-shardingsphere/issues/3993#issuecomment-575496207
 
 
   @KomachiSion 
   Yes, I see 4 in the official documentation, I think 3 is no longer maintained
   https://shardingsphere.apache.org/document/current/cn/manual/sharding-jdbc/usage/sharding/

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [shardingsphere] cherrylzhao commented on issue #3993: Start error with yml

Posted by GitBox <gi...@apache.org>.
cherrylzhao commented on issue #3993:
URL: https://github.com/apache/shardingsphere/issues/3993#issuecomment-616257239


   enhance it #5218, mysql8-client will be supported in 4.1.0


----------------------------------------------------------------
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.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-shardingsphere] haetao commented on issue #3993: Start error with yml

Posted by GitBox <gi...@apache.org>.
haetao commented on issue #3993: Start error with yml
URL: https://github.com/apache/incubator-shardingsphere/issues/3993#issuecomment-574982247
 
 
   Hi! ShardingSphere supports mysql5 at this  version! Your driver is mysql8.

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [incubator-shardingsphere] cielswift commented on issue #3993: Start error with yml

Posted by GitBox <gi...@apache.org>.
cielswift commented on issue #3993: Start error with yml
URL: https://github.com/apache/incubator-shardingsphere/issues/3993#issuecomment-575495337
 
 
   @terrymanu 
   2020-01-17 14:34:43.348 ERROR 7196 --- [  restartedMain] o.s.b.web.embedded.tomcat.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.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 [com/alibaba/druid/spring/boot/autoconfigure/DruidDataSourceAutoConfigure.class]: Invocation of init method failed; nested exception is org.springframework.boot.autoconfigure.jdbc.DataSourceProperties$DataSourceBeanCreationException: Failed to determine a suitable driver class
   2020-01-17 14:34:43.375  INFO 7196 --- [  restartedMain] o.apache.catalina.core.StandardService   : Stopping service [Tomcat]
   2020-01-17 14:34:43.388  WARN 7196 --- [  restartedMain] o.a.c.loader.WebappClassLoaderBase       : The web application [producer] appears to have started a thread named [RxIoScheduler-1 (Evictor)] but has failed to stop it. This is very likely to create a memory leak. Stack trace of thread:
    java.base@13.0.1/jdk.internal.misc.Unsafe.park(Native Method)
    java.base@13.0.1/java.util.concurrent.locks.LockSupport.parkNanos(LockSupport.java:235)
    java.base@13.0.1/java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.awaitNanos(AbstractQueuedSynchronizer.java:2123)
    java.base@13.0.1/java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(ScheduledThreadPoolExecutor.java:1182)
    java.base@13.0.1/java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(ScheduledThreadPoolExecutor.java:899)
    java.base@13.0.1/java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1054)
    java.base@13.0.1/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1114)
    java.base@13.0.1/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
    java.base@13.0.1/java.lang.Thread.run(Thread.java:830)
   2020-01-17 14:34:43.389  WARN 7196 --- [  restartedMain] o.a.c.loader.WebappClassLoaderBase       : The web application [producer] appears to have started a thread named [lettuce-eventExecutorLoop-1-1] but has failed to stop it. This is very likely to create a memory leak. Stack trace of thread:
    java.base@13.0.1/jdk.internal.misc.Unsafe.park(Native Method)
    java.base@13.0.1/java.util.concurrent.locks.LockSupport.parkNanos(LockSupport.java:235)
    java.base@13.0.1/java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.awaitNanos(AbstractQueuedSynchronizer.java:2123)
    java.base@13.0.1/java.util.concurrent.LinkedBlockingQueue.poll(LinkedBlockingQueue.java:458)
    app//io.netty.util.concurrent.SingleThreadEventExecutor.takeTask(SingleThreadEventExecutor.java:289)
    app//io.netty.util.concurrent.DefaultEventExecutor.run(DefaultEventExecutor.java:64)
    app//io.netty.util.concurrent.SingleThreadEventExecutor$6.run(SingleThreadEventExecutor.java:1050)
    app//io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74)
    app//io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
    java.base@13.0.1/java.lang.Thread.run(Thread.java:830)
   2020-01-17 14:34:43.391  WARN 7196 --- [  restartedMain] ConfigServletWebServerApplicationContext : Exception encountered during context initialization - cancelling refresh attempt: org.springframework.context.ApplicationContextException: Unable to start web server; nested exception is org.springframework.boot.web.server.WebServerException: Unable to start embedded Tomcat
   2020-01-17 14:34:43.465 ERROR 7196 --- [  restartedMain] o.s.b.d.LoggingFailureAnalysisReporter   : 
   
   ***************************
   APPLICATION FAILED TO START
   ***************************
   
   Description:
   
   Failed to configure a DataSource: 'url' attribute is not specified and no embedded datasource could be configured.
   
   Reason: Failed to determine a suitable driver class
   
   
   Action:
   
   Consider the following:
   	If you want an embedded database (H2, HSQL or Derby), please put it on the classpath.
   	If you have database settings to be loaded from a particular profile you may need to activate it (no profiles are currently active).
   
   Disconnected from the target VM, address: '127.0.0.1:9200', transport: 'socket'
   
   Process finished with exit code 1
   -----------------------------------------------------------------------------------------------------------
     shardingsphere:  #分库分表
       dataSources:
         names:  ds0,ds1  #指定数据库
         ds0:
           type: com.alibaba.druid.pool.DruidDataSource
           driverClassName: com.mysql.cj.jdbc.Driver
           url: jdbc:mysql://mysql.ciel.cl:1600/ds0?seUnicode=true&characterEncoding=UTF-8&useSSL=false&serverTimezone=Asia/Shanghai
           username: root
           password: ciel
         ds1:
           type: com.alibaba.druid.pool.DruidDataSource
           driverClassName: com.mysql.cj.jdbc.Driver
           url: jdbc:mysql://mysql.ciel.cl:1601/ds1?seUnicode=true&characterEncoding=UTF-8&useSSL=false&serverTimezone=Asia/Shanghai
           username: root
           password: ciel
       sharding:  # 分库策略 根据id取模确定数据进哪个数据库
         default-database-strategy:
           inline:
             sharding-column: id
             algorithm-expression: ds$->{id % 2}
         tables:   #具体分表策略 ,# 节点 ds0.t_order_0,ds0.t_order_1,ds1.t_order_0,ds1.t_order_1
           t_order:
             actual-data-nodes: ds$->{0..1}.t_order$->{0..2}
             table-strategy:
               inline:
                 sharding-column: id  # 分表字段id
                 algorithm-expression: t_order$->{id % 2} # 分表策略 根据id取模,确定数据最终落在那个表中
             key-generator: # 使用SNOWFLAKE算法生成主键
               column: id
               type: SNOWFLAKE
       #        t_order_item:
       #          actual-data-nodes: ds$->{0..1}.t_order_item$->{0..1}
       #          table-strategy:
       #            inline:
       #              sharding-column: order_id
       #              algorithm-expression: t_order_item$->{order_id % 2}
       props:
         sql:
           show: true #打印sql
   -------------------------------------------------------------------
   <!-- 分库分表 -->
           <dependency>
               <groupId>org.apache.shardingsphere</groupId>
               <artifactId>sharding-jdbc-spring-boot-starter</artifactId>
               <version>4.0.0-RC3</version>
           </dependency>
   
           <!-- 分库分表 -->
           <dependency>
               <groupId>org.apache.shardingsphere</groupId>
               <artifactId>sharding-jdbc-spring-namespace</artifactId>
               <version>4.0.0-RC3</version>
           </dependency>

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [incubator-shardingsphere] KomachiSion commented on issue #3993: Start error with yml

Posted by GitBox <gi...@apache.org>.
KomachiSion commented on issue #3993: Start error with yml
URL: https://github.com/apache/incubator-shardingsphere/issues/3993#issuecomment-575474939
 
 
   @cielswift Try to use 4.0.0 release?

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [incubator-shardingsphere] cielswift edited a comment on issue #3993: Start error with yml

Posted by GitBox <gi...@apache.org>.
cielswift edited a comment on issue #3993: Start error with yml
URL: https://github.com/apache/incubator-shardingsphere/issues/3993#issuecomment-575495337
 
 
   @terrymanu 
   ```
   2020-01-17 14:34:43.348 ERROR 7196 --- [  restartedMain] o.s.b.web.embedded.tomcat.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.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 [com/alibaba/druid/spring/boot/autoconfigure/DruidDataSourceAutoConfigure.class]: Invocation of init method failed; nested exception is org.springframework.boot.autoconfigure.jdbc.DataSourceProperties$DataSourceBeanCreationException: Failed to determine a suitable driver class
   2020-01-17 14:34:43.375  INFO 7196 --- [  restartedMain] o.apache.catalina.core.StandardService   : Stopping service [Tomcat]
   2020-01-17 14:34:43.388  WARN 7196 --- [  restartedMain] o.a.c.loader.WebappClassLoaderBase       : The web application [producer] appears to have started a thread named [RxIoScheduler-1 (Evictor)] but has failed to stop it. This is very likely to create a memory leak. Stack trace of thread:
    java.base@13.0.1/jdk.internal.misc.Unsafe.park(Native Method)
    java.base@13.0.1/java.util.concurrent.locks.LockSupport.parkNanos(LockSupport.java:235)
    java.base@13.0.1/java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.awaitNanos(AbstractQueuedSynchronizer.java:2123)
    java.base@13.0.1/java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(ScheduledThreadPoolExecutor.java:1182)
    java.base@13.0.1/java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(ScheduledThreadPoolExecutor.java:899)
    java.base@13.0.1/java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1054)
    java.base@13.0.1/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1114)
    java.base@13.0.1/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
    java.base@13.0.1/java.lang.Thread.run(Thread.java:830)
   2020-01-17 14:34:43.389  WARN 7196 --- [  restartedMain] o.a.c.loader.WebappClassLoaderBase       : The web application [producer] appears to have started a thread named [lettuce-eventExecutorLoop-1-1] but has failed to stop it. This is very likely to create a memory leak. Stack trace of thread:
    java.base@13.0.1/jdk.internal.misc.Unsafe.park(Native Method)
    java.base@13.0.1/java.util.concurrent.locks.LockSupport.parkNanos(LockSupport.java:235)
    java.base@13.0.1/java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.awaitNanos(AbstractQueuedSynchronizer.java:2123)
    java.base@13.0.1/java.util.concurrent.LinkedBlockingQueue.poll(LinkedBlockingQueue.java:458)
    app//io.netty.util.concurrent.SingleThreadEventExecutor.takeTask(SingleThreadEventExecutor.java:289)
    app//io.netty.util.concurrent.DefaultEventExecutor.run(DefaultEventExecutor.java:64)
    app//io.netty.util.concurrent.SingleThreadEventExecutor$6.run(SingleThreadEventExecutor.java:1050)
    app//io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74)
    app//io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
    java.base@13.0.1/java.lang.Thread.run(Thread.java:830)
   2020-01-17 14:34:43.391  WARN 7196 --- [  restartedMain] ConfigServletWebServerApplicationContext : Exception encountered during context initialization - cancelling refresh attempt: org.springframework.context.ApplicationContextException: Unable to start web server; nested exception is org.springframework.boot.web.server.WebServerException: Unable to start embedded Tomcat
   2020-01-17 14:34:43.465 ERROR 7196 --- [  restartedMain] o.s.b.d.LoggingFailureAnalysisReporter   : 
   
   ***************************
   APPLICATION FAILED TO START
   ***************************
   
   Description:
   
   Failed to configure a DataSource: 'url' attribute is not specified and no embedded datasource could be configured.
   
   Reason: Failed to determine a suitable driver class
   
   
   Action:
   
   Consider the following:
   	If you want an embedded database (H2, HSQL or Derby), please put it on the classpath.
   	If you have database settings to be loaded from a particular profile you may need to activate it (no profiles are currently active).
   
   Disconnected from the target VM, address: '127.0.0.1:9200', transport: 'socket'
   
   Process finished with exit code 1
   ```
   -----------------------------------------------------------------------------------------------------------
   ```yml
     shardingsphere:  #分库分表
       dataSources:
         names:  ds0,ds1  #指定数据库
         ds0:
           type: com.alibaba.druid.pool.DruidDataSource
           driverClassName: com.mysql.cj.jdbc.Driver
           url: jdbc:mysql://mysql.ciel.cl:1600/ds0?seUnicode=true&characterEncoding=UTF-8&useSSL=false&serverTimezone=Asia/Shanghai
           username: root
           password: ciel
         ds1:
           type: com.alibaba.druid.pool.DruidDataSource
           driverClassName: com.mysql.cj.jdbc.Driver
           url: jdbc:mysql://mysql.ciel.cl:1601/ds1?seUnicode=true&characterEncoding=UTF-8&useSSL=false&serverTimezone=Asia/Shanghai
           username: root
           password: ciel
       sharding:  # 分库策略 根据id取模确定数据进哪个数据库
         default-database-strategy:
           inline:
             sharding-column: id
             algorithm-expression: ds$->{id % 2}
         tables:   #具体分表策略 ,# 节点 ds0.t_order_0,ds0.t_order_1,ds1.t_order_0,ds1.t_order_1
           t_order:
             actual-data-nodes: ds$->{0..1}.t_order$->{0..2}
             table-strategy:
               inline:
                 sharding-column: id  # 分表字段id
                 algorithm-expression: t_order$->{id % 2} # 分表策略 根据id取模,确定数据最终落在那个表中
             key-generator: # 使用SNOWFLAKE算法生成主键
               column: id
               type: SNOWFLAKE
       #        t_order_item:
       #          actual-data-nodes: ds$->{0..1}.t_order_item$->{0..1}
       #          table-strategy:
       #            inline:
       #              sharding-column: order_id
       #              algorithm-expression: t_order_item$->{order_id % 2}
       props:
         sql:
           show: true #打印sql
   ```
   -------------------------------------------------------------------
   <!-- 分库分表 -->
           <dependency>
               <groupId>org.apache.shardingsphere</groupId>
               <artifactId>sharding-jdbc-spring-boot-starter</artifactId>
               <version>4.0.0-RC3</version>
           </dependency>
   
           <!-- 分库分表 -->
           <dependency>
               <groupId>org.apache.shardingsphere</groupId>
               <artifactId>sharding-jdbc-spring-namespace</artifactId>
               <version>4.0.0-RC3</version>
           </dependency>

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [incubator-shardingsphere] terrymanu commented on issue #3993: Start error with yml

Posted by GitBox <gi...@apache.org>.
terrymanu commented on issue #3993: Start error with yml
URL: https://github.com/apache/incubator-shardingsphere/issues/3993#issuecomment-575424916
 
 
   Can you provide the exception info?

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [incubator-shardingsphere] cielswift commented on issue #3993: Start error with yml

Posted by GitBox <gi...@apache.org>.
cielswift commented on issue #3993: Start error with yml
URL: https://github.com/apache/incubator-shardingsphere/issues/3993#issuecomment-574990293
 
 
   4.0 version does not support mysql8?  

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [incubator-shardingsphere] KomachiSion commented on issue #3993: Start error with yml

Posted by GitBox <gi...@apache.org>.
KomachiSion commented on issue #3993: Start error with yml
URL: https://github.com/apache/incubator-shardingsphere/issues/3993#issuecomment-575501393
 
 
   > @KomachiSion
   > Yes, I see 4 in the official documentation, I think 3 is no longer maintained
   > https://shardingsphere.apache.org/document/current/cn/manual/sharding-jdbc/usage/sharding/
   
   Sorry, I mean can you have a try for 4.0.0 version, not 4.0.0-RC3.
   
   4.0.0 version has release recently.

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services