You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@dubbo.apache.org by "wildeslam (via GitHub)" <gi...@apache.org> on 2023/05/22 11:59:53 UTC

[GitHub] [dubbo] wildeslam opened a new issue, #12378: dubbo3(consumer)分别调用dubbo2和dubbo3(provider)关于加载扩展协议的问题

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

   <!-- If you need to report a security issue please visit https://github.com/apache/dubbo/security/policy -->
   
   - [ ] I have searched the [issues](https://github.com/apache/dubbo/issues) of this repository and believe that this is not a duplicate.
   
   ## Ask your question here
   consumer版本:3.1.9
   provider版本:2.6.5 3.1.9
   自定义协议
   `public class CustomProtocol extends DubboProtocol {
       @Override
       public int getDefaultPort() {
           return 2222;
       }
   }`
   org.apache.dubbo.rpc.Protocol文件:
   custom2=com.xxx.dubbo2.customprotocol.CustomProtocol
   custom3=com.xxx.dubbo3.customprotocol.CustomProtocol
   
   现在的情况是dubbo3调用dubbo3成功,dubbo2调用dubbo2报错
   Caused by: java.lang.ClassNotFoundException: com.alibaba.dubbo.rpc.protocol.dubbo.DubboProtocol
   	at java.net.URLClassLoader.findClass(URLClassLoader.java:387)
   	at java.lang.ClassLoader.loadClass(ClassLoader.java:418)
   	at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:352)
   	at java.lang.ClassLoader.loadClass(ClassLoader.java:351)
   	... 82 more
   
   	at org.apache.dubbo.common.extension.ExtensionLoader.findException(ExtensionLoader.java:760) ~[dubbo-3.1.9.jar:3.1.9]
   	at org.apache.dubbo.common.extension.ExtensionLoader.createExtension(ExtensionLoader.java:767) ~[dubbo-3.1.9.jar:3.1.9]
   	at org.apache.dubbo.common.extension.ExtensionLoader.getExtension(ExtensionLoader.java:561) ~[dubbo-3.1.9.jar:3.1.9]
   	at org.apache.dubbo.common.extension.ExtensionLoader.getExtension(ExtensionLoader.java:535) ~[dubbo-3.1.9.jar:3.1.9]
   	at org.apache.dubbo.rpc.Protocol$Adaptive.refer(Protocol$Adaptive.java) ~[dubbo-3.1.9.jar:3.1.9]
   	at org.apache.dubbo.config.ReferenceConfig.createInvokerForRemote(ReferenceConfig.java:614) ~[dubbo-3.1.9.jar:3.1.9]
   	at org.apache.dubbo.config.ReferenceConfig.createProxy(ReferenceConfig.java:448) ~[dubbo-3.1.9.jar:3.1.9]
   	at org.apache.dubbo.config.ReferenceConfig.init(ReferenceConfig.java:300) ~[dubbo-3.1.9.jar:3.1.9]
   	at org.apache.dubbo.config.ReferenceConfig.get(ReferenceConfig.java:232) ~[dubbo-3.1.9.jar:3.1.9]


-- 
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] wildeslam commented on issue #12378: dubbo3(consumer)分别调用dubbo2和dubbo3(provider)关于加载扩展协议的问题

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

   > 
   
   
   
   > 看下扩展文件是不是路径不对
   
   应该不是这个问题,因为consumer这边我换成dubbo2的版本后就可以正确加载custom2协议目前定位的原因是custom2协议extend了com.alibaba的dubboProtocol


-- 
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


Re: [I] dubbo3(consumer)分别调用dubbo2和dubbo3(provider)关于加载扩展协议的问题 [dubbo]

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

   No news is good news. Please feel free to create a new issue if you have any question.


-- 
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


Re: [I] dubbo3(consumer)分别调用dubbo2和dubbo3(provider)关于加载扩展协议的问题 [dubbo]

Posted by "AlbumenJ (via GitHub)" <gi...@apache.org>.
AlbumenJ closed issue #12378: dubbo3(consumer)分别调用dubbo2和dubbo3(provider)关于加载扩展协议的问题
URL: https://github.com/apache/dubbo/issues/12378


-- 
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 #12378: dubbo3(consumer)分别调用dubbo2和dubbo3(provider)关于加载扩展协议的问题

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

   > > 
   > 
   > > 看下扩展文件是不是路径不对
   > 
   > 应该不是这个问题,因为consumer这边我换成dubbo2的版本后就可以正确加载custom2协议 目前定位的原因是custom2协议extend了com.alibaba的DubboProtocol,但是在dubbo3的jar包里com.alibaba这个路径下没有DubboProtocol 但是没有找到很好的解决方案
   
   为什么需要扩展 DubboProtocol 协议呢,建议重新确定下为什么需要这个协议


-- 
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] songxiaosheng commented on issue #12378: dubbo3(consumer)分别调用dubbo2和dubbo3(provider)关于加载扩展协议的问题

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

   看下扩展文件是不是路径不对


-- 
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