I have a problem with mondrian dynamic roles.
I cannot use roles statically defined in the xml schema definition file, I must use dynamic roles.
After using the mondrianQuery JPivot tag in my jsp, I make something like this:
OlapModel query11 = (OlapModel)session.getAttribute("query11");
MondrianMdxQuery mdxQuery1 = (MondrianMdxQuery) query11.getExtensions().get("mdxQuery");
MondrianModel mm = (MondrianModel) mdxQuery1.getModel();
RoleImpl connRole = (RoleImpl)mm.getConnection().getRole();
Cube promoCube = mm.getConnection().getSchema().lookupCube("AttachRate", true);
Hierarchy aHierarchy = promoCube.lookupHierarchy(new Id.Segment("Region", Id.Quoting.UNQUOTED), false);
Dimension clientDim = aHierarchy.getDimension();
Member defaultMember = clientDim.getSchema().getSchemaReader().getHierarchyDefaultMember(aHierarchy);
Member aMember = clientDim.getSchema().getSchemaReader().getMemberChildren(defaultMember);
connRole.grant(aHierarchy, Access.CUSTOM, null, null, null);
But it gives me an error: Mondrian Error:Internal error: assert failed: isMutable()
Am I making something wrong?
What should be the best way to set a dynamic role in jpivot - mondrian?
if anybody could send example code at my email email@example.com it would be really great
Thanks for any suggestion.
Log in to post a comment.
Sign up for the SourceForge newsletter:
You seem to have CSS turned off.
Please don't fill out this field.