[Mondrian] Problems with Pentaho role mapping and Saiku

William Back wback at pentaho.com
Sun Dec 9 19:09:12 EST 2012


All,

I'm having a problem with role mapping and saiku.  I'm using Pentaho 4.5 and saiku 2.5.  I'm also using Mondrian 4.0, but the problem only occurs when using role mapping, otherwise everything works fine.

When I turn on the 1-to-1 role mapper in pentahoObjects.spring.xml, the saiku plug-in fails to load with the following root exception:

Caused by: java.lang.NoSuchFieldError: cubes
       at org.pentaho.platform.plugin.action.mondrian.catalog.MondrianCatalogHelper.makeSchema(MondrianCatalogHelper.java:762)
       at org.pentaho.platform.plugin.action.mondrian.catalog.MondrianCatalogHelper.loadCatalogsIntoCache(MondrianCatalogHelper.java:638)
       at org.pentaho.platform.plugin.action.mondrian.catalog.MondrianCatalogHelper.init(MondrianCatalogHelper.java:226)
       at org.pentaho.platform.plugin.action.mondrian.catalog.MondrianCatalogHelper.getCatalog(MondrianCatalogHelper.java:584)
       at org.pentaho.platform.plugin.action.mondrian.mapper.MondrianAbstractPlatformUserRoleMapper.getMondrianRolesFromCatalog(MondrianAbstractPlatformUserRoleMapper.java:70)
       at org.pentaho.platform.plugin.action.mondrian.mapper.MondrianAbstractPlatformUserRoleMapper.mapConnectionRoles(MondrianAbstractPlatformUserRoleMapper.java:120)
       at org.saiku.plugin.PentahoSecurityAwareConnectionManager.applySecurity(PentahoSecurityAwareConnectionManager.java:131)
       at org.saiku.plugin.PentahoSecurityAwareConnectionManager.getInternalConnection(PentahoSecurityAwareConnectionManager.java:88)
       at org.saiku.datasources.connection.AbstractConnectionManager.getConnection(AbstractConnectionManager.java:93)
       at org.saiku.datasources.connection.AbstractConnectionManager.getAllConnections(AbstractConnectionManager.java:119)
       at org.saiku.plugin.PentahoSecurityAwareConnectionManager.init(PentahoSecurityAwareConnectionManager.java:51)
       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
       at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
       at java.lang.reflect.Method.invoke(Method.java:597)
       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeCustomInitMethod(AbstractAutowireCapableBeanFactory.java:1414)
       at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1375)

Looking at the code (possibly different version) I see the following section in MondrianCatalogHelper::makeSchema:

     for (MondrianDef.Cube cube : schemaFromXml.cubes) {
       if (cube.enabled == null || cube.enabled.booleanValue()) {
         String name = cube.caption;
         if (StringUtils.isBlank(name)) {
           name = cube.name;
         }
         mondrianCubes.add(new MondrianCube(name, cube.name));
       }
     }

I get the failure whether or not I have a Role defined in the schema, so it appears to be related to just turning on role mapping.  The role definition is:

 <Role name="Authenticated">
   <SchemaGrant access="none">
     <CubeGrant cube="Internet Sales" access="all">
       <HierarchyGrant hierarchy="[Customer Geography].[Geography]" access="custom" rollupPolicy="partial">
         <MemberGrant member="[Customer Geography].[Geography].[Country].[US]" access="none"/>
         <MemberGrant member="[Customer Geography].[Geography].[State].[California]" access="none"/>
       </HierarchyGrant>
       <HierarchyGrant hierarchy="[Customer].[Gender]" access="custom" rollupPolicy="partial">
         <MemberGrant member="[Customer].[Gender].[Male]" access="none"/>
       </HierarchyGrant>
     </CubeGrant>
   </SchemaGrant>
 </Role>

Any suggestions on a fix or good troubleshooting strategy?

Thanks,

Bill



More information about the Mondrian mailing list