Hitachi Vantara Pentaho Community Forums
Results 1 to 3 of 3

Thread: Dynamic Role Modification: can't compile

  1. #1

    Default Dynamic Role Modification: can't compile

    Hello Forum,

    I'm trying to follow advice from the Manning book "Mondrian in Action", in order to provide some access control to data in my cubes.
    After trying Dynamic Schema Processor (and not being able to solve problems with caching) I'm trying to use Dynamic Role Modification, but I can't compile the sample (downloaded the fixed version) of Listing 8.7 in the book.
    Here is the code I'm trying to compile (the only difference with the sample from the book is the name of the custom role):


    import mondrian.olap.*;

    public class CustomMDXConnection extends MDXConnection {

    protected void init (Util.PropertyList properties) {
    System.out.println("CustomMDXConnection: Setting the connection to restrict on Supervisor.");
    System.out.println("\tusing this instead of super");
    Connection thisConn = this.getConnection();
    if (thisConn != null) {
    Role authRole = thisConn.getSchema().lookupRole("Office Supervisor");

    if (authRole != null) {
    System.out.println("\tAssigning custom role.");
    CustomRoleDelegate customRole = new CustomRoleDelegate(authRole);

    else {
    System.out.println("\tMDX connection is NULL!!");

    I'm getting the error "The hierarchy of the type CustomMDXConnection is inconsistent".

    In my eclipse project, I'm referencing mondrian-3.5.0.jar, pentaho-bi-platform-plugin-services-4.8.0-stable.jar, pentaho-bi-platform-engine-core-4.8.0-stable.jar and pentaho-bi-platform-api-4.8.0-stable.jar and I'm working with jre7.

    Did anyone stumble into similar problems?
    What am I doing wrong?


  2. #2


    Tried to install and use jre6, but no changes.
    Tried to delete everything but the class declaration

    public class CustomMDXConnection extends MDXConnection {

    and still have the same error.
    Any hints?


  3. #3



    I added pentaho-connections-2.2.3.jar to the build path.


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 - 2017 Pentaho Corporation. All Rights Reserved.