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 2021/05/10 04:32:39 UTC
[GitHub] [shardingsphere] zexho994 opened a new issue #10290: application run failed for spring-boot-starter 5.0
zexho994 opened a new issue #10290:
URL: https://github.com/apache/shardingsphere/issues/10290
### dependency
```
<dependency>
<groupId>org.apache.shardingsphere</groupId>
<artifactId>shardingsphere-sharding-spring-boot-starter</artifactId>
<version>5.0.0-alpha</version>
</dependency>
```
### application
```
spring:
shardingsphere:
rules:
encrypt:
tables:
source_files:
columns:
file_name:
cipher-column: file_name
encryptor-name: aes_encryptor
encryptors:
aes_encryptor:
type: AES
props:
aes-key-value: 123456abc
```
### Log
[2021-05-10 11:27:51.505][WARN][main][org.springframework.context.support.AbstractApplicationContext:557][]: Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanDefinitionStoreException: Failed to process import candidates for configuration class [com.maxhub.file.preview.App]; nested exception is java.lang.IllegalStateException: Could not evaluate condition on org.apache.shardingsphere.sharding.spring.boot.ShardingRuleSpringBootConfiguration due to org/apache/shardingsphere/spring/boot/util/PropertyUtil not found. Make sure your own configuration does not rely on that class. This can also happen if you are @ComponentScanning a springframework package (e.g. if you put a @ComponentScan in the default package by mistake)
[2021-05-10 11:27:51.536][ERROR][main][org.springframework.boot.SpringApplication:822][]: Application run failed
org.springframework.beans.factory.BeanDefinitionStoreException: Failed to process import candidates for configuration class [com.maxhub.file.preview.App]; nested exception is java.lang.IllegalStateException: Could not evaluate condition on org.apache.shardingsphere.sharding.spring.boot.ShardingRuleSpringBootConfiguration due to org/apache/shardingsphere/spring/boot/util/PropertyUtil not found. Make sure your own configuration does not rely on that class. This can also happen if you are @ComponentScanning a springframework package (e.g. if you put a @ComponentScan in the default package by mistake)
at org.springframework.context.annotation.ConfigurationClassParser.processImports(ConfigurationClassParser.java:596) ~[spring-context-5.1.9.RELEASE.jar:5.1.9.RELEASE]
at org.springframework.context.annotation.ConfigurationClassParser.access$900(ConfigurationClassParser.java:108) ~[spring-context-5.1.9.RELEASE.jar:5.1.9.RELEASE]
at org.springframework.context.annotation.ConfigurationClassParser$DeferredImportSelectorGroupingHandler.lambda$processGroupImports$1(ConfigurationClassParser.java:805) ~[spring-context-5.1.9.RELEASE.jar:5.1.9.RELEASE]
at java.util.ArrayList.forEach(ArrayList.java:1259) ~[?:1.8.0_261]
at org.springframework.context.annotation.ConfigurationClassParser$DeferredImportSelectorGroupingHandler.processGroupImports(ConfigurationClassParser.java:801) ~[spring-context-5.1.9.RELEASE.jar:5.1.9.RELEASE]
at org.springframework.context.annotation.ConfigurationClassParser$DeferredImportSelectorHandler.process(ConfigurationClassParser.java:771) ~[spring-context-5.1.9.RELEASE.jar:5.1.9.RELEASE]
at org.springframework.context.annotation.ConfigurationClassParser.parse(ConfigurationClassParser.java:185) ~[spring-context-5.1.9.RELEASE.jar:5.1.9.RELEASE]
at org.springframework.context.annotation.ConfigurationClassPostProcessor.processConfigBeanDefinitions(ConfigurationClassPostProcessor.java:315) ~[spring-context-5.1.9.RELEASE.jar:5.1.9.RELEASE]
at org.springframework.context.annotation.ConfigurationClassPostProcessor.postProcessBeanDefinitionRegistry(ConfigurationClassPostProcessor.java:232) ~[spring-context-5.1.9.RELEASE.jar:5.1.9.RELEASE]
at org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanDefinitionRegistryPostProcessors(PostProcessorRegistrationDelegate.java:275) ~[spring-context-5.1.9.RELEASE.jar:5.1.9.RELEASE]
at org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanFactoryPostProcessors(PostProcessorRegistrationDelegate.java:95) ~[spring-context-5.1.9.RELEASE.jar:5.1.9.RELEASE]
at org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:705) ~[spring-context-5.1.9.RELEASE.jar:5.1.9.RELEASE]
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:531) ~[spring-context-5.1.9.RELEASE.jar:5.1.9.RELEASE]
at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:141) ~[spring-boot-2.1.7.RELEASE.jar:2.1.7.RELEASE]
at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:743) [spring-boot-2.1.7.RELEASE.jar:2.1.7.RELEASE]
at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:390) [spring-boot-2.1.7.RELEASE.jar:2.1.7.RELEASE]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:312) [spring-boot-2.1.7.RELEASE.jar:2.1.7.RELEASE]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1214) [spring-boot-2.1.7.RELEASE.jar:2.1.7.RELEASE]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1203) [spring-boot-2.1.7.RELEASE.jar:2.1.7.RELEASE]
at com.maxhub.file.preview.App.main(App.java:16) [classes/:?]
Caused by: java.lang.IllegalStateException: Could not evaluate condition on org.apache.shardingsphere.sharding.spring.boot.ShardingRuleSpringBootConfiguration due to org/apache/shardingsphere/spring/boot/util/PropertyUtil not found. Make sure your own configuration does not rely on that class. This can also happen if you are @ComponentScanning a springframework package (e.g. if you put a @ComponentScan in the default package by mistake)
at org.springframework.boot.autoconfigure.condition.SpringBootCondition.matches(SpringBootCondition.java:54) ~[spring-boot-autoconfigure-2.1.7.RELEASE.jar:2.1.7.RELEASE]
at org.springframework.context.annotation.ConditionEvaluator.shouldSkip(ConditionEvaluator.java:108) ~[spring-context-5.1.9.RELEASE.jar:5.1.9.RELEASE]
at org.springframework.context.annotation.ConfigurationClassParser.processConfigurationClass(ConfigurationClassParser.java:218) ~[spring-context-5.1.9.RELEASE.jar:5.1.9.RELEASE]
at org.springframework.context.annotation.ConfigurationClassParser.processImports(ConfigurationClassParser.java:586) ~[spring-context-5.1.9.RELEASE.jar:5.1.9.RELEASE]
... 19 more
Caused by: java.lang.NoClassDefFoundError: org/apache/shardingsphere/spring/boot/util/PropertyUtil
at org.apache.shardingsphere.sharding.spring.boot.condition.ShardingSpringBootCondition.getMatchOutcome(ShardingSpringBootCondition.java:35) ~[shardingsphere-sharding-spring-boot-starter-5.0.0-alpha.jar:5.0.0-alpha]
at org.springframework.boot.autoconfigure.condition.SpringBootCondition.matches(SpringBootCondition.java:47) ~[spring-boot-autoconfigure-2.1.7.RELEASE.jar:2.1.7.RELEASE]
at org.springframework.context.annotation.ConditionEvaluator.shouldSkip(ConditionEvaluator.java:108) ~[spring-context-5.1.9.RELEASE.jar:5.1.9.RELEASE]
at org.springframework.context.annotation.ConfigurationClassParser.processConfigurationClass(ConfigurationClassParser.java:218) ~[spring-context-5.1.9.RELEASE.jar:5.1.9.RELEASE]
at org.springframework.context.annotation.ConfigurationClassParser.processImports(ConfigurationClassParser.java:586) ~[spring-context-5.1.9.RELEASE.jar:5.1.9.RELEASE]
... 19 more
Caused by: java.lang.ClassNotFoundException: org.apache.shardingsphere.spring.boot.util.PropertyUtil
at java.net.URLClassLoader.findClass(URLClassLoader.java:382) ~[?:1.8.0_261]
at java.lang.ClassLoader.loadClass(ClassLoader.java:418) ~[?:1.8.0_261]
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:355) ~[?:1.8.0_261]
at java.lang.ClassLoader.loadClass(ClassLoader.java:351) ~[?:1.8.0_261]
at org.apache.shardingsphere.sharding.spring.boot.condition.ShardingSpringBootCondition.getMatchOutcome(ShardingSpringBootCondition.java:35) ~[shardingsphere-sharding-spring-boot-starter-5.0.0-alpha.jar:5.0.0-alpha]
at org.springframework.boot.autoconfigure.condition.SpringBootCondition.matches(SpringBootCondition.java:47) ~[spring-boot-autoconfigure-2.1.7.RELEASE.jar:2.1.7.RELEASE]
at org.springframework.context.annotation.ConditionEvaluator.shouldSkip(ConditionEvaluator.java:108) ~[spring-context-5.1.9.RELEASE.jar:5.1.9.RELEASE]
at org.springframework.context.annotation.ConfigurationClassParser.processConfigurationClass(ConfigurationClassParser.java:218) ~[spring-context-5.1.9.RELEASE.jar:5.1.9.RELEASE]
at org.springframework.context.annotation.ConfigurationClassParser.processImports(ConfigurationClassParser.java:586) ~[spring-context-5.1.9.RELEASE.jar:5.1.9.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] zexho994 commented on issue #10290: application run failed for 5.0.0-alpha
Posted by GitBox <gi...@apache.org>.
zexho994 commented on issue #10290:
URL: https://github.com/apache/shardingsphere/issues/10290#issuecomment-836623209
@fengying-wzm 请问下datasource你是怎么配置的?
--
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] fengying-wzm commented on issue #10290: application run failed for 5.0.0-alpha
Posted by GitBox <gi...@apache.org>.
fengying-wzm commented on issue #10290:
URL: https://github.com/apache/shardingsphere/issues/10290#issuecomment-836642149
我的放在Apollo,是properties格式,你转一下。
```properties
# 是否启动读写分离
spring.shardingsphere.enabled = true
# 主库配置
spring.shardingsphere.datasource.common.driver-class-name = com.mysql.cj.jdbc.Driver
spring.shardingsphere.datasource.common.type = com.zaxxer.hikari.HikariDataSource
spring.shardingsphere.datasource.names = master,slave0,slave1
spring.shardingsphere.datasource.master.jdbcUrl = jdbc:mysql://xxx:3306/xxx?useUnicode=true&characterEncoding=utf-8&useSSL=false&serverTimezone=GMT%2B8
spring.shardingsphere.datasource.master.username = xxx
spring.shardingsphere.datasource.master.password = xxx
spring.shardingsphere.datasource.master.minimum-idle = 20
spring.shardingsphere.datasource.master.maximum-pool-size = 50
spring.shardingsphere.datasource.master.auto-commit = true
spring.shardingsphere.datasource.master.idle-timeout = 30000
spring.shardingsphere.datasource.master.max-lifetime = 1800000
spring.shardingsphere.datasource.master.connection-timeout = 30000
spring.shardingsphere.datasource.master.connection-test-query = SELECT 1
# 从库slave0
spring.shardingsphere.datasource.slave0.jdbcUrl = jdbc:mysql://xxx:3306/xxx?useUnicode=true&characterEncoding=utf-8&useSSL=false&serverTimezone=GMT%2B8
spring.shardingsphere.datasource.slave0.username = xxx
spring.shardingsphere.datasource.slave0.password = xxx
spring.shardingsphere.datasource.slave0.minimum-idle = 20
spring.shardingsphere.datasource.slave0.maximum-pool-size = 50
spring.shardingsphere.datasource.slave0.auto-commit = true
spring.shardingsphere.datasource.slave0.idle-timeout = 30000
spring.shardingsphere.datasource.slave0.max-lifetime = 1800000
spring.shardingsphere.datasource.slave0.connection-timeout = 30000
spring.shardingsphere.datasource.slave0.connection-test-query = SELECT 1
# 从库slave1
spring.shardingsphere.datasource.slave1.jdbcUrl = jdbc:mysql://xxx:3306/xxx?useUnicode=true&characterEncoding=utf-8&useSSL=false&serverTimezone=GMT%2B8
spring.shardingsphere.datasource.slave1.username = xxx
spring.shardingsphere.datasource.slave1.password = xxx
spring.shardingsphere.datasource.slave1.minimum-idle = 20
spring.shardingsphere.datasource.slave1.maximum-pool-size = 50
spring.shardingsphere.datasource.slave1.auto-commit = true
spring.shardingsphere.datasource.slave1.idle-timeout = 30000
spring.shardingsphere.datasource.slave1.max-lifetime = 1800000
spring.shardingsphere.datasource.slave1.connection-timeout = 30000
spring.shardingsphere.datasource.slave1.connection-test-query = SELECT 1
# 负载均衡算法,默认轮询
spring.shardingsphere.masterslave.load-balance-algorithm-type = round_robin
spring.shardingsphere.masterslave.name = master-slave
spring.shardingsphere.masterslave.master-data-source-name = master
spring.shardingsphere.masterslave.slave-data-source-names = slave0,slave1
# 打印mysql语句
spring.shardingsphere.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
[GitHub] [shardingsphere] fengying-wzm commented on issue #10290: application run failed for 5.0.0-alpha
Posted by GitBox <gi...@apache.org>.
fengying-wzm commented on issue #10290:
URL: https://github.com/apache/shardingsphere/issues/10290#issuecomment-836643930
@zexho994 我的放在Apollo,是properties格式,你转一下。
```properties
# 是否启动读写分离
spring.shardingsphere.enabled = true
# 主库配置
spring.shardingsphere.datasource.common.driver-class-name = com.mysql.cj.jdbc.Driver
spring.shardingsphere.datasource.common.type = com.zaxxer.hikari.HikariDataSource
spring.shardingsphere.datasource.names = master,slave0,slave1
spring.shardingsphere.datasource.master.jdbcUrl = jdbc:mysql://xxx:3306/xxx?useUnicode=true&characterEncoding=utf-8&useSSL=false&serverTimezone=GMT%2B8
spring.shardingsphere.datasource.master.username = xxx
spring.shardingsphere.datasource.master.password = xxx
spring.shardingsphere.datasource.master.minimum-idle = 20
spring.shardingsphere.datasource.master.maximum-pool-size = 50
spring.shardingsphere.datasource.master.auto-commit = true
spring.shardingsphere.datasource.master.idle-timeout = 30000
spring.shardingsphere.datasource.master.max-lifetime = 1800000
spring.shardingsphere.datasource.master.connection-timeout = 30000
spring.shardingsphere.datasource.master.connection-test-query = SELECT 1
# 从库slave0
spring.shardingsphere.datasource.slave0.jdbcUrl = jdbc:mysql://xxx:3306/xxx?useUnicode=true&characterEncoding=utf-8&useSSL=false&serverTimezone=GMT%2B8
spring.shardingsphere.datasource.slave0.username = xxx
spring.shardingsphere.datasource.slave0.password = xxx
spring.shardingsphere.datasource.slave0.minimum-idle = 20
spring.shardingsphere.datasource.slave0.maximum-pool-size = 50
spring.shardingsphere.datasource.slave0.auto-commit = true
spring.shardingsphere.datasource.slave0.idle-timeout = 30000
spring.shardingsphere.datasource.slave0.max-lifetime = 1800000
spring.shardingsphere.datasource.slave0.connection-timeout = 30000
spring.shardingsphere.datasource.slave0.connection-test-query = SELECT 1
# 从库slave1
spring.shardingsphere.datasource.slave1.jdbcUrl = jdbc:mysql://xxx:3306/xxx?useUnicode=true&characterEncoding=utf-8&useSSL=false&serverTimezone=GMT%2B8
spring.shardingsphere.datasource.slave1.username = xxx
spring.shardingsphere.datasource.slave1.password = xxx
spring.shardingsphere.datasource.slave1.minimum-idle = 20
spring.shardingsphere.datasource.slave1.maximum-pool-size = 50
spring.shardingsphere.datasource.slave1.auto-commit = true
spring.shardingsphere.datasource.slave1.idle-timeout = 30000
spring.shardingsphere.datasource.slave1.max-lifetime = 1800000
spring.shardingsphere.datasource.slave1.connection-timeout = 30000
spring.shardingsphere.datasource.slave1.connection-test-query = SELECT 1
# 负载均衡算法,默认轮询
spring.shardingsphere.masterslave.load-balance-algorithm-type = round_robin
spring.shardingsphere.masterslave.name = master-slave
spring.shardingsphere.masterslave.master-data-source-name = master
spring.shardingsphere.masterslave.slave-data-source-names = slave0,slave1
# 打印mysql语句
spring.shardingsphere.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
[GitHub] [shardingsphere] fengying-wzm removed a comment on issue #10290: application run failed for 5.0.0-alpha
Posted by GitBox <gi...@apache.org>.
fengying-wzm removed a comment on issue #10290:
URL: https://github.com/apache/shardingsphere/issues/10290#issuecomment-836642149
我的放在Apollo,是properties格式,你转一下。
```properties
# 是否启动读写分离
spring.shardingsphere.enabled = true
# 主库配置
spring.shardingsphere.datasource.common.driver-class-name = com.mysql.cj.jdbc.Driver
spring.shardingsphere.datasource.common.type = com.zaxxer.hikari.HikariDataSource
spring.shardingsphere.datasource.names = master,slave0,slave1
spring.shardingsphere.datasource.master.jdbcUrl = jdbc:mysql://xxx:3306/xxx?useUnicode=true&characterEncoding=utf-8&useSSL=false&serverTimezone=GMT%2B8
spring.shardingsphere.datasource.master.username = xxx
spring.shardingsphere.datasource.master.password = xxx
spring.shardingsphere.datasource.master.minimum-idle = 20
spring.shardingsphere.datasource.master.maximum-pool-size = 50
spring.shardingsphere.datasource.master.auto-commit = true
spring.shardingsphere.datasource.master.idle-timeout = 30000
spring.shardingsphere.datasource.master.max-lifetime = 1800000
spring.shardingsphere.datasource.master.connection-timeout = 30000
spring.shardingsphere.datasource.master.connection-test-query = SELECT 1
# 从库slave0
spring.shardingsphere.datasource.slave0.jdbcUrl = jdbc:mysql://xxx:3306/xxx?useUnicode=true&characterEncoding=utf-8&useSSL=false&serverTimezone=GMT%2B8
spring.shardingsphere.datasource.slave0.username = xxx
spring.shardingsphere.datasource.slave0.password = xxx
spring.shardingsphere.datasource.slave0.minimum-idle = 20
spring.shardingsphere.datasource.slave0.maximum-pool-size = 50
spring.shardingsphere.datasource.slave0.auto-commit = true
spring.shardingsphere.datasource.slave0.idle-timeout = 30000
spring.shardingsphere.datasource.slave0.max-lifetime = 1800000
spring.shardingsphere.datasource.slave0.connection-timeout = 30000
spring.shardingsphere.datasource.slave0.connection-test-query = SELECT 1
# 从库slave1
spring.shardingsphere.datasource.slave1.jdbcUrl = jdbc:mysql://xxx:3306/xxx?useUnicode=true&characterEncoding=utf-8&useSSL=false&serverTimezone=GMT%2B8
spring.shardingsphere.datasource.slave1.username = xxx
spring.shardingsphere.datasource.slave1.password = xxx
spring.shardingsphere.datasource.slave1.minimum-idle = 20
spring.shardingsphere.datasource.slave1.maximum-pool-size = 50
spring.shardingsphere.datasource.slave1.auto-commit = true
spring.shardingsphere.datasource.slave1.idle-timeout = 30000
spring.shardingsphere.datasource.slave1.max-lifetime = 1800000
spring.shardingsphere.datasource.slave1.connection-timeout = 30000
spring.shardingsphere.datasource.slave1.connection-test-query = SELECT 1
# 负载均衡算法,默认轮询
spring.shardingsphere.masterslave.load-balance-algorithm-type = round_robin
spring.shardingsphere.masterslave.name = master-slave
spring.shardingsphere.masterslave.master-data-source-name = master
spring.shardingsphere.masterslave.slave-data-source-names = slave0,slave1
# 打印mysql语句
spring.shardingsphere.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
[GitHub] [shardingsphere] fengying-wzm commented on issue #10290: application run failed for 5.0.0-alpha
Posted by GitBox <gi...@apache.org>.
fengying-wzm commented on issue #10290:
URL: https://github.com/apache/shardingsphere/issues/10290#issuecomment-836610718
5.0.0官网给的配置有点坑爹,我的如下通过:
```yaml
spring:
shardingsphere:
rules:
encrypt:
encryptors:
aes-encryptor:
props:
aes-key-value: 123456abc
type: aes
tables:
user_info:
columns:
name:
cipherColumn: name_cipher
encryptorName: aes-encryptor
plainColumn: name
```
--
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] zexho994 closed issue #10290: application run failed for 5.0.0-alpha
Posted by GitBox <gi...@apache.org>.
zexho994 closed issue #10290:
URL: https://github.com/apache/shardingsphere/issues/10290
--
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] zexho994 commented on issue #10290: application run failed for spring-boot-starter 5.0
Posted by GitBox <gi...@apache.org>.
zexho994 commented on issue #10290:
URL: https://github.com/apache/shardingsphere/issues/10290#issuecomment-836358628
## update
spring boot version : 2.1.7.RELEASE
ss version : 5.0.0-alpha
updated dependency
```
<dependency>
<groupId>org.apache.shardingsphere</groupId>
<artifactId>shardingsphere-jdbc-core-spring-boot-starter</artifactId>
<version>5.0.0-alpha</version>
</dependency>
```
updated application.yml
```
spring:
shardingsphere:
rules:
encrypt:
tables:
source_files:
columns:
file_name:
cipher-column: file_name
encryptor-name: aes-encryptor
encryptors:
aes-encryptor:
type: AES
props:
aes-key-value: 123456df
```
but... now there is a new error
```
[2021-05-10 16:18:57.468][WARN][main][org.springframework.context.support.AbstractApplicationContext:557][]: Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.apache.shardingsphere.spring.boot.SpringBootConfiguration': Initialization of bean failed; nested exception is java.lang.reflect.InvocationTargetException
[2021-05-10 16:18:57.537][ERROR][main][org.springframework.boot.SpringApplication:822][]: Application run failed
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.apache.shardingsphere.spring.boot.SpringBootConfiguration': Initialization of bean failed; nested exception is java.lang.reflect.InvocationTargetException
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:601) ~[spring-beans-5.1.9.RELEASE.jar:5.1.9.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:515) ~[spring-beans-5.1.9.RELEASE.jar:5.1.9.RELEASE]
at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:320) ~[spring-beans-5.1.9.RELEASE.jar:5.1.9.RELEASE]
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222) ~[spring-beans-5.1.9.RELEASE.jar:5.1.9.RELEASE]
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:318) ~[spring-beans-5.1.9.RELEASE.jar:5.1.9.RELEASE]
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:199) ~[spring-beans-5.1.9.RELEASE.jar:5.1.9.RELEASE]
at org.springframework.beans.factory.support.ConstructorResolver.instantiateUsingFactoryMethod(ConstructorResolver.java:392) ~[spring-beans-5.1.9.RELEASE.jar:5.1.9.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.instantiateUsingFactoryMethod(AbstractAutowireCapableBeanFactory.java:1321) ~[spring-beans-5.1.9.RELEASE.jar:5.1.9.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBeanInstance(AbstractAutowireCapableBeanFactory.java:1160) ~[spring-beans-5.1.9.RELEASE.jar:5.1.9.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:555) ~[spring-beans-5.1.9.RELEASE.jar:5.1.9.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:515) ~[spring-beans-5.1.9.RELEASE.jar:5.1.9.RELEASE]
at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:320) ~[spring-beans-5.1.9.RELEASE.jar:5.1.9.RELEASE]
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222) ~[spring-beans-5.1.9.RELEASE.jar:5.1.9.RELEASE]
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:318) ~[spring-beans-5.1.9.RELEASE.jar:5.1.9.RELEASE]
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:204) ~[spring-beans-5.1.9.RELEASE.jar:5.1.9.RELEASE]
at org.springframework.context.support.PostProcessorRegistrationDelegate.registerBeanPostProcessors(PostProcessorRegistrationDelegate.java:228) ~[spring-context-5.1.9.RELEASE.jar:5.1.9.RELEASE]
at org.springframework.context.support.AbstractApplicationContext.registerBeanPostProcessors(AbstractApplicationContext.java:721) ~[spring-context-5.1.9.RELEASE.jar:5.1.9.RELEASE]
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:534) ~[spring-context-5.1.9.RELEASE.jar:5.1.9.RELEASE]
at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:141) ~[spring-boot-2.1.7.RELEASE.jar:2.1.7.RELEASE]
at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:743) [spring-boot-2.1.7.RELEASE.jar:2.1.7.RELEASE]
at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:390) [spring-boot-2.1.7.RELEASE.jar:2.1.7.RELEASE]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:312) [spring-boot-2.1.7.RELEASE.jar:2.1.7.RELEASE]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1214) [spring-boot-2.1.7.RELEASE.jar:2.1.7.RELEASE]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1203) [spring-boot-2.1.7.RELEASE.jar:2.1.7.RELEASE]
at com.maxhub.file.preview.App.main(App.java:16) [classes/:?]
Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_261]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_261]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_261]
at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_261]
at org.apache.shardingsphere.spring.boot.util.PropertyUtil.v2(PropertyUtil.java:111) ~[shardingsphere-jdbc-spring-boot-starter-infra-5.0.0-alpha.jar:5.0.0-alpha]
at org.apache.shardingsphere.spring.boot.util.PropertyUtil.handle(PropertyUtil.java:75) ~[shardingsphere-jdbc-spring-boot-starter-infra-5.0.0-alpha.jar:5.0.0-alpha]
at org.apache.shardingsphere.spring.boot.datasource.DataSourceMapSetter.getDataSourceMap(DataSourceMapSetter.java:66) ~[shardingsphere-jdbc-spring-boot-starter-infra-5.0.0-alpha.jar:5.0.0-alpha]
at org.apache.shardingsphere.spring.boot.SpringBootConfiguration.setEnvironment(SpringBootConfiguration.java:88) ~[shardingsphere-jdbc-core-spring-boot-starter-5.0.0-alpha.jar:5.0.0-alpha]
at org.springframework.context.support.ApplicationContextAwareProcessor.invokeAwareInterfaces(ApplicationContextAwareProcessor.java:105) ~[spring-context-5.1.9.RELEASE.jar:5.1.9.RELEASE]
at org.springframework.context.support.ApplicationContextAwareProcessor.postProcessBeforeInitialization(ApplicationContextAwareProcessor.java:96) ~[spring-context-5.1.9.RELEASE.jar:5.1.9.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyBeanPostProcessorsBeforeInitialization(AbstractAutowireCapableBeanFactory.java:414) ~[spring-beans-5.1.9.RELEASE.jar:5.1.9.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1770) ~[spring-beans-5.1.9.RELEASE.jar:5.1.9.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:593) ~[spring-beans-5.1.9.RELEASE.jar:5.1.9.RELEASE]
... 24 more
Caused by: java.util.NoSuchElementException: No value bound
at org.springframework.boot.context.properties.bind.BindResult.get(BindResult.java:56) ~[spring-boot-2.1.7.RELEASE.jar:2.1.7.RELEASE]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_261]
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_261]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_261]
at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_261]
at org.apache.shardingsphere.spring.boot.util.PropertyUtil.v2(PropertyUtil.java:111) ~[shardingsphere-jdbc-spring-boot-starter-infra-5.0.0-alpha.jar:5.0.0-alpha]
at org.apache.shardingsphere.spring.boot.util.PropertyUtil.handle(PropertyUtil.java:75) ~[shardingsphere-jdbc-spring-boot-starter-infra-5.0.0-alpha.jar:5.0.0-alpha]
at org.apache.shardingsphere.spring.boot.datasource.DataSourceMapSetter.getDataSourceMap(DataSourceMapSetter.java:66) ~[shardingsphere-jdbc-spring-boot-starter-infra-5.0.0-alpha.jar:5.0.0-alpha]
at org.apache.shardingsphere.spring.boot.SpringBootConfiguration.setEnvironment(SpringBootConfiguration.java:88) ~[shardingsphere-jdbc-core-spring-boot-starter-5.0.0-alpha.jar:5.0.0-alpha]
at org.springframework.context.support.ApplicationContextAwareProcessor.invokeAwareInterfaces(ApplicationContextAwareProcessor.java:105) ~[spring-context-5.1.9.RELEASE.jar:5.1.9.RELEASE]
at org.springframework.context.support.ApplicationContextAwareProcessor.postProcessBeforeInitialization(ApplicationContextAwareProcessor.java:96) ~[spring-context-5.1.9.RELEASE.jar:5.1.9.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyBeanPostProcessorsBeforeInitialization(AbstractAutowireCapableBeanFactory.java:414) ~[spring-beans-5.1.9.RELEASE.jar:5.1.9.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1770) ~[spring-beans-5.1.9.RELEASE.jar:5.1.9.RELEASE]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:593) ~[spring-beans-5.1.9.RELEASE.jar:5.1.9.RELEASE]
... 24 more
```
--
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] zexho994 commented on issue #10290: application run failed for 5.0.0-alpha
Posted by GitBox <gi...@apache.org>.
zexho994 commented on issue #10290:
URL: https://github.com/apache/shardingsphere/issues/10290#issuecomment-837637635
@fengying-wzm 非常感谢,已解决,是配置的问题
--
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