Skip to content

当 dubbo 服务进行分组时, 在服务列表界面点击会报错 #61

Closed
@huhu-sky

Description

@huhu-sky

javax.servlet.ServletException: Circular view path []: would dispatch back to the current handler URL [/governance/services/b/com.tenxcloud.example.dubbos.CityService/] again. Check your ViewResolver setup! (Hint: This may be the result of an unspecified view, due to default view name generation.)

Activity

nzomkxia

nzomkxia commented on Jul 9, 2018

@nzomkxia
Member

can you provide an URL address

soonway

soonway commented on Jul 14, 2018

@soonway

根据ServicesController这里定义的URI:/services/$service/providers
在dubbo服务分组时拿到的$service其实是包含了group的URI,但是并没有做包含group的URI映射处理。
比如group是news,则这个URL就像下面的样子
http://xxx.xxx.xxx.xxx/governance/services/news/com.xxx.xxx.facade.service.IconFacede:1.0/providers
我试着在2.5.3的war包里面运行,在服务分组的情况下也是正常的。

wangzhangxing

wangzhangxing commented on Jul 19, 2018

@wangzhangxing

me too 啊

tanyouxiang

tanyouxiang commented on Jul 19, 2018

@tanyouxiang

我也遇到了,服务分组了以后就不行.

yinghuzhu

yinghuzhu commented on Aug 2, 2018

@yinghuzhu

the root cause is that the "ServiceKey" is generated by group + "/"+interface+":"+version ; the source code located at: com/alibaba/dubbo/common/URL.java:1211

public String getServiceKey() {
        String inf = getServiceInterface();
        if (inf == null) return null;
        StringBuilder buf = new StringBuilder();
        String group = getParameter(Constants.GROUP_KEY);
        if (group != null && group.length() > 0) {
            buf.append(group).append("/");
        }
        buf.append(inf);
        String version = getParameter(Constants.VERSION_KEY);
        if (version != null && version.length() > 0) {
            buf.append(":").append(version);
        }
        return buf.toString();
    }

So, I suggest: "ServiceKey" = group + ":"+interface+":"+version

any idea ?

xllove-moon

xllove-moon commented on Sep 11, 2018

@xllove-moon

I meet this problem too!

cookerzhu

cookerzhu commented on Oct 29, 2018

@cookerzhu

The ServiceKey starts with a '/' which will conflict with the url pattern

zhaobingss

zhaobingss commented on Nov 13, 2018

@zhaobingss

这个问题有解决的办法吗?
@nzomkxia

zhuSilence

zhuSilence commented on Dec 10, 2018

@zhuSilence

The same as this error. How to solve it?

wanxx284105892

wanxx284105892 commented on Apr 26, 2020

@wanxx284105892

这个问题现在解决了吗? @nzomkxia

added a commit that references this issue on Mar 4, 2021
b86e72d
KeRan213539

KeRan213539 commented on Mar 4, 2021

@KeRan213539
Contributor

This problem has been fixed by #669.
Please feel free to reopen it if you have any question.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @yinghuzhu@nzomkxia@KeRan213539@wangzhangxing@xllove-moon

        Issue actions

          当 dubbo 服务进行分组时, 在服务列表界面点击会报错 · Issue #61 · apache/dubbo-admin