Hitachi Vantara Pentaho Community Forums
Results 1 to 5 of 5

Thread: Multiple Roles

  1. #1

    Default Multiple Roles

    According to the Mondrian docs (http://mondrian.pentaho.org/document...nnections_role), you can pass in a comma-separated list of Roles and Mondrian will apply the union of them. I can't get this to work from JPivot. I set the role in the <jp:MondrianQuery tag to "ACMEINC,FIDOINC" and Mondrian comes back with an error that role "ACMEINC,FIDOINC" does not exist. I'm using Mondrian 2.4.2.9831.

  2. #2

    Default

    Think I've got it mostly fixed. Seems multiple role support was added in 3.0. Now I'm getting an NPE when trying to union the two roles:


    java.lang.NullPointerException
    at mondrian.olap.RoleImpl$HierarchyAccessImpl.getAccess(RoleImpl.java:490)
    at mondrian.olap.UnionRoleImpl$UnionHierarchyAccessImpl.hasInaccessibleDescendants(UnionRoleImpl.java:216)
    at mondrian.rolap.RolapHierarchy$LimitedRollupSubstitutingMemberReader.substitute(RolapHierarchy.java:938)
    at mondrian.rolap.SubstitutingMemberReader.getMemberParent(SubstitutingMemberReader.java:183)
    at mondrian.rolap.RolapSchemaReader.getMemberParent(RolapSchemaReader.java:111)

  3. #3

    Default

    Here is my role config. The union role does not work, gives the previously mentioned NPE.


    <Role name="ACME">
    <SchemaGrant access="none">
    <CubeGrant cube="Flash" access="all">
    <HierarchyGrant
    hierarchy="[Customer]"
    access="custom"
    topLevel="[Customer].[Customer Name]"
    rollupPolicy="partial"
    >
    <MemberGrant member="[Customer].[LSG].[ACME CORPORATION]" access="all" />
    </HierarchyGrant>
    </CubeGrant>
    </SchemaGrant>
    </Role>

    <Role name="ABLE">
    <SchemaGrant access="none">
    <CubeGrant cube="Flash" access="all">
    <HierarchyGrant
    hierarchy="[Customer]"
    access="custom"
    topLevel="[Customer].[Customer Name]"
    rollupPolicy="partial"
    >
    <MemberGrant member="[Customer].[LSG].[ABLE TECH]" access="all" />
    </HierarchyGrant>
    </CubeGrant>
    </SchemaGrant>
    </Role>

    <Role name="ABLEACME">
    <Union>
    <RoleUsage roleName="ACME" />
    <RoleUsage roleName="ABLE" />
    </Union>
    </Role>

  4. #4
    Join Date
    Nov 1999
    Posts
    1,618

    Default

    From reading the code, the likely cause of the NPE is that the member doesn't exist. Obviously our error reporting should be better, but check the spelling of the members [Customer].[LSG].[ACME CORPORATION] and [Customer].[LSG].[ABLE TECH] to see whether that is indeed the problem. Let me know what you find.

    Julian

  5. #5

    Default

    Turned out my problem was the rollupPolicy on the HierarchyGrant. I removed it altogether and it works.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Privacy Policy | Legal Notices | Safe Harbor Privacy Policy

Copyright © 2005 - 2019 Hitachi Vantara Corporation. All Rights Reserved.