You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
in migrationInvoker.migrateToServiceDiscoveryInvoker(false);
first call refreshServiceDiscoveryInvoker(), in the process, it will use metadataReport, but nacosMetadataReport didn't support
service app mapping, so the serviceName is empty, and check is true, then throw the exception.
If fact, refreshInterfaceInvoker() will create invoker normally.
So the check should consider both situaion.
If there is an exception, please attach the exception trace:
Exception in thread "main" org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'demoService': FactoryBean threw exception on object creation; nested exception is java.lang.IllegalStateException: Should has at least one way to know which services this interface belongs to, subscription url: consumer://192.168.0.101/org.apache.dubbo.demo.DemoService?REGISTRY_CLUSTER=org.apache.dubbo.config.RegistryConfig&application=demo-consumer&category=providers,configurators,routers&check=true&dubbo=2.0.2&enable-auto-migration=true&enable.auto.migration=true&init=false&interface=org.apache.dubbo.demo.DemoService&mapping-type=metadata&mapping.type=metadata&metadata-type=remote&methods=sayHello,sayHelloAsync&pid=6886&qos.port=33333&side=consumer&sticky=false×tamp=1615218681551
at org.springframework.beans.factory.support.FactoryBeanRegistrySupport.doGetObjectFromFactoryBean(FactoryBeanRegistrySupport.java:176)
at org.springframework.beans.factory.support.FactoryBeanRegistrySupport.getObjectFromFactoryBean(FactoryBeanRegistrySupport.java:101)
at org.springframework.beans.factory.support.AbstractBeanFactory.getObjectForBeanInstance(AbstractBeanFactory.java:1827)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.getObjectForBeanInstance(AbstractAutowireCapableBeanFactory.java:1265)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:261)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:207)
at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:1115)
at org.apache.dubbo.demo.consumer.Application.main(Application.java:34)
Caused by: java.lang.IllegalStateException: Should has at least one way to know which services this interface belongs to, subscription url: consumer://192.168.0.101/org.apache.dubbo.demo.DemoService?REGISTRY_CLUSTER=org.apache.dubbo.config.RegistryConfig&application=demo-consumer&category=providers,configurators,routers&check=true&dubbo=2.0.2&enable-auto-migration=true&enable.auto.migration=true&init=false&interface=org.apache.dubbo.demo.DemoService&mapping-type=metadata&mapping.type=metadata&metadata-type=remote&methods=sayHello,sayHelloAsync&pid=6886&qos.port=33333&side=consumer&sticky=false×tamp=1615218681551
at org.apache.dubbo.registry.client.ServiceDiscoveryRegistry.doSubscribe(ServiceDiscoveryRegistry.java:268)
at org.apache.dubbo.registry.client.ServiceDiscoveryRegistry.subscribe(ServiceDiscoveryRegistry.java:257)
at org.apache.dubbo.registry.ListenerRegistryWrapper.subscribe(ListenerRegistryWrapper.java:105)
at org.apache.dubbo.registry.integration.DynamicDirectory.subscribe(DynamicDirectory.java:151)
at org.apache.dubbo.registry.integration.RegistryProtocol.doCreateInvoker(RegistryProtocol.java:498)
at org.apache.dubbo.registry.integration.InterfaceCompatibleRegistryProtocol.getServiceDiscoveryInvoker(InterfaceCompatibleRegistryProtocol.java:65)
at org.apache.dubbo.registry.client.migration.MigrationInvoker.refreshServiceDiscoveryInvoker(MigrationInvoker.java:291)
at org.apache.dubbo.registry.client.migration.MigrationInvoker.migrateToServiceDiscoveryInvoker(MigrationInvoker.java:112)
at org.apache.dubbo.registry.client.migration.MigrationRuleHandler.doMigrate(MigrationRuleHandler.java:60)
at org.apache.dubbo.registry.client.migration.MigrationRuleListener.onRefer(MigrationRuleListener.java:103)
at org.apache.dubbo.registry.integration.RegistryProtocol.interceptInvoker(RegistryProtocol.java:471)
at org.apache.dubbo.registry.integration.RegistryProtocol.doRefer(RegistryProtocol.java:457)
at org.apache.dubbo.registry.integration.RegistryProtocol.refer(RegistryProtocol.java:451)
at org.apache.dubbo.rpc.protocol.ProtocolListenerWrapper.refer(ProtocolListenerWrapper.java:72)
at org.apache.dubbo.rpc.protocol.ProtocolFilterWrapper.refer(ProtocolFilterWrapper.java:81)
at org.apache.dubbo.rpc.Protocol$Adaptive.refer(Protocol$Adaptive.java)
at org.apache.dubbo.config.ReferenceConfig.createProxy(ReferenceConfig.java:367)
at org.apache.dubbo.config.ReferenceConfig.init(ReferenceConfig.java:305)
at org.apache.dubbo.config.ReferenceConfig.get(ReferenceConfig.java:204)
at org.apache.dubbo.config.spring.ReferenceBean.getObject(ReferenceBean.java:68)
at org.springframework.beans.factory.support.FactoryBeanRegistrySupport.doGetObjectFromFactoryBean(FactoryBeanRegistrySupport.java:169)
... 7 more
The text was updated successfully, but these errors were encountered:
Environment
Steps to reproduce this issue
2.start dubbo-demo-xml-consumer/Application
Expected Result
in migrationInvoker.migrateToServiceDiscoveryInvoker(false);
first call refreshServiceDiscoveryInvoker(), in the process, it will use metadataReport, but nacosMetadataReport didn't support
service app mapping, so the serviceName is empty, and check is true, then throw the exception.
If fact, refreshInterfaceInvoker() will create invoker normally.
So the check should consider both situaion.
If there is an exception, please attach the exception trace:
The text was updated successfully, but these errors were encountered: