[Mondrian] Null pointer exception in SqlConstraintUtils
Franco Graziosi
fg123 at fga-software.com
Mon Jul 20 05:00:36 EDT 2009
Hi,
Using Mondrian I faced from time to time two null pointer exceptions
generated
from mondrian.rolap.SqlConstraintUtils class.
First one is @ line 633:
if (level instanceof RolapCubeLevel) {
column = ((RolapCubeLevel)level).getBaseStarKeyColumn(baseCube);
}
base cube is null from time to time.
I fixed it this way:
if (level instanceof RolapCubeLevel && baseCube != null) {
column = ((RolapCubeLevel)level).getBaseStarKeyColumn(baseCube);
}
Second one is analogous at line 910:
if (level instanceof RolapCubeLevel) {
column =
((RolapCubeLevel)level).getBaseStarKeyColumn(baseCube);
}
Fixed as:
if (level instanceof RolapCubeLevel && baseCube != null) {
column =
((RolapCubeLevel)level).getBaseStarKeyColumn(baseCube);
}
I can't exactly understand why n=but sometime those functions were
called with a null cube
as parameter. After making this change I never got those runtime
exception again.
Can this change be incorporated in future Mondian versions?
Thanks very much to Mondrian developers for the excellent product!
fg
More information about the Mondrian
mailing list