New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Dubbo 2.7.5, 2.7.9, 2.7.11, 2.7.12 are incompatiable with nacos-spring-context 1.1.0 #7797
Comments
if exclude spring-context-support of dubbo in pom.xml, ClassCastException - java.lang.String cannot be cast to java.lang.Class - will be throwed at DubboAnnotationUtils.java line 95 while creating a bean which has dubbo @reference injections. |
I think we can remove the dependency of spring-context-support in the future. |
the root cause is alibaba spring-context-support 1.0.11 set default value of two new added elements classValuesAsString and nestedAnnotationsAsMap to true, which destroys dubbo ReferenceAnnotationBeanPostProcessor findFieldAnnotationMetadata and findAnnotatedMethodMetadata functions. |
we make dubbo 2.7.12 and nacos client 1.4.2 working well with each other by #8217 :
|
@kylixs PTAL |
@zrlw Since dubbo 3.0.0, the |
dubbo 2.7.x has merge pull request: #8217 |
@zrlw Please add a sample for regression testing: |
you're right,i didn't notice that dubbo 3.x had used its own AbstractAnnotationBeanPostProcessor. |
I tried to run Junit Test of dubbo-samples-nacos-configcenter, only got IllegalStateException:
what else should i prepare?
to
|
Please start nacos server first |
modified dubbo-samples-nacos-configcenter: apache/dubbo-samples#352 |
Environment
Steps to reproduce this issue
create a maven spring-boot test application which pom.xml has dubbo first and nacos-spring-context 1.1.0 later,
with dubbo which depend on spring-context-support 1.0.10:
a ClassCastException - com.sun.proxy.$Proxy...NNN... cannot be cast to java.util.Map - will be throwed at AnnotationNacosInjectedBeanPostProcessor.java line 145.
with dubbo which depend on spring-context-support 1.0.8 or less:
An attempt was made to call a method that does not exist (com.alibaba.spring.util.BeanUtils.getBeanNames)
The reason is nacos-spring-context 1.1.0 depends on spring-context-support 1.0.11 which isn't compliant with that dubbo depends now.
The text was updated successfully, but these errors were encountered: