You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@dubbo.apache.org by "chenglutao (via GitHub)" <gi...@apache.org> on 2023/03/16 08:35:25 UTC

[GitHub] [dubbo] chenglutao opened a new issue, #11852: dubbo 3.1.7 Extension instance (name: rest, class: interface org.apache.dubbo.rpc.Protocol) couldn't be instantiated: null

chenglutao opened a new issue, #11852:
URL: https://github.com/apache/dubbo/issues/11852

   dubbo version: 3.1.7
   nacos version:2.2.0
   
   yml
   `
   spring:
     application:
       name: rpc
   server:
     port: 9001
   dubbo:
     application:
       name: rpc
       qos-enable: true
       qos-port: 44444
       qos-accept-foreign-ip: false
     protocol:
       name: dubbo
       port: -1
     registry:
       address: nacos://localhost:8848?username=nacos&password=nacos
     config-center:
       address: nacos://localhost:8848?username=nacos&password=nacos
     metadata-report:
       address: nacos://localhost:8848?username=nacos&password=nacos
   
   `
   `
   spring:
     application:
       name: consumer
   server:
     port: 9000
   dubbo:
     application:
       name: consumer
       qos-accept-foreign-ip: false
       qos-enable: true
       qos-port: 33333
     scan:
       base-packages: com.xxx
     protocol:
       name: dubbo
       port: -1
     registry:
       address: nacos://localhost:8848?username=nacos&password=nacos
     config-center:
       address: nacos://localhost:8848?username=nacos&password=nacos
     metadata-report:
       address: nacos://localhost:8848?username=nacos&password=nacos
   
   `
   2023-03-16 16:23:14.063 ERROR 15300 --- [ncesChangeEvent] .d.r.c.ServiceDiscoveryRegistryDirectory :  [DUBBO] Failed to refer invoker for interface:interface com.modules.service.DemoService,url:(DefaultServiceInstance{serviceName='rpc', host='172.0.4.184', port=9001, enabled=true, healthy=true, metadata={preserved.register.source=SPRING_CLOUD}}, service{name='com.modules.service.DemoService',group='null',version='null',protocol='null',port='9001',params={},})Extension instance (name: rest, class: interface org.apache.dubbo.rpc.Protocol) couldn't be instantiated: null, dubbo version: 3.1.7, current host: 172.0.4.184, error code: 4-3. This may be caused by , go to https://dubbo.apache.org/faq/4/3 to find instructions. 
   
   java.lang.IllegalStateException: Extension instance (name: rest, class: interface org.apache.dubbo.rpc.Protocol) couldn't be instantiated: null
   	at org.apache.dubbo.common.extension.ExtensionLoader.createExtension(ExtensionLoader.java:806) ~[dubbo-3.1.7.jar:3.1.7]
   	at org.apache.dubbo.common.extension.ExtensionLoader.getExtension(ExtensionLoader.java:561) ~[dubbo-3.1.7.jar:3.1.7]
   	at org.apache.dubbo.common.extension.ExtensionLoader.getExtension(ExtensionLoader.java:535) ~[dubbo-3.1.7.jar:3.1.7]
   	at org.apache.dubbo.rpc.Protocol$Adaptive.refer(Protocol$Adaptive.java) ~[dubbo-3.1.7.jar:3.1.7]
   	at org.apache.dubbo.registry.client.ServiceDiscoveryRegistryDirectory.toInvokers(ServiceDiscoveryRegistryDirectory.java:352) [dubbo-3.1.7.jar:3.1.7]
   	at org.apache.dubbo.registry.client.ServiceDiscoveryRegistryDirectory.refreshInvoker(ServiceDiscoveryRegistryDirectory.java:254) [dubbo-3.1.7.jar:3.1.7]
   	at org.apache.dubbo.registry.client.ServiceDiscoveryRegistryDirectory.refreshOverrideAndInvoker(ServiceDiscoveryRegistryDirectory.java:182) [dubbo-3.1.7.jar:3.1.7]
   	at org.apache.dubbo.registry.client.ServiceDiscoveryRegistryDirectory.notify(ServiceDiscoveryRegistryDirectory.java:176) [dubbo-3.1.7.jar:3.1.7]
   	at org.apache.dubbo.registry.client.event.listener.ServiceInstancesChangedListener.lambda$notifyAddressChanged$9(ServiceInstancesChangedListener.java:417) [dubbo-3.1.7.jar:3.1.7]
   	at java.util.concurrent.ConcurrentHashMap.forEach(ConcurrentHashMap.java:1597) ~[na:1.8.0_331]
   	at org.apache.dubbo.registry.client.event.listener.ServiceInstancesChangedListener.notifyAddressChanged(ServiceInstancesChangedListener.java:410) [dubbo-3.1.7.jar:3.1.7]
   	at org.apache.dubbo.registry.client.event.listener.ServiceInstancesChangedListener.doOnEvent(ServiceInstancesChangedListener.java:217) [dubbo-3.1.7.jar:3.1.7]
   	at org.apache.dubbo.registry.client.event.listener.ServiceInstancesChangedListener.onEvent(ServiceInstancesChangedListener.java:113) [dubbo-3.1.7.jar:3.1.7]
   	at org.apache.dubbo.registry.nacos.NacosServiceDiscovery.handleEvent(NacosServiceDiscovery.java:231) ~[dubbo-3.1.7.jar:3.1.7]
   	at org.apache.dubbo.registry.nacos.NacosServiceDiscovery.access$000(NacosServiceDiscovery.java:64) ~[dubbo-3.1.7.jar:3.1.7]
   	at org.apache.dubbo.registry.nacos.NacosServiceDiscovery$NacosEventListener.onEvent(NacosServiceDiscovery.java:202) ~[dubbo-3.1.7.jar:3.1.7]
   	at com.alibaba.nacos.client.naming.event.InstancesChangeNotifier.onEvent(InstancesChangeNotifier.java:126) ~[nacos-client-2.2.0.jar:na]
   	at com.alibaba.nacos.client.naming.event.InstancesChangeNotifier.onEvent(InstancesChangeNotifier.java:42) ~[nacos-client-2.2.0.jar:na]
   	at com.alibaba.nacos.common.notify.DefaultPublisher.lambda$notifySubscriber$0(DefaultPublisher.java:199) ~[nacos-client-2.2.0.jar:na]
   	at com.alibaba.nacos.common.notify.DefaultPublisher.notifySubscriber(DefaultPublisher.java:206) ~[nacos-client-2.2.0.jar:na]
   	at com.alibaba.nacos.common.notify.DefaultPublisher.receiveEvent(DefaultPublisher.java:190) ~[nacos-client-2.2.0.jar:na]
   	at com.alibaba.nacos.common.notify.DefaultPublisher.openEventHandler(DefaultPublisher.java:112) ~[nacos-client-2.2.0.jar:na]
   	at com.alibaba.nacos.common.notify.DefaultPublisher.run(DefaultPublisher.java:95) ~[nacos-client-2.2.0.jar:na]
   Caused by: java.lang.reflect.InvocationTargetException: null
   	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) ~[na:1.8.0_331]
   	at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) ~[na:1.8.0_331]
   	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) ~[na:1.8.0_331]
   	at java.lang.reflect.Constructor.newInstance(Constructor.java:423) ~[na:1.8.0_331]
   	at org.apache.dubbo.common.beans.support.InstantiationStrategy.instantiate(InstantiationStrategy.java:94) ~[dubbo-3.1.7.jar:3.1.7]
   	at org.apache.dubbo.common.extension.ExtensionLoader.createExtensionInstance(ExtensionLoader.java:811) ~[dubbo-3.1.7.jar:3.1.7]
   	at org.apache.dubbo.common.extension.ExtensionLoader.createExtension(ExtensionLoader.java:772) ~[dubbo-3.1.7.jar:3.1.7]
   	... 22 common frames omitted
   Caused by: java.lang.NoClassDefFoundError: javax/ws/rs/ProcessingException
   	at org.apache.dubbo.rpc.protocol.rest.RestProtocol.<init>(RestProtocol.java:80) ~[dubbo-3.1.7.jar:3.1.7]
   	... 29 common frames omitted
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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


[GitHub] [dubbo] chenglutao commented on issue #11852: dubbo 3.1.7 Extension instance (name: rest, class: interface org.apache.dubbo.rpc.Protocol) couldn't be instantiated: null

Posted by "chenglutao (via GitHub)" <gi...@apache.org>.
chenglutao commented on issue #11852:
URL: https://github.com/apache/dubbo/issues/11852#issuecomment-1473601247

   dubbo 和 Spring Cloud Alibaba 的分组要分开,不要使用同一个分组名,这样会导致错误订阅到 Spring Cloud 的应用,使用了 Rest 协议


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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


[GitHub] [dubbo] AlbumenJ commented on issue #11852: dubbo 3.1.7 Extension instance (name: rest, class: interface org.apache.dubbo.rpc.Protocol) couldn't be instantiated: null

Posted by "AlbumenJ (via GitHub)" <gi...@apache.org>.
AlbumenJ commented on issue #11852:
URL: https://github.com/apache/dubbo/issues/11852#issuecomment-1473194516

   Please check if your nacos cluster was shared with apps written with spring cloud alibaba.
   If so, please seprate them into several namespaces.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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


[GitHub] [dubbo] chenglutao closed issue #11852: dubbo 3.1.7 Extension instance (name: rest, class: interface org.apache.dubbo.rpc.Protocol) couldn't be instantiated: null

Posted by "chenglutao (via GitHub)" <gi...@apache.org>.
chenglutao closed issue #11852: dubbo 3.1.7 Extension instance (name: rest, class: interface org.apache.dubbo.rpc.Protocol) couldn't be instantiated: null
URL: https://github.com/apache/dubbo/issues/11852


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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


[GitHub] [dubbo] mytang0 commented on issue #11852: dubbo 3.1.7 Extension instance (name: rest, class: interface org.apache.dubbo.rpc.Protocol) couldn't be instantiated: null

Posted by "mytang0 (via GitHub)" <gi...@apache.org>.
mytang0 commented on issue #11852:
URL: https://github.com/apache/dubbo/issues/11852#issuecomment-1471586780

   <img width="722" alt="image" src="https://user-images.githubusercontent.com/29346818/225570694-ef889c4e-04d6-4aa9-a0c0-1188190817d3.png">
   
   Check the dependencies.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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


[GitHub] [dubbo] chenglutao commented on issue #11852: dubbo 3.1.7 Extension instance (name: rest, class: interface org.apache.dubbo.rpc.Protocol) couldn't be instantiated: null

Posted by "chenglutao (via GitHub)" <gi...@apache.org>.
chenglutao commented on issue #11852:
URL: https://github.com/apache/dubbo/issues/11852#issuecomment-1471683790

   > <img alt="image" width="722" src="https://user-images.githubusercontent.com/29346818/225570694-ef889c4e-04d6-4aa9-a0c0-1188190817d3.png">
   > 
   > Check the dependencies.
   
   新增依赖
   <dependency>
               <groupId>org.jboss.resteasy</groupId>
               <artifactId>resteasy-client</artifactId>
               <version>3.0.20.Final</version>
    </dependency>
   
   解决了上述报错又有了新的错误,我想这是Dubbo RestProtocol机制导致的吧?
   而我并不使用Dubbo RestProtocol机制,那么我应该怎么解决这个问题?
   
   
   2023-03-16 18:03:27.850 ERROR 11800 --- [ternal.notifier] .d.r.c.ServiceDiscoveryRegistryDirectory :  [DUBBO] Failed to refer invoker for interface:interface com.rpc.modules.service.DemoService,url:(DefaultServiceInstance{serviceName='rpc', host='172.0.4.184', port=9001, enabled=true, healthy=true, metadata={preserved.register.source=SPRING_CLOUD}}, service{name='com.rpc.modules.service.DemoService',group='null',version='null',protocol='null',port='9001',params={},})RESTEASY004600: You must use at least one, but no more than one http method annotation on: public abstract java.lang.String com.rpc.modules.service.DemoService.abc(), dubbo version: 3.1.7, current host: 172.0.4.184, error code: 4-3. This may be caused by , go to https://dubbo.apache.org/faq/4/3 to find instructions. 
   
   java.lang.RuntimeException: RESTEASY004600: You must use at least one, but no more than one http method annotation on: public abstract java.lang.String com.rpc.modules.service.DemoService.abc()
   	at org.jboss.resteasy.client.jaxrs.ProxyBuilder.createClientInvoker(ProxyBuilder.java:87) ~[resteasy-client-3.0.20.Final.jar:3.0.20.Final]
   	at org.jboss.resteasy.client.jaxrs.ProxyBuilder.proxy(ProxyBuilder.java:63) ~[resteasy-client-3.0.20.Final.jar:3.0.20.Final]
   	at org.jboss.resteasy.client.jaxrs.ProxyBuilder.build(ProxyBuilder.java:131) ~[resteasy-client-3.0.20.Final.jar:3.0.20.Final]
   	at org.jboss.resteasy.client.jaxrs.internal.ClientWebTarget.proxy(ClientWebTarget.java:74) ~[resteasy-client-3.0.20.Final.jar:3.0.20.Final]
   	at org.apache.dubbo.rpc.protocol.rest.RestProtocol.doRefer(RestProtocol.java:162) ~[dubbo-3.1.7.jar:3.1.7]
   	at org.apache.dubbo.rpc.protocol.AbstractProxyProtocol.protocolBindingRefer(AbstractProxyProtocol.java:110) ~[dubbo-3.1.7.jar:3.1.7]
   	at org.apache.dubbo.rpc.protocol.AbstractProtocol.refer(AbstractProtocol.java:134) ~[dubbo-3.1.7.jar:3.1.7]
   	at org.apache.dubbo.rpc.protocol.ProtocolListenerWrapper.refer(ProtocolListenerWrapper.java:77) ~[dubbo-3.1.7.jar:3.1.7]
   	at org.apache.dubbo.rpc.protocol.ProtocolSecurityWrapper.refer(ProtocolSecurityWrapper.java:107) ~[dubbo-3.1.7.jar:3.1.7]
   	at org.apache.dubbo.qos.protocol.QosProtocolWrapper.refer(QosProtocolWrapper.java:83) ~[dubbo-3.1.7.jar:3.1.7]
   	at org.apache.dubbo.rpc.cluster.filter.ProtocolFilterWrapper.refer(ProtocolFilterWrapper.java:74) ~[dubbo-3.1.7.jar:3.1.7]
   	at org.apache.dubbo.rpc.protocol.ProtocolSerializationWrapper.refer(ProtocolSerializationWrapper.java:52) ~[dubbo-3.1.7.jar:3.1.7]
   	at org.apache.dubbo.rpc.Protocol$Adaptive.refer(Protocol$Adaptive.java) ~[dubbo-3.1.7.jar:3.1.7]
   	at org.apache.dubbo.registry.client.ServiceDiscoveryRegistryDirectory.toInvokers(ServiceDiscoveryRegistryDirectory.java:352) [dubbo-3.1.7.jar:3.1.7]
   	at org.apache.dubbo.registry.client.ServiceDiscoveryRegistryDirectory.refreshInvoker(ServiceDiscoveryRegistryDirectory.java:254) [dubbo-3.1.7.jar:3.1.7]
   	at org.apache.dubbo.registry.client.ServiceDiscoveryRegistryDirectory.refreshOverrideAndInvoker(ServiceDiscoveryRegistryDirectory.java:182) [dubbo-3.1.7.jar:3.1.7]
   	at org.apache.dubbo.registry.client.ServiceDiscoveryRegistryDirectory.notify(ServiceDiscoveryRegistryDirectory.java:176) [dubbo-3.1.7.jar:3.1.7]
   	at org.apache.dubbo.registry.client.event.listener.ServiceInstancesChangedListener.addListenerAndNotify(ServiceInstancesChangedListener.java:237) [dubbo-3.1.7.jar:3.1.7]
   	at org.apache.dubbo.registry.client.ServiceDiscoveryRegistry.subscribeURLs(ServiceDiscoveryRegistry.java:326) [dubbo-3.1.7.jar:3.1.7]
   	at org.apache.dubbo.registry.client.ServiceDiscoveryRegistry$DefaultMappingListener.onEvent(ServiceDiscoveryRegistry.java:386) [dubbo-3.1.7.jar:3.1.7]
   	at org.apache.dubbo.metadata.store.nacos.NacosMetadataReport$MappingDataListener.lambda$process$0(NacosMetadataReport.java:514) [dubbo-3.1.7.jar:3.1.7]
   	at java.lang.Iterable.forEach(Iterable.java:75) ~[na:1.8.0_331]
   	at org.apache.dubbo.metadata.store.nacos.NacosMetadataReport$MappingDataListener.process(NacosMetadataReport.java:514) [dubbo-3.1.7.jar:3.1.7]
   	at org.apache.dubbo.metadata.store.nacos.NacosMetadataReport$NacosConfigListener.lambda$innerReceive$0(NacosMetadataReport.java:445) ~[dubbo-3.1.7.jar:3.1.7]
   	at java.util.concurrent.CopyOnWriteArrayList.forEach(CopyOnWriteArrayList.java:895) ~[na:1.8.0_331]
   	at java.util.concurrent.CopyOnWriteArraySet.forEach(CopyOnWriteArraySet.java:404) ~[na:1.8.0_331]
   	at org.apache.dubbo.metadata.store.nacos.NacosMetadataReport$NacosConfigListener.innerReceive(NacosMetadataReport.java:445) ~[dubbo-3.1.7.jar:3.1.7]
   	at com.alibaba.nacos.api.config.listener.AbstractSharedListener.receiveConfigInfo(AbstractSharedListener.java:40) ~[nacos-client-2.2.0.jar:na]
   	at com.alibaba.nacos.client.config.impl.CacheData.lambda$safeNotifyListener$1(CacheData.java:334) ~[nacos-client-2.2.0.jar:na]
   	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) ~[na:1.8.0_331]
   	at java.util.concurrent.FutureTask.run(FutureTask.java:266) ~[na:1.8.0_331]
   	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) ~[na:1.8.0_331]
   	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) ~[na:1.8.0_331]
   	at java.lang.Thread.run(Thread.java:750) ~[na:1.8.0_331]
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@dubbo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


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