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/05/08 10:08:20 UTC

[GitHub] [shardingsphere] jxustcmh opened a new issue #5474: Error creating bean with name 'masterSlaveDataSource' defined in class path resource

jxustcmh opened a new issue #5474:
URL: https://github.com/apache/shardingsphere/issues/5474


   Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'masterSlaveDataSource' 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 'masterSlaveDataSource' threw exception; nested exception is java.lang.NullPointerException
   2020-05-08 18:03:36.517  INFO 24524 --- [           main] o.s.s.concurrent.ThreadPoolTaskExecutor  : Shutting down ExecutorService 'applicationTaskExecutor'
   2020-05-08 18:03:36.520  INFO 24524 --- [           main] o.apache.catalina.core.StandardService   : Stopping service [Tomcat]
   2020-05-08 18:03:36.537  INFO 24524 --- [           main] ConditionEvaluationReportLoggingListener : 
   
   Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled.
   2020-05-08 18:03:36.548 ERROR 24524 --- [           main] o.s.boot.SpringApplication               : Application run failed
   
   org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'masterSlaveDataSource' 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 'masterSlaveDataSource' threw exception; nested exception is java.lang.NullPointerException
   	at org.springframework.beans.factory.support.ConstructorResolver.instantiate(ConstructorResolver.java:656) ~[spring-beans-5.2.6.RELEASE.jar:5.2.6.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



[GitHub] [shardingsphere] jxustcmh commented on issue #5474: Error creating bean with name 'masterSlaveDataSource' defined in class path resource

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


   I have less configuration files,
   in application.properties  or  application.yml,
   in first line need:spring.shardingsphere.datasource.names=master,slave0,slave1
   but in detail configuration files,don‘t  have it


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