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 2019/07/11 08:18:22 UTC

[GitHub] [incubator-shardingsphere] dahaian commented on issue #2694: I got a error when I Integrate spring boot with sharding jdbc

dahaian commented on issue #2694: I got a error when I Integrate spring boot with sharding jdbc
URL: https://github.com/apache/incubator-shardingsphere/issues/2694#issuecomment-510382415
 
 
   @KomachiSion  I follow you add spring.shardingsphere.sharding.tables.t_order.key-generator.type=SNOWFLAKE or spring.shardingsphere.sharding.tables.t_order.key-generator.type=UUID and retry. But I got a error is:
   
   org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'testC': Injection of resource dependencies failed; 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/SpringBootConfiguration.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.NullPointerException
   
   Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'dataSource' defined in class path resource [org/apache/shardingsphere/shardingjdbc/spring/boot/SpringBootConfiguration.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.NullPointerException
   
   Caused by: org.springframework.beans.BeanInstantiationException: Failed to instantiate [javax.sql.DataSource]: Factory method 'dataSource' threw exception; nested exception is java.lang.NullPointerException
   
   My config file is:
   ![image](https://user-images.githubusercontent.com/9957813/61034228-76639c80-a3f7-11e9-8e7b-aa6438cbfa80.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