You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@dubbo.apache.org by "chickenlj (GitHub)" <gi...@apache.org> on 2019/02/14 09:42:08 UTC
[GitHub] [incubator-dubbo] chickenlj opened issue #3477: NPE when
exporting rest service using a given path.
When I set `path` in ServiceConfig or `contextpath` in ProtocolConfig, RestProtocol throws NPE on this line:
https://github.com/apache/incubator-dubbo/blob/master/dubbo-rpc/dubbo-rpc-rest/src/main/java/org/apache/dubbo/rpc/protocol/rest/RestProtocol.java#L93
```java
Class implClass = ApplicationModel.getProviderModel(url.getServiceKey()).getServiceInstance().getClass();
```
<dubbo:service path="test" interface="org.apache.dubbo.samples.rest.api.facade.UserRestService" ref="userRestService"
protocol="rest" validation="true"/>
This is because we use `group/interface:version` as the key when putting ProviderModel:
```java
Application.initProviderModel(group/interface:version, providerModel)
```
but use `group/path:version` to get, as showed above.
I think to unify to `path` would solve this problem.
[ Full content available at: https://github.com/apache/incubator-dubbo/issues/3477 ]
This message was relayed via gitbox.apache.org for notifications@dubbo.apache.org
[GitHub] [incubator-dubbo] chickenlj commented on issue #3477: NPE
when exporting rest service using a given path.
Posted by "chickenlj (GitHub)" <gi...@apache.org>.
reproduce this problem with samples/dubbo-samples-rest
[ Full content available at: https://github.com/apache/incubator-dubbo/issues/3477 ]
This message was relayed via gitbox.apache.org for notifications@dubbo.apache.org
[GitHub] [incubator-dubbo] cvictory closed issue #3477: NPE when
exporting rest service using a given path.
Posted by "cvictory (GitHub)" <gi...@apache.org>.
[ issue closed by cvictory ]
[ Full content available at: https://github.com/apache/incubator-dubbo/issues/3477 ]
This message was relayed via gitbox.apache.org for notifications@dubbo.apache.org