java.lang.AssertionError

There are no available Samebug tips for this exception. Do you have an idea how to solve this issue? A short tip would help users who saw this issue last week.

  • I have pushed the test for demonstration here: https://github.com/akhayrutdinov/mondrian/commit/ae9ee9e8e165a029da78818bef0ad64a3d232e48 (https://github.com/akhayrutdinov/mondrian/tree/MONDRIAN-2440-demo) There is a custom schema copied from *SteelWheelsSchemaTest*. If aggregation tables are allowed, the query fails for Power User Union (*testMondrian2411_3_WithAggregation*). It should fail for *Power User* as well, but somehow this is not happening (I suspect there is another bug somewhere). But it can be reproduced for non-union role by simply adding a explicit restriction for above level (*testMondrian2411_3_WithAggregation_ByUser*). Here is the stacktrace: {noformat}java.lang.AssertionError at mondrian.rolap.RolapUtil.constraintBitkeyForLimitedMembers(RolapUtil.java:675) at mondrian.rolap.SqlTupleReader.chooseAggStar(SqlTupleReader.java:1465) at mondrian.rolap.SqlTupleReader.generateSelectForLevels(SqlTupleReader.java:931) at mondrian.rolap.SqlTupleReader.makeLevelMembersSql(SqlTupleReader.java:863) at mondrian.rolap.SqlTupleReader.prepareTuples(SqlTupleReader.java:405) at mondrian.rolap.SqlTupleReader.readMembers(SqlTupleReader.java:530) at mondrian.rolap.RolapNativeSet$SetEvaluator.executeList(RolapNativeSet.java:261) at mondrian.rolap.RolapNativeSet$SetEvaluator.execute(RolapNativeSet.java:195) at mondrian.olap.fun.FilterFunDef$BaseIterCalc.evaluateIterable(FilterFunDef.java:118) at mondrian.calc.impl.AbstractIterCalc.evaluate(AbstractIterCalc.java:50) at mondrian.rolap.RolapResult.evaluateExp(RolapResult.java:1089) at mondrian.rolap.RolapNamedSetEvaluator.ensureList(RolapNamedSetEvaluator.java:98) at mondrian.rolap.RolapNamedSetEvaluator.evaluateTupleIterable(RolapNamedSetEvaluator.java:66) at mondrian.mdx.NamedSetExpr$1.evaluateIterable(NamedSetExpr.java:98) at mondrian.calc.impl.AbstractIterCalc.evaluate(AbstractIterCalc.java:50) at mondrian.rolap.RolapResult.evaluateExp(RolapResult.java:1089) at mondrian.rolap.RolapNamedSetEvaluator.ensureList(RolapNamedSetEvaluator.java:98) at mondrian.rolap.RolapNamedSetEvaluator.evaluateTupleIterable(RolapNamedSetEvaluator.java:66) at mondrian.mdx.NamedSetExpr$1.evaluateIterable(NamedSetExpr.java:98) at mondrian.olap.fun.GenerateFunDef$GenerateListCalcImpl.evaluateList(GenerateFunDef.java:112) at mondrian.calc.impl.AbstractListCalc.evaluate(AbstractListCalc.java:65) at mondrian.rolap.RolapResult.evaluateExp(RolapResult.java:1089) at mondrian.rolap.RolapNamedSetEvaluator.ensureList(RolapNamedSetEvaluator.java:98) at mondrian.rolap.RolapNamedSetEvaluator.evaluateTupleIterable(RolapNamedSetEvaluator.java:66) at mondrian.mdx.NamedSetExpr$1.evaluateIterable(NamedSetExpr.java:98) at mondrian.olap.fun.OrderFunDef$CalcImpl.evaluateList(OrderFunDef.java:202) at mondrian.calc.impl.AbstractListCalc.evaluate(AbstractListCalc.java:65) at mondrian.rolap.RolapResult.evaluateExp(RolapResult.java:1089) at mondrian.rolap.RolapNamedSetEvaluator.ensureList(RolapNamedSetEvaluator.java:98) at mondrian.rolap.RolapNamedSetEvaluator.evaluateTupleIterable(RolapNamedSetEvaluator.java:66) at mondrian.mdx.NamedSetExpr$1.evaluateIterable(NamedSetExpr.java:98) at mondrian.rolap.RolapResult.executeAxis(RolapResult.java:976) at mondrian.rolap.RolapResult.evalLoad(RolapResult.java:801) at mondrian.rolap.RolapResult.loadMembers(RolapResult.java:757) at mondrian.rolap.RolapResult.<init>(RolapResult.java:401) at mondrian.rolap.RolapConnection.executeInternal(RolapConnection.java:672) at mondrian.rolap.RolapConnection.access$000(RolapConnection.java:52) at mondrian.rolap.RolapConnection$1.call(RolapConnection.java:623) at mondrian.rolap.RolapConnection$1.call(RolapConnection.java:621){noformat} I have investigated the case a bit. The used hierarchy *"Customer_DimUsage.Customers Hierarchy"* has three levels: # All # Address # Name The restriction allows to see only members of Name level. In FunUtil.getNonEmptyMemberChildrenWithDetails(), the All-member is used to get its children. Since there are some restrictions, the used SchemaReader instance filters returned values. Namely, it internally get all 123 members of *"Customer_DimUsage.Customers Hierarchy"."Address"*, but rejects all of them. That is why an empty map is returned, and the Exception occurs.
    via by Andrey Khayrutdinov,
  • I have pushed the test for demonstration here: https://github.com/akhayrutdinov/mondrian/commit/ae9ee9e8e165a029da78818bef0ad64a3d232e48 (https://github.com/akhayrutdinov/mondrian/tree/MONDRIAN-2440-demo) There is a custom schema copied from *SteelWheelsSchemaTest*. If aggregation tables are allowed, the query fails for Power User Union (*testMondrian2411_3_WithAggregation*). It should fail for *Power User* as well, but somehow this is not happening (I suspect there is another bug somewhere). But it can be reproduced for non-union role by simply adding a explicit restriction for above level (*testMondrian2411_3_WithAggregation_ByUser*). Here is the stacktrace: {noformat}java.lang.AssertionError at mondrian.rolap.RolapUtil.constraintBitkeyForLimitedMembers(RolapUtil.java:675) at mondrian.rolap.SqlTupleReader.chooseAggStar(SqlTupleReader.java:1465) at mondrian.rolap.SqlTupleReader.generateSelectForLevels(SqlTupleReader.java:931) at mondrian.rolap.SqlTupleReader.makeLevelMembersSql(SqlTupleReader.java:863) at mondrian.rolap.SqlTupleReader.prepareTuples(SqlTupleReader.java:405) at mondrian.rolap.SqlTupleReader.readMembers(SqlTupleReader.java:530) at mondrian.rolap.RolapNativeSet$SetEvaluator.executeList(RolapNativeSet.java:261) at mondrian.rolap.RolapNativeSet$SetEvaluator.execute(RolapNativeSet.java:195) at mondrian.olap.fun.FilterFunDef$BaseIterCalc.evaluateIterable(FilterFunDef.java:118) at mondrian.calc.impl.AbstractIterCalc.evaluate(AbstractIterCalc.java:50) at mondrian.rolap.RolapResult.evaluateExp(RolapResult.java:1089) at mondrian.rolap.RolapNamedSetEvaluator.ensureList(RolapNamedSetEvaluator.java:98) at mondrian.rolap.RolapNamedSetEvaluator.evaluateTupleIterable(RolapNamedSetEvaluator.java:66) at mondrian.mdx.NamedSetExpr$1.evaluateIterable(NamedSetExpr.java:98) at mondrian.calc.impl.AbstractIterCalc.evaluate(AbstractIterCalc.java:50) at mondrian.rolap.RolapResult.evaluateExp(RolapResult.java:1089) at mondrian.rolap.RolapNamedSetEvaluator.ensureList(RolapNamedSetEvaluator.java:98) at mondrian.rolap.RolapNamedSetEvaluator.evaluateTupleIterable(RolapNamedSetEvaluator.java:66) at mondrian.mdx.NamedSetExpr$1.evaluateIterable(NamedSetExpr.java:98) at mondrian.olap.fun.GenerateFunDef$GenerateListCalcImpl.evaluateList(GenerateFunDef.java:112) at mondrian.calc.impl.AbstractListCalc.evaluate(AbstractListCalc.java:65) at mondrian.rolap.RolapResult.evaluateExp(RolapResult.java:1089) at mondrian.rolap.RolapNamedSetEvaluator.ensureList(RolapNamedSetEvaluator.java:98) at mondrian.rolap.RolapNamedSetEvaluator.evaluateTupleIterable(RolapNamedSetEvaluator.java:66) at mondrian.mdx.NamedSetExpr$1.evaluateIterable(NamedSetExpr.java:98) at mondrian.olap.fun.OrderFunDef$CalcImpl.evaluateList(OrderFunDef.java:202) at mondrian.calc.impl.AbstractListCalc.evaluate(AbstractListCalc.java:65) at mondrian.rolap.RolapResult.evaluateExp(RolapResult.java:1089) at mondrian.rolap.RolapNamedSetEvaluator.ensureList(RolapNamedSetEvaluator.java:98) at mondrian.rolap.RolapNamedSetEvaluator.evaluateTupleIterable(RolapNamedSetEvaluator.java:66) at mondrian.mdx.NamedSetExpr$1.evaluateIterable(NamedSetExpr.java:98) at mondrian.rolap.RolapResult.executeAxis(RolapResult.java:976) at mondrian.rolap.RolapResult.evalLoad(RolapResult.java:801) at mondrian.rolap.RolapResult.loadMembers(RolapResult.java:757) at mondrian.rolap.RolapResult.<init>(RolapResult.java:401) at mondrian.rolap.RolapConnection.executeInternal(RolapConnection.java:672) at mondrian.rolap.RolapConnection.access$000(RolapConnection.java:52) at mondrian.rolap.RolapConnection$1.call(RolapConnection.java:623) at mondrian.rolap.RolapConnection$1.call(RolapConnection.java:621){noformat} I have investigated the case a bit. The used hierarchy *"Customer_DimUsage.Customers Hierarchy"* has three levels: # All # Address # Name The restriction allows to see only members of Name level. In FunUtil.getNonEmptyMemberChildrenWithDetails(), the All-member is used to get its children. Since there are some restrictions, the used SchemaReader instance filters returned values. Namely, it internally get all 123 members of *"Customer_DimUsage.Customers Hierarchy"."Address"*, but rejects all of them. That is why an empty map is returned, and the Exception occurs.
    via by Andrey Khayrutdinov,
    • java.lang.AssertionError at mondrian.rolap.RolapUtil.constraintBitkeyForLimitedMembers(RolapUtil.java:675) at mondrian.rolap.SqlTupleReader.chooseAggStar(SqlTupleReader.java:1465) at mondrian.rolap.SqlTupleReader.generateSelectForLevels(SqlTupleReader.java:931) at mondrian.rolap.SqlTupleReader.makeLevelMembersSql(SqlTupleReader.java:863) at mondrian.rolap.SqlTupleReader.prepareTuples(SqlTupleReader.java:405) at mondrian.rolap.SqlTupleReader.readMembers(SqlTupleReader.java:530) at mondrian.rolap.RolapNativeSet$SetEvaluator.executeList(RolapNativeSet.java:261) at mondrian.rolap.RolapNativeSet$SetEvaluator.execute(RolapNativeSet.java:195) at mondrian.olap.fun.FilterFunDef$BaseIterCalc.evaluateIterable(FilterFunDef.java:118) at mondrian.calc.impl.AbstractIterCalc.evaluate(AbstractIterCalc.java:50) at mondrian.rolap.RolapResult.evaluateExp(RolapResult.java:1089) at mondrian.rolap.RolapNamedSetEvaluator.ensureList(RolapNamedSetEvaluator.java:98) at mondrian.rolap.RolapNamedSetEvaluator.evaluateTupleIterable(RolapNamedSetEvaluator.java:66) at mondrian.mdx.NamedSetExpr$1.evaluateIterable(NamedSetExpr.java:98) at mondrian.calc.impl.AbstractIterCalc.evaluate(AbstractIterCalc.java:50) at mondrian.rolap.RolapResult.evaluateExp(RolapResult.java:1089) at mondrian.rolap.RolapNamedSetEvaluator.ensureList(RolapNamedSetEvaluator.java:98) at mondrian.rolap.RolapNamedSetEvaluator.evaluateTupleIterable(RolapNamedSetEvaluator.java:66) at mondrian.mdx.NamedSetExpr$1.evaluateIterable(NamedSetExpr.java:98) at mondrian.olap.fun.GenerateFunDef$GenerateListCalcImpl.evaluateList(GenerateFunDef.java:112) at mondrian.calc.impl.AbstractListCalc.evaluate(AbstractListCalc.java:65) at mondrian.rolap.RolapResult.evaluateExp(RolapResult.java:1089) at mondrian.rolap.RolapNamedSetEvaluator.ensureList(RolapNamedSetEvaluator.java:98) at mondrian.rolap.RolapNamedSetEvaluator.evaluateTupleIterable(RolapNamedSetEvaluator.java:66) at mondrian.mdx.NamedSetExpr$1.evaluateIterable(NamedSetExpr.java:98) at mondrian.olap.fun.OrderFunDef$CalcImpl.evaluateList(OrderFunDef.java:202) at mondrian.calc.impl.AbstractListCalc.evaluate(AbstractListCalc.java:65) at mondrian.rolap.RolapResult.evaluateExp(RolapResult.java:1089) at mondrian.rolap.RolapNamedSetEvaluator.ensureList(RolapNamedSetEvaluator.java:98) at mondrian.rolap.RolapNamedSetEvaluator.evaluateTupleIterable(RolapNamedSetEvaluator.java:66) at mondrian.mdx.NamedSetExpr$1.evaluateIterable(NamedSetExpr.java:98) at mondrian.rolap.RolapResult.executeAxis(RolapResult.java:976) at mondrian.rolap.RolapResult.evalLoad(RolapResult.java:801) at mondrian.rolap.RolapResult.loadMembers(RolapResult.java:757) at mondrian.rolap.RolapResult.<init>(RolapResult.java:401) at mondrian.rolap.RolapConnection.executeInternal(RolapConnection.java:672) at mondrian.rolap.RolapConnection.access$000(RolapConnection.java:52) at mondrian.rolap.RolapConnection$1.call(RolapConnection.java:623)
    No Bugmate found.