willlau0524 commented on issue #1765: 使用@Reference注解,如果对应服务没有实例,报错之后这个对象一直为空
URL: 
https://github.com/apache/incubator-dubbo/issues/1765#issuecomment-387928888
 
 
   异常栈:
   java.lang.reflect.InvocationTargetException: null
           at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 
~[?:1.8.0_131]
           at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) 
~[?:1.8.0_131]
           at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
 ~[?:1.8.0_131]
           at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_131]
           at 
com.alibaba.dubbo.config.AbstractConfig.toString(AbstractConfig.java:473) 
[dubbo-2.5.8.jar:2.5.8]
           at java.lang.String.valueOf(String.java:2994) [?:1.8.0_131]
           at java.lang.StringBuilder.append(StringBuilder.java:131) 
[?:1.8.0_131]
           at 
com.alibaba.dubbo.config.spring.beans.factory.annotation.AbstractAnnotationConfigBeanBuilder.build(AbstractAnnotationConfigBeanBuilder.java:61)
 [dubbo-2.5.8.jar:2.5.8]
           at 
com.alibaba.dubbo.config.spring.beans.factory.annotation.ReferenceAnnotationBeanPostProcessor.buildReferenceBean(ReferenceAnnotationBeanPostProcessor.java:318)
 [dubbo-2.5.8.jar:2.5.8]
           at 
com.alibaba.dubbo.config.spring.beans.factory.annotation.ReferenceAnnotationBeanPostProcessor.access$100(ReferenceAnnotationBeanPostProcessor.java:45)
 [dubbo-2.5.8.jar:2.5.8]
           at 
com.alibaba.dubbo.config.spring.beans.factory.annotation.ReferenceAnnotationBeanPostProcessor$ReferenceFieldElement.inject(ReferenceAnnotationBeanPostProcessor.java:296)
 [dubbo-2.5.8.jar:2.5.8]
           at 
org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:88)
 [spring-beans-4.3.12.RELEASE.jar:4.3.12.RELEASE]
           at 
com.alibaba.dubbo.config.spring.beans.factory.annotation.ReferenceAnnotationBeanPostProcessor.postProcessPropertyValues(ReferenceAnnotationBeanPostProcessor.java:72)
 [dubbo-2.5.8.jar:2.5.8]
           at 
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1264)
 [spring-beans-4.3.12.RELEASE.jar:4.3.12.RELEASE]
           at 
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:553)
 [spring-beans-4.3.12.RELEASE.jar:4.3.12.RELEASE]
           at 
org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:483)
 [spring-beans-4.3.12.RELEASE.jar:4.3.12.RELEASE]
           at 
org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:306)
 [spring-beans-4.3.12.RELEASE.jar:4.3.12.RELEASE]
           at 
org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)
 [spring-beans-4.3.12.RELEASE.jar:4.3.12.RELEASE]
           at 
org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:302)
 [spring-beans-4.3.12.RELEASE.jar:4.3.12.RELEASE]
           at 
org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:197)
 [spring-beans-4.3.12.RELEASE.jar:4.3.12.RELEASE]
           at 
org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:761)
 [spring-beans-4.3.12.RELEASE.jar:4.3.12.RELEASE]
           at 
org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:867)
 [spring-context-4.3.12.RELEASE.jar:4.3.12.RELEASE]
           at 
org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:543)
 [spring-context-4.3.12.RELEASE.jar:4.3.12.RELEASE]
           at 
org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.refresh(EmbeddedWebApplicationContext.java:122)
 [spring-boot-1.5.8.RELEASE.jar:1.5.8.RELEASE]
           at 
org.springframework.boot.SpringApplication.refresh(SpringApplication.java:693) 
[spring-boot-1.5.8.RELEASE.jar:1.5.8.RELEASE]
           at 
org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:360)
 [spring-boot-1.5.8.RELEASE.jar:1.5.8.RELEASE]
           at 
org.springframework.boot.SpringApplication.run(SpringApplication.java:303) 
[spring-boot-1.5.8.RELEASE.jar:1.5.8.RELEASE]
           at 
org.springframework.boot.SpringApplication.run(SpringApplication.java:1118) 
[spring-boot-1.5.8.RELEASE.jar:1.5.8.RELEASE]
           at 
org.springframework.boot.SpringApplication.run(SpringApplication.java:1107) 
[spring-boot-1.5.8.RELEASE.jar:1.5.8.RELEASE]

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscr...@dubbo.apache.org
For additional commands, e-mail: notifications-h...@dubbo.apache.org

Reply via email to