java.lang.AssertionError

Pentaho BI Platform Tracking | Andrey Khayrutdinov | 1 year ago
tip
Your exception is missing from the Samebug knowledge base.
Here are the best solutions we found on the Internet.
Click on the to mark the helpful solution and get rewards for you help.
  1. 0

    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.

    Pentaho BI Platform Tracking | 1 year ago | Andrey Khayrutdinov
    java.lang.AssertionError
  2. 0

    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.

    Pentaho BI Platform Tracking | 1 year ago | Andrey Khayrutdinov
    java.lang.AssertionError

    Root Cause Analysis

    1. java.lang.AssertionError

      No message provided

      at mondrian.rolap.RolapUtil.constraintBitkeyForLimitedMembers()
    2. mondrian.rolap
      RolapNativeSet$SetEvaluator.execute
      1. mondrian.rolap.RolapUtil.constraintBitkeyForLimitedMembers(RolapUtil.java:675)
      2. mondrian.rolap.SqlTupleReader.chooseAggStar(SqlTupleReader.java:1465)
      3. mondrian.rolap.SqlTupleReader.generateSelectForLevels(SqlTupleReader.java:931)
      4. mondrian.rolap.SqlTupleReader.makeLevelMembersSql(SqlTupleReader.java:863)
      5. mondrian.rolap.SqlTupleReader.prepareTuples(SqlTupleReader.java:405)
      6. mondrian.rolap.SqlTupleReader.readMembers(SqlTupleReader.java:530)
      7. mondrian.rolap.RolapNativeSet$SetEvaluator.executeList(RolapNativeSet.java:261)
      8. mondrian.rolap.RolapNativeSet$SetEvaluator.execute(RolapNativeSet.java:195)
      8 frames
    3. mondrian.olap.fun
      FilterFunDef$BaseIterCalc.evaluateIterable
      1. mondrian.olap.fun.FilterFunDef$BaseIterCalc.evaluateIterable(FilterFunDef.java:118)
      1 frame
    4. mondrian.calc.impl
      AbstractIterCalc.evaluate
      1. mondrian.calc.impl.AbstractIterCalc.evaluate(AbstractIterCalc.java:50)
      1 frame
    5. mondrian.rolap
      RolapNamedSetEvaluator.evaluateTupleIterable
      1. mondrian.rolap.RolapResult.evaluateExp(RolapResult.java:1089)
      2. mondrian.rolap.RolapNamedSetEvaluator.ensureList(RolapNamedSetEvaluator.java:98)
      3. mondrian.rolap.RolapNamedSetEvaluator.evaluateTupleIterable(RolapNamedSetEvaluator.java:66)
      3 frames
    6. mondrian.mdx
      NamedSetExpr$1.evaluateIterable
      1. mondrian.mdx.NamedSetExpr$1.evaluateIterable(NamedSetExpr.java:98)
      1 frame
    7. mondrian.calc.impl
      AbstractIterCalc.evaluate
      1. mondrian.calc.impl.AbstractIterCalc.evaluate(AbstractIterCalc.java:50)
      1 frame
    8. mondrian.rolap
      RolapNamedSetEvaluator.evaluateTupleIterable
      1. mondrian.rolap.RolapResult.evaluateExp(RolapResult.java:1089)
      2. mondrian.rolap.RolapNamedSetEvaluator.ensureList(RolapNamedSetEvaluator.java:98)
      3. mondrian.rolap.RolapNamedSetEvaluator.evaluateTupleIterable(RolapNamedSetEvaluator.java:66)
      3 frames
    9. mondrian.mdx
      NamedSetExpr$1.evaluateIterable
      1. mondrian.mdx.NamedSetExpr$1.evaluateIterable(NamedSetExpr.java:98)
      1 frame
    10. mondrian.olap.fun
      GenerateFunDef$GenerateListCalcImpl.evaluateList
      1. mondrian.olap.fun.GenerateFunDef$GenerateListCalcImpl.evaluateList(GenerateFunDef.java:112)
      1 frame
    11. mondrian.calc.impl
      AbstractListCalc.evaluate
      1. mondrian.calc.impl.AbstractListCalc.evaluate(AbstractListCalc.java:65)
      1 frame
    12. mondrian.rolap
      RolapNamedSetEvaluator.evaluateTupleIterable
      1. mondrian.rolap.RolapResult.evaluateExp(RolapResult.java:1089)
      2. mondrian.rolap.RolapNamedSetEvaluator.ensureList(RolapNamedSetEvaluator.java:98)
      3. mondrian.rolap.RolapNamedSetEvaluator.evaluateTupleIterable(RolapNamedSetEvaluator.java:66)
      3 frames
    13. mondrian.mdx
      NamedSetExpr$1.evaluateIterable
      1. mondrian.mdx.NamedSetExpr$1.evaluateIterable(NamedSetExpr.java:98)
      1 frame
    14. mondrian.olap.fun
      OrderFunDef$CalcImpl.evaluateList
      1. mondrian.olap.fun.OrderFunDef$CalcImpl.evaluateList(OrderFunDef.java:202)
      1 frame
    15. mondrian.calc.impl
      AbstractListCalc.evaluate
      1. mondrian.calc.impl.AbstractListCalc.evaluate(AbstractListCalc.java:65)
      1 frame
    16. mondrian.rolap
      RolapNamedSetEvaluator.evaluateTupleIterable
      1. mondrian.rolap.RolapResult.evaluateExp(RolapResult.java:1089)
      2. mondrian.rolap.RolapNamedSetEvaluator.ensureList(RolapNamedSetEvaluator.java:98)
      3. mondrian.rolap.RolapNamedSetEvaluator.evaluateTupleIterable(RolapNamedSetEvaluator.java:66)
      3 frames
    17. mondrian.mdx
      NamedSetExpr$1.evaluateIterable
      1. mondrian.mdx.NamedSetExpr$1.evaluateIterable(NamedSetExpr.java:98)
      1 frame
    18. mondrian.rolap
      RolapConnection$1.call
      1. mondrian.rolap.RolapResult.executeAxis(RolapResult.java:976)
      2. mondrian.rolap.RolapResult.evalLoad(RolapResult.java:801)
      3. mondrian.rolap.RolapResult.loadMembers(RolapResult.java:757)
      4. mondrian.rolap.RolapResult.<init>(RolapResult.java:401)
      5. mondrian.rolap.RolapConnection.executeInternal(RolapConnection.java:672)
      6. mondrian.rolap.RolapConnection.access$000(RolapConnection.java:52)
      7. mondrian.rolap.RolapConnection$1.call(RolapConnection.java:623)
      7 frames