-
Notifications
You must be signed in to change notification settings - Fork 26.5k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
MockClusterInvoker provides local forced mock,I tested it locally, but it doesn't work. #2489
Closed
2 tasks done
Labels
type/bug
Bugs to being fixed
Comments
When I add this configuration: <dubbo:reference mock="force:org.apache.dubbo.demo.consumer.DemoServiceMock" id="demoService" check="false" interface="org.apache.dubbo.demo.DemoService"/> the following exception occurs: Exception in thread "main" org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'demoService': Error setting property values; nested exception is org.springframework.beans.PropertyBatchUpdateException; nested PropertyAccessExceptions (1) are:
PropertyAccessException 1: org.springframework.beans.MethodInvocationException: Property 'mock' threw exception; nested exception is java.lang.IllegalStateException: Invalid mock="force\:org.apache.dubbo.demo.consumer.DemoServiceMock" contains illegal character, only digit, letter, '-', '_' or '.' is legal.
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1570)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1280)
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: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:93)
at org.apache.dubbo.demo.consumer.Consumer.main(Consumer.java:31)
Caused by: org.springframework.beans.PropertyBatchUpdateException; nested PropertyAccessExceptions (1) are:
PropertyAccessException 1: org.springframework.beans.MethodInvocationException: Property 'mock' threw exception; nested exception is java.lang.IllegalStateException: Invalid mock="force\:org.apache.dubbo.demo.consumer.DemoServiceMock" contains illegal character, only digit, letter, '-', '_' or '.' is legal.
at org.springframework.beans.AbstractPropertyAccessor.setPropertyValues(AbstractPropertyAccessor.java:121)
at org.springframework.beans.AbstractPropertyAccessor.setPropertyValues(AbstractPropertyAccessor.java:75)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1566)
... 13 more |
jsen-joker
pushed a commit
to jsen-joker/incubator-dubbo
that referenced
this issue
Sep 19, 2018
6 tasks
<dubbo:reference id="demoService" check="false" interface="org.apache.dubbo.demo.DemoService" mock="true"> or <dubbo:reference id="demoService" check="false" interface="org.apache.dubbo.demo.DemoService" mock="org.apache.dubbo.demo.DemoServiceMock"> |
# for free
to join this conversation on GitHub.
Already have an account?
# to comment
Environment
Steps to reproduce this issue
Pls. provide [GitHub address] to reproduce this issue.
Expected Result
force mock should be trigged.
Actual Result
start failed.
I have checked code(MockClusterInvoker) :
The text was updated successfully, but these errors were encountered: