You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@dubbo.apache.org by GitBox <gi...@apache.org> on 2022/07/12 03:14:24 UTC

[GitHub] [dubbo] haoyann commented on issue #10300: provider提供hessian协议服务,consumer订阅该服务的时候,报错。

haoyann commented on issue #10300:
URL: https://github.com/apache/dubbo/issues/10300#issuecomment-1181266421

   这个项目看起来是 `3.0.0` 的应用级的服务发现与 `2.7.x` 版本的协议结合使用。 `InstanceAddressUrl#setProtocol `  确实会抛出空指针异常。
   有两个方法可以解决一下你的问题:
   1.  InstanceAddressUrl  重写 `URL#setProtocol`  方法,支持可以修改 `protocol` 属性。
   2. `url.setProtocol("http").toJavaURL()` 这部分可以手动拼接一个 `http` 协议的 `java.net.URL`。


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