Skip to content
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

Got an exception when debugging #2431

Closed
2 tasks done
ShuaiJunlan opened this issue Sep 4, 2018 · 2 comments
Closed
2 tasks done

Got an exception when debugging #2431

ShuaiJunlan opened this issue Sep 4, 2018 · 2 comments

Comments

@ShuaiJunlan
Copy link

  • I have searched the issues of this repository and believe that this is not a duplicate.
  • I have checked the FAQ of this repository and believe that this is not a duplicate.

Environment

  • Dubbo version: 2.7.0-SNAPSHOT
  • Operating System version: Ubuntu 18.04 LTS
  • Java version: 1.8.0_181

Step to reproduce this issue

  1. Making a breakpoint in the 83th line of class org.apache.dubbo.config.spring.ReferenceBean
  2. Debugging dubbo-consumer-demo

Got an exception

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.dubbo.config.AbstractConfig.toString(AbstractConfig.java:465)
	at org.apache.dubbo.config.spring.ReferenceBean.afterPropertiesSet(ReferenceBean.java:83)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1688)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1626)
	at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:555)
	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:742)
	at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:867)
	at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:543)
	at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:139)
	at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:83)
	at cn.shuaijunlan.dubbo.learning.main.Main.main(Main.java:14)
Caused by: java.lang.IllegalStateException: No such application config! Please add <dubbo:application name="..." /> to your spring config.
	at org.apache.dubbo.config.AbstractInterfaceConfig.checkApplication(AbstractInterfaceConfig.java:143)
	at org.apache.dubbo.config.ReferenceConfig.init(ReferenceConfig.java:280)
	at org.apache.dubbo.config.ReferenceConfig.get(ReferenceConfig.java:165)
	at org.apache.dubbo.config.spring.ReferenceBean.getObject(ReferenceBean.java:66)
	... 20 more
@diecui1202
Copy link

@ShuaiJunlan Make sure <dubbo:application name="..." /> has been configured.

@zonghaishang
Copy link
Member

Intellij Idea -> Prefrencence -> Build -> Debuger -> Data Views -> Java uncheck Enable 'toString' object view:

image

If you have any questions, feel free to open

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants