Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] when user assign a group to a dataset, report the Internal Error. #8

Open
Mukvin opened this issue Jun 15, 2022 · 2 comments
Open
Assignees
Labels
Bug Report Something isn't working

Comments

@Mukvin
Copy link
Contributor

Mukvin commented Jun 15, 2022

Describe the bug
Assign a group to a dataset throws error:

[MDX-00000001] Internal Error, com.alibaba.fastjson.JSONArray cannot be cast to com.alibaba.fastjson.JSONObject
java.lang.ClassCastException: com.alibaba.fastjson.JSONArray cannot be cast to com.alibaba.fastjson.JSONObject
 at com.alibaba.fastjson.JSONObject.getJSONObject(JSONObject.java:140)
 at io.kylin.mdx.insight.core.meta.acl.KylinAclConvertor.hasTablePermissionByGroup(KylinAclConvertor.java:125)
 at io.kylin.mdx.insight.core.meta.acl.KylinAclConvertor.generateAclByGroup(KylinAclConvertor.java:69)
 at io.kylin.mdx.insight.core.meta.acl.KylinAclConvertor.getAclProjectModel(KylinAclConvertor.java:57)
 at io.kylin.mdx.insight.core.meta.KylinConvertor.getAclProjectModel(KylinConvertor.java:539)
 at io.kylin.mdx.insight.core.meta.SemanticAdapter.getAclModel(SemanticAdapter.java:155)
 at io.kylin.mdx.insight.server.facade.AclFacade.preparePermission(AclFacade.java:53)
 at io.kylin.mdx.insight.server.controller.AclController.getAcl(AclController.java:62)
 at io.kylin.mdx.insight.server.controller.AclController$$FastClassBySpringCGLIB$$812005c9.invoke(<generated>)
 at org.springframework.cglib.proxy.MethodProxy.invoke(MethodProxy.java:218)
 at org.springframework.aop.framework.CglibAopProxy$CglibMethodInvocation.invokeJoinpoint(CglibAopProxy.java:771)
 at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:163)
...

Expected behavior
add group successfully without any error.

Screenshots
If applicable, add screenshots to help explain your problem.
image
image
image
image
Additional context
Add any other context about the problem here.

@Mukvin Mukvin added the Bug Report Something isn't working label Jun 15, 2022
@Mukvin Mukvin self-assigned this Jun 15, 2022
@Mukvin
Copy link
Contributor Author

Mukvin commented Jun 15, 2022

root cause

io/kylin/mdx/insight/core/meta/acl/KylinAclConvertor.java:125

result.getJSONObject("data") can not be cast.

      JSONArray groupList = result.getJSONObject("data").getJSONArray("group");

need to change to as followed:

    JSONArray groupList = result.getJSONArray("data");

@Mukvin
Copy link
Contributor Author

Mukvin commented Jun 15, 2022

Solution

replace the jar in $MDX_HOME/semantic-mdx/semantic-service.jar

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Report Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant