Hi, I've run into a strange error, and am a bit stuck. I have
calculated Members in my Measure-s and others in various heirarchies.
Not usually a problem, but the server is throwing an npe at
AggregateFunDef.dimensionJoinsToBaseCube(), which I have traced back
to the evaluator of the
query in question returning NULL for its getMeasureCube().

public RolapCube getMeasureCube() {
final RolapMember measure = currentMembers[0];
if (measure instanceof RolapStoredMeasure) {
return ((RolapStoredMeasure) measure).getCube();
return null;

now here the currentMembers[0] happens to be my CalculatedMember and
since that isn't a RolapStoredMeasure (rather a
RolapHierarchy$RolapCalculatedMeasure), I get null and then an NPE.

Any idea/suggestions on how to get around this? My only idea is to
change the src to add something like

if (measure instanceof RolapHierarchy.RolapCalculatedMeasure){

but thats quite an ugly hack.... and I don't know if it would work
in all cases....

Mondrian mailing list
Mondrian (AT) pentaho (DOT) org