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/12/10 03:19:52 UTC
[GitHub] [shardingsphere] 438219972 opened a new issue #8555: replica query Missing some configuration error in version 5.0.0-alpha
438219972 opened a new issue #8555:
URL: https://github.com/apache/shardingsphere/issues/8555
spring boot 2.4.0
<dependency>
<groupId>org.apache.shardingsphere</groupId>
<artifactId>shardingsphere-jdbc-core-spring-boot-starter</artifactId>
<version>5.0.0-alpha</version>
</dependency>
If not configured
`spring.shardingsphere.rules.replica-query.load-balancers.<algorithm-name>.props.xxx`
or
'spring.shardingsphere.datasource.common.xxx'
**at org.apache.shardingsphere.spring.boot.registry.AbstractAlgorithmProvidedBeanRegistry.lambda$registerBean$1(AbstractAlgorithmProvidedBeanRegistry.java:57)**
**at org.apache.shardingsphere.spring.boot.datasource.DataSourceMapSetter.getDataSourceMap(DataSourceMapSetter.java:66)**
Exception in thread "main" java.lang.reflect.UndeclaredThrowableException
at org.springframework.util.ReflectionUtils.rethrowRuntimeException(ReflectionUtils.java:147)
at org.springframework.boot.SpringApplication.handleRunFailure(SpringApplication.java:830)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:336)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1309)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1298)
at com.winyo.shop.ShopApplication.main(ShopApplication.java:11)
Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.apache.shardingsphere.spring.boot.util.PropertyUtil.v2(PropertyUtil.java:111)
at org.apache.shardingsphere.spring.boot.util.PropertyUtil.handle(PropertyUtil.java:75)
at org.apache.shardingsphere.spring.boot.registry.AbstractAlgorithmProvidedBeanRegistry.lambda$registerBean$1(AbstractAlgorithmProvidedBeanRegistry.java:57)
at java.lang.Iterable.forEach(Iterable.java:75)
at org.apache.shardingsphere.spring.boot.registry.AbstractAlgorithmProvidedBeanRegistry.registerBean(AbstractAlgorithmProvidedBeanRegistry.java:55)
at org.apache.shardingsphere.replicaquery.spring.boot.algorithm.ReplicaQueryAlgorithmProvidedBeanRegistry.postProcessBeanDefinitionRegistry(ReplicaQueryAlgorithmProvidedBeanRegistry.java:43)
at org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanDefinitionRegistryPostProcessors(PostProcessorRegistrationDelegate.java:285)
at org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanFactoryPostProcessors(PostProcessorRegistrationDelegate.java:129)
at org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:751)
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:569)
at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:144)
at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:767)
at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:759)
at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:426)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:326)
... 3 more
Caused by: java.util.NoSuchElementException: No value bound
at org.springframework.boot.context.properties.bind.BindResult.get(BindResult.java:55)
... 22 more
The round-robin algorithm does not require attributes 'props'
and
I don't need to configure 'spring.shardingsphere.datasource.common.xxx'
----------------------------------------------------------------
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] 438219972 commented on issue #8555: replica query Missing some configuration error in version 5.0.0-alpha
Posted by GitBox <gi...@apache.org>.
438219972 commented on issue #8555:
URL: https://github.com/apache/shardingsphere/issues/8555#issuecomment-744127732
>
>
> Hi guys,
>
> Do you think [#8514](https://github.com/apache/shardingsphere/issues/8514) is the same as this one?
>
> `.props` for `SpringBoot` is a bug and has been fixed on the master branch. Sorry for this inconvenience. :(
>
> But for now, here are two approaches for you to avoid this exception,
>
> * Use SpringBoot 1.x release
>
> * Set a fake or invalid property, like `spring.shardingsphere.rules.replica-query.load-balancers.<algorithm-name>.props.default=0` (Don't worry, this `default` property has no any effect)
>
>
> Again, we are sorry to trouble you with this one.
>
> Trista
Thank you,I already set a fake property to solve 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
[GitHub] [shardingsphere] J-TIGGER commented on issue #8555: replica query Missing some configuration error in version 5.0.0-alpha
Posted by GitBox <gi...@apache.org>.
J-TIGGER commented on issue #8555:
URL: https://github.com/apache/shardingsphere/issues/8555#issuecomment-742262375
Thank you, I've worked it out
----------------------------------------------------------------
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] tristaZero commented on issue #8555: replica query Missing some configuration error in version 5.0.0-alpha
Posted by GitBox <gi...@apache.org>.
tristaZero commented on issue #8555:
URL: https://github.com/apache/shardingsphere/issues/8555#issuecomment-742223648
Hi guys,
Do you think [#8514](https://github.com/apache/shardingsphere/issues/8514) is the same as this one?
`.props` for `SpringBoot` is a bug and has been fixed on the master branch. Sorry for this inconvenience. :(
But for now, here are two approaches for you to avoid this exception,
- Use SpringBoot 1.x release
- Set a fake or invalid property, like `spring.shardingsphere.rules.replica-query.load-balancers.<algorithm-name>.props.default=0` (Don't worry, this `default` property has no any effect)
Again, we are sorry to trouble you with this one.
Trista
----------------------------------------------------------------
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] J-TIGGER commented on issue #8555: replica query Missing some configuration error in version 5.0.0-alpha
Posted by GitBox <gi...@apache.org>.
J-TIGGER commented on issue #8555:
URL: https://github.com/apache/shardingsphere/issues/8555#issuecomment-742217888
I have encountered the same problem. Has this been solved?
----------------------------------------------------------------
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] 438219972 closed issue #8555: replica query Missing some configuration error in version 5.0.0-alpha
Posted by GitBox <gi...@apache.org>.
438219972 closed issue #8555:
URL: https://github.com/apache/shardingsphere/issues/8555
----------------------------------------------------------------
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