You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@dubbo.apache.org by "pursueLife (GitHub)" <gi...@apache.org> on 2019/01/16 03:32:23 UTC

[GitHub] [incubator-dubbo] pursueLife opened issue #3242: dubbo-demo-annotation-consumer run failed

- [ ] I have searched the [issues](https://github.com/apache/incubator-dubbo/issues) of this repository and believe that this is not a duplicate.
- [ ] I have checked the [FAQ](https://github.com/apache/incubator-dubbo/blob/master/FAQ.md) of this repository and believe that this is not a duplicate.

### Environment

* Dubbo version: 2.7.0
* Operating System version: window
* Java version: jdk8

### Steps to reproduce this issue

1. dubbo-demo-annotation-consumer.Application 启动main()方法报错

[16/01/19 11:17:43:179 CST] main  INFO annotation.ReferenceAnnotationBeanPostProcessor: class org.apache.dubbo.config.spring.beans.factory.annotation.ReferenceAnnotationBeanPostProcessor was destroying!
Exception in thread "main" org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'demoServiceComponent': Injection of @Reference dependencies failed; nested exception is java.lang.UnsupportedOperationException
	at org.apache.dubbo.config.spring.beans.factory.annotation.ReferenceAnnotationBeanPostProcessor.postProcessPropertyValues(ReferenceAnnotationBeanPostProcessor.java:105)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1268)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:553)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:483)
	at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:312)
	at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)
	at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:308)
	at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197)
	at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:761)
	at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:867)
	at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:543)
	at org.springframework.context.annotation.AnnotationConfigApplicationContext.<init>(AnnotationConfigApplicationContext.java:84)
	at org.apache.dubbo.demo.consumer.Application.main(Application.java:36)
Caused by: java.lang.UnsupportedOperationException
	at java.util.concurrent.CopyOnWriteArrayList$COWIterator.set(CopyOnWriteArrayList.java:1185)
	at java.util.Collections.sort(Collections.java:170)
	at org.apache.dubbo.rpc.cluster.RouterChain.sort(RouterChain.java:87)
	at org.apache.dubbo.rpc.cluster.RouterChain.initWithRouters(RouterChain.java:67)
	at org.apache.dubbo.rpc.cluster.RouterChain.<init>(RouterChain.java:57)
	at org.apache.dubbo.rpc.cluster.RouterChain.buildChain(RouterChain.java:46)
	at org.apache.dubbo.registry.integration.RegistryDirectory.buildRouterChain(RegistryDirectory.java:584)
	at org.apache.dubbo.registry.integration.RegistryProtocol.doRefer(RegistryProtocol.java:378)
	at org.apache.dubbo.registry.integration.RegistryProtocol.refer(RegistryProtocol.java:361)
	at org.apache.dubbo.rpc.protocol.ProtocolListenerWrapper.refer(ProtocolListenerWrapper.java:65)
	at org.apache.dubbo.rpc.protocol.ProtocolFilterWrapper.refer(ProtocolFilterWrapper.java:114)
	at org.apache.dubbo.rpc.Protocol$Adaptive.refer(Protocol$Adaptive.java)
	at org.apache.dubbo.config.ReferenceConfig.createProxy(ReferenceConfig.java:372)
	at org.apache.dubbo.config.ReferenceConfig.init(ReferenceConfig.java:312)
	at org.apache.dubbo.config.ReferenceConfig.get(ReferenceConfig.java:236)
	at org.apache.dubbo.config.spring.ReferenceBean.getObject(ReferenceBean.java:70)
	at org.apache.dubbo.config.spring.beans.factory.annotation.ReferenceAnnotationBeanPostProcessor$ReferenceFieldElement.inject(ReferenceAnnotationBeanPostProcessor.java:376)
	at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:88)
	at org.apache.dubbo.config.spring.beans.factory.annotation.ReferenceAnnotationBeanPostProcessor.postProcessPropertyValues(ReferenceAnnotationBeanPostProcessor.java:101)
	... 12 more


[ Full content available at: https://github.com/apache/incubator-dubbo/issues/3242 ]
This message was relayed via gitbox.apache.org for notifications@dubbo.apache.org

[GitHub] [incubator-dubbo] pursueLife commented on issue #3242: dubbo-demo-annotation-consumer run failed

Posted by "pursueLife (GitHub)" <gi...@apache.org>.
ok!

[ Full content available at: https://github.com/apache/incubator-dubbo/issues/3242 ]
This message was relayed via gitbox.apache.org for notifications@dubbo.apache.org


[GitHub] [incubator-dubbo] pursueLife commented on issue #3242: dubbo-demo-annotation-consumer run failed

Posted by "pursueLife (GitHub)" <gi...@apache.org>.
RouterChain类  
 this.routers = new CopyOnWriteArrayList<>(builtinRouters);
   this.sort(); 
CopyOnWriteArrayList不支持Collections.sort 

[ Full content available at: https://github.com/apache/incubator-dubbo/issues/3242 ]
This message was relayed via gitbox.apache.org for notifications@dubbo.apache.org

[GitHub] [incubator-dubbo] pursueLife closed issue #3242: dubbo-demo-annotation-consumer run failed

Posted by "pursueLife (GitHub)" <gi...@apache.org>.
[ issue closed by pursueLife ]

[ Full content available at: https://github.com/apache/incubator-dubbo/issues/3242 ]
This message was relayed via gitbox.apache.org for notifications@dubbo.apache.org


[GitHub] [incubator-dubbo] pursueLife commented on issue #3242: dubbo-demo-annotation-consumer run failed

Posted by "pursueLife (GitHub)" <gi...@apache.org>.
Thats all right!

[ Full content available at: https://github.com/apache/incubator-dubbo/issues/3242 ]
This message was relayed via gitbox.apache.org for notifications@dubbo.apache.org


[GitHub] [incubator-dubbo] CrazyHZM commented on issue #3242: dubbo-demo-annotation-consumer run failed

Posted by "CrazyHZM (GitHub)" <gi...@apache.org>.
thank you , I will fix it

[ Full content available at: https://github.com/apache/incubator-dubbo/issues/3242 ]
This message was relayed via gitbox.apache.org for notifications@dubbo.apache.org


[GitHub] [incubator-dubbo] shjk commented on issue #3242: dubbo-demo-annotation-consumer run failed

Posted by "shjk (GitHub)" <gi...@apache.org>.
2.7.1-SNAPSHOT 启动 dubbo-demo-api-consumer 也报这样的错误

Exception in thread "main" java.lang.UnsupportedOperationException
	at java.util.concurrent.CopyOnWriteArrayList$COWIterator.set(CopyOnWriteArrayList.java:1185)
	at java.util.Collections.sort(Collections.java:170)
	at org.apache.dubbo.rpc.cluster.RouterChain.sort(RouterChain.java:87)

[ Full content available at: https://github.com/apache/incubator-dubbo/issues/3242 ]
This message was relayed via gitbox.apache.org for notifications@dubbo.apache.org

[GitHub] [incubator-dubbo] pursueLife commented on issue #3242: dubbo-demo-annotation-consumer run failed

Posted by "pursueLife (GitHub)" <gi...@apache.org>.
RouterChain类  
 this.routers = new CopyOnWriteArrayList<>(builtinRouters);
   this.sort(); 
CopyOnWriteArrayList 不支持排序

[ Full content available at: https://github.com/apache/incubator-dubbo/issues/3242 ]
This message was relayed via gitbox.apache.org for notifications@dubbo.apache.org

[GitHub] [incubator-dubbo] ylylc commented on issue #3242: dubbo-demo-annotation-consumer run failed

Posted by "ylylc (GitHub)" <gi...@apache.org>.
我也遇到了这个问题,解决办法是:提高jdk版本到1.8.0_90以上试试。我的1.8.0_92的可以

[ Full content available at: https://github.com/apache/incubator-dubbo/issues/3242 ]
This message was relayed via gitbox.apache.org for notifications@dubbo.apache.org