[Mondrian] Mondrian 3.3 / olap4j bug hunt

Paul Stoellberger p.stoellberger at gmail.com
Mon Apr 18 12:56:23 EDT 2011


Hello,

I have analyzed our logs of the saiku online demo from the past days and found several issues:

- 1) Olap4j-xmla changed the discovery of catalogs from using MDSCHEMA_CUBES to DBSCHEMA_SCHEMATA > bug

This caused the biserver to return both schematas (Steelwheels and SampleData) to be returned for both catalogs.
This is caused because of the SchemaHandler() vs. CatalogSchemaHandler(catalogName) in XmlaOlap4jCatalog.java 

I changed that and it seemed to return the correct results (only two schemas left instead of the duplicates and therefore 4)

I commited that already to olap4j. 
This is a major issue when working with a mondrian-xmla server + olap4j. I tried to get it in before 1.0 but there wasn't enough time 


- 2) Caused by: org.olap4j.OlapException: Unable to find a member with name [[Has coffee bar], [1]] 
The above is an example from foodmart + MondrianOlap4j
I'm using the lookup method to find specific members: Member lookupMember(List<IdentifierSegment> nameParts) throws OlapException;
For some reason this doesn't work for that member and I think thats related to the name being 1 / 0 
Not sure why this is happening... The member is definitely there!

In another query where the members of that dimension are included i also get the following exception (HSQLD + foodmart) thats why i think its related!?:

java.lang.NumberFormatException: Illegal BOOLEAN literal:  0
	at mondrian.spi.impl.JdbcDialectImpl.quoteBooleanLiteral(JdbcDialectImpl.java:371)
	at mondrian.spi.Dialect$Datatype$4.quoteValue(Dialect.java:810)
	at mondrian.spi.impl.JdbcDialectImpl.quote(JdbcDialectImpl.java:665)
	at mondrian.rolap.agg.ValueColumnPredicate.toSql(ValueColumnPredicate.java:165)
	at mondrian.rolap.RolapStar$Column.createInExpr(RolapStar.java:1340)
	at mondrian.rolap.agg.AbstractQuerySpec.nonDistinctGenerateSql(AbstractQuerySpec.java:102)
	at mondrian.rolap.agg.DrillThroughQuerySpec.generateSqlQuery(DrillThroughQuerySpec.java:132)
	at mondrian.rolap.agg.AggregationManager.getDrillThroughSql(AggregationManager.java:132)
	at mondrian.rolap.RolapCell.getDrillThroughSQL(RolapCell.java:101)
	at mondrian.rolap.RolapCell.drillThroughInternal(RolapCell.java:289)
	at mondrian.olap4j.MondrianOlap4jCell.drillThroughInternal(MondrianOlap4jCell.java:156)
	at mondrian.olap4j.MondrianOlap4jStatement.executeQuery2(MondrianOlap4jStatement.java:89)

- 3) Cast Exception
Every now and then we hit the following exception. I don't know if thats mondrian or olap4j related and therefore haven't filed a bug yet

Caused by: mondrian.olap.MondrianException: Mondrian Error:Internal error: Error while executing query [select NON EMPTY {Hierarchize({[Time].[Year].Members})} ON COLUMNS,
  NON EMPTY Crossjoin([Store].[Store Country].Members, Crossjoin([Store Type].[Store Type].Members, {[Measures].[Employee Salary]})) ON ROWS
from [HR]
]
	at mondrian.resource.MondrianResource$_Def0.ex(MondrianResource.java:892)
	at mondrian.olap.Util.newInternal(Util.java:1708)
	at mondrian.olap.Util.newError(Util.java:1724)
	at mondrian.rolap.RolapConnection.execute(RolapConnection.java:611)
	at mondrian.olap4j.MondrianOlap4jCellSet.execute(MondrianOlap4jCellSet.java:85)
	at mondrian.olap4j.MondrianOlap4jStatement.executeOlapQueryInternal(MondrianOlap4jStatement.java:355)
	at mondrian.olap4j.MondrianOlap4jStatement.executeOlapQuery(MondrianOlap4jStatement.java:321)
	at mondrian.olap4j.MondrianOlap4jStatement.executeOlapQuery(MondrianOlap4jStatement.java:368)
	at org.olap4j.query.Query.execute(Query.java:292)
	at org.saiku.olap.query.OlapQuery.execute(OlapQuery.java:154)
	at org.saiku.service.olap.OlapQueryService.execute(OlapQueryService.java:149)
	... 72 more
Caused by: java.lang.ClassCastException: mondrian.mdx.ResolvedFunCall cannot be cast to mondrian.mdx.MemberExpr
	at mondrian.rolap.sql.CrossJoinArgFactory.addConstrainingMembersToMap(CrossJoinArgFactory.java:222)
	at mondrian.rolap.sql.CrossJoinArgFactory.checkConstrainedMeasures(CrossJoinArgFactory.java:157)
	at mondrian.rolap.sql.CrossJoinArgFactory.checkCrossJoinArg(CrossJoinArgFactory.java:128)
	at mondrian.rolap.sql.CrossJoinArgFactory.checkCrossJoin(CrossJoinArgFactory.java:339)
	at mondrian.rolap.sql.CrossJoinArgFactory.checkCrossJoinArg(CrossJoinArgFactory.java:147)
	at mondrian.rolap.sql.CrossJoinArgFactory.checkCrossJoin(CrossJoinArgFactory.java:339)
	at mondrian.rolap.sql.CrossJoinArgFactory.checkCrossJoinArg(CrossJoinArgFactory.java:147)
	at mondrian.rolap.sql.CrossJoinArgFactory.buildConstraintFromAllAxes(CrossJoinArgFactory.java:51)
	at mondrian.rolap.SqlConstraintFactory.getLevelMembersConstraint(SqlConstraintFactory.java:99)
	at mondrian.rolap.RolapSchemaReader.getLevelMembers(RolapSchemaReader.java:487)
	at mondrian.olap.DelegatingSchemaReader.getLevelMembers(DelegatingSchemaReader.java:208)
	at mondrian.olap.fun.FunUtil.getNonEmptyLevelMembers(FunUtil.java:2079)
	at mondrian.olap.fun.FunUtil.levelMembers(FunUtil.java:2093)
	at mondrian.olap.fun.LevelMembersFunDef$1.evaluateList(LevelMembersFunDef.java:38)
	at mondrian.olap.fun.HierarchizeFunDef$1.evaluateList(HierarchizeFunDef.java:46)
	at mondrian.calc.impl.AbstractListCalc.evaluateIterable(AbstractListCalc.java:71)
	at mondrian.rolap.RolapResult.executeAxis(RolapResult.java:727)
	at mondrian.rolap.RolapResult.evalLoad(RolapResult.java:574)
	at mondrian.rolap.RolapResult.loadMembers(RolapResult.java:540)
	at mondrian.rolap.RolapResult.<init>(RolapResult.java:270)
	at mondrian.rolap.RolapConnection.execute(RolapConnection.java:582)
	... 79 more
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.pentaho.org/pipermail/mondrian/attachments/20110418/75f44736/attachment.html 


More information about the Mondrian mailing list