[Mondrian] RE: [ 1661288 ] NullPointerException in CellRequest.getSingleValues

Julian Hyde julianhyde at speakeasy.net
Tue Mar 27 13:32:39 EDT 2007


The 'isUnsatisfiable()' check seems to be the right approach. Is it
possible to do that logic without repeating a lot of computation? This
code is performance critical.

There is no need to make this easier to use for an end-user.
getSingleValues should only be called by mondrian internals. For that
reason, an assert is probably better than a MondrianException.

Because this code is internal, the only use case you need to worry about
is a particular MDX query. Note that SchemaTest has some examples of
tests which run MDX queries on slightly modified schemas. Using that
infrastructure, you should be able to write a unit test containing MDX
query which reliably fails.

Julian

http://sourceforge.net/tracker/index.php?func=detail&aid=1661288&group_i
d=35302&atid=414613

> -----Original Message-----
> From: Will Gorman [mailto:wgorman at pentaho.org] 
> Sent: Tuesday, March 27, 2007 8:34 AM
> To: Julian Hyde
> Subject: [ 1661288 ] NullPointerException in 
> CellRequest.getSingleValues
> 
> Julian,
> 
> [ 1661288 ] NullPointerException in CellRequest.getSingleValues
> 
> In digging into this issue, the problem seems to be that the cell
> request is unsatisfiable.  This causes a null item to be placed in the
> cell request's value list.  getSingleValues assumes that there are no
> nulls.  By adding an isUnsatisfiable() check in the
> RolapAggregationManager, who makes the call to 
> getSingleValues, the null
> pointer is no longer happening.  In addition to that check, I 
> could also
> throw a mondrian exception if getSingleValues is called when 
> the request
> is unsatisfiable, so in the future people know what is going 
> on quicker.
> What do you think?
> 
> Thanks!
> 
> Will
> 
> 




More information about the Mondrian mailing list