Pentaho Analysis - Mondrian
  1. Pentaho Analysis - Mondrian
  2. MONDRIAN-628

ClassCastException in Mondrian for attached query using Sales Ragged cube

    Details

      Description

      This query results in a class cast exception in RolapCubeMember:

       With
       Set [*NATIVE_CJ_SET] as '[*BASE_MEMBERS_Geography]'
       Set [*SORTED_ROW_AXIS] as 'Order([*CJ_ROW_AXIS],Ancestor([Geography].CurrentMember, [Geography].[Country]).OrderKey,BASC,Ancestor([Geography].CurrentMember, [Geography].[State]).OrderKey,BASC,[Geography].CurrentMember.OrderKey,BASC)'
       Set [*BASE_MEMBERS_Geography] as '[Geography].[City].Members'
       Set [*NATIVE_MEMBERS_Geography] as 'Generate([*NATIVE_CJ_SET], {[Geography].CurrentMember})'
       Set [*BASE_MEMBERS_Measures] as '{[Measures].[*ZERO]}'
       Set [*CJ_ROW_AXIS] as 'Generate([*NATIVE_CJ_SET], {([Geography].currentMember)})'
       Set [*CJ_COL_AXIS] as '[*NATIVE_CJ_SET]'
       Member [Measures].[*ZERO] as '0', SOLVE_ORDER=0
       Select
       [*BASE_MEMBERS_Measures] on columns,
       [*SORTED_ROW_AXIS] on rows
       From [Sales Ragged]

        Activity

        Hide
        Benny Chow added a comment -
        java.lang.RuntimeException: java.lang.ClassCastException: mondrian.rolap.RolapHierarchy$RolapNullMember
        at com.pentaho.analyzer.service.impl.AnalysisAreaManager.executeQuery(AnalysisAreaManager.java:343)
        at com.pentaho.analyzer.report.ReportManagerImpl.parseAndExecuteMDX(ReportManagerImpl.java:293)
        at com.pentaho.analyzer.report.ReportManagerImpl.getCVResultSet(ReportManagerImpl.java:352)
        at com.pentaho.analyzer.report.ReportManagerImpl.runReport(ReportManagerImpl.java:110)
        at com.pentaho.analyzer.report.ReportManagerImpl.runReport(ReportManagerImpl.java:81)
        at com.pentaho.analyzer.report.ReportRequestService.runReportSync(ReportRequestService.java:205)
        at com.pentaho.analyzer.service.impl.ExtendedSchemaTest.testRaggedHiearachy(ExtendedSchemaTest.java:126)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:585)
        at org.junit.internal.runners.TestMethod.invoke(TestMethod.java:59)
        at org.junit.internal.runners.MethodRoadie.runTestMethod(MethodRoadie.java:98)
        at org.junit.internal.runners.MethodRoadie$2.run(MethodRoadie.java:79)
        at org.junit.internal.runners.MethodRoadie.runBeforesThenTestThenAfters(MethodRoadie.java:87)
        at org.junit.internal.runners.MethodRoadie.runTest(MethodRoadie.java:77)
        at org.junit.internal.runners.MethodRoadie.run(MethodRoadie.java:42)
        at org.junit.internal.runners.JUnit4ClassRunner.invokeTestMethod(JUnit4ClassRunner.java:88)
        at org.junit.internal.runners.JUnit4ClassRunner.runMethods(JUnit4ClassRunner.java:51)
        at org.junit.internal.runners.JUnit4ClassRunner$1.run(JUnit4ClassRunner.java:44)
        at org.junit.internal.runners.ClassRoadie.runUnprotected(ClassRoadie.java:27)
        at org.junit.internal.runners.ClassRoadie.runProtected(ClassRoadie.java:37)
        at org.junit.internal.runners.JUnit4ClassRunner.run(JUnit4ClassRunner.java:42)
        at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:38)
        at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
        at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460)
        at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673)
        at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386)
        at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)
        Caused by: java.lang.ClassCastException: mondrian.rolap.RolapHierarchy$RolapNullMember
        at mondrian.rolap.RolapCubeMember.compareTo(RolapCubeMember.java:148)
        at mondrian.olap.fun.FunUtil$OrderKey.compareTo(FunUtil.java:3102)
        at mondrian.olap.fun.FunUtil.compareValues(FunUtil.java:862)
        at mondrian.olap.fun.FunUtil$MemberComparator.compareByValue(FunUtil.java:2473)
        at mondrian.olap.fun.FunUtil$BreakMemberComparator.compare(FunUtil.java:2539)
        at mondrian.olap.fun.FunUtil$BreakMemberComparator.compare(FunUtil.java:2532)
        at org.apache.commons.collections.comparators.ComparatorChain.compare(ComparatorChain.java:277)
        at java.util.Arrays.mergeSort(Arrays.java:1284)
        at java.util.Arrays.mergeSort(Arrays.java:1296)
        at java.util.Arrays.mergeSort(Arrays.java:1296)
        at java.util.Arrays.sort(Arrays.java:1223)
        at java.util.Collections.sort(Collections.java:159)
        at mondrian.olap.fun.FunUtil.sortMembers(FunUtil.java:535)
        at mondrian.olap.fun.OrderFunDef$MemberCalcImpl.evaluateMemberList(OrderFunDef.java:217)
        at mondrian.calc.impl.AbstractMemberListCalc.evaluate(AbstractMemberListCalc.java:71)
        at mondrian.rolap.RolapResult.evaluateExp(RolapResult.java:864)
        at mondrian.rolap.RolapNamedSetEvaluator.ensureList(RolapNamedSetEvaluator.java:140)
        at mondrian.rolap.RolapNamedSetEvaluator.evaluateMemberIterable(RolapNamedSetEvaluator.java:68)
        at mondrian.mdx.NamedSetExpr$2.evaluateMemberIterable(NamedSetExpr.java:122)
        at mondrian.calc.impl.AbstractMemberIterCalc.evaluate(AbstractMemberIterCalc.java:52)
        at mondrian.rolap.RolapResult.executeAxis(RolapResult.java:744)
        at mondrian.rolap.RolapResult.evalLoad(RolapResult.java:587)
        at mondrian.rolap.RolapResult.loadMembers(RolapResult.java:553)
        at mondrian.rolap.RolapResult.<init>(RolapResult.java:268)
        at mondrian.rolap.RolapConnection.execute(RolapConnection.java:563)
        at com.pentaho.analyzer.service.impl.AnalysisAreaManager.executeQuery(AnalysisAreaManager.java:335)
        ... 28 more

        Show
        Benny Chow added a comment - java.lang.RuntimeException: java.lang.ClassCastException: mondrian.rolap.RolapHierarchy$RolapNullMember at com.pentaho.analyzer.service.impl.AnalysisAreaManager.executeQuery(AnalysisAreaManager.java:343) at com.pentaho.analyzer.report.ReportManagerImpl.parseAndExecuteMDX(ReportManagerImpl.java:293) at com.pentaho.analyzer.report.ReportManagerImpl.getCVResultSet(ReportManagerImpl.java:352) at com.pentaho.analyzer.report.ReportManagerImpl.runReport(ReportManagerImpl.java:110) at com.pentaho.analyzer.report.ReportManagerImpl.runReport(ReportManagerImpl.java:81) at com.pentaho.analyzer.report.ReportRequestService.runReportSync(ReportRequestService.java:205) at com.pentaho.analyzer.service.impl.ExtendedSchemaTest.testRaggedHiearachy(ExtendedSchemaTest.java:126) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at org.junit.internal.runners.TestMethod.invoke(TestMethod.java:59) at org.junit.internal.runners.MethodRoadie.runTestMethod(MethodRoadie.java:98) at org.junit.internal.runners.MethodRoadie$2.run(MethodRoadie.java:79) at org.junit.internal.runners.MethodRoadie.runBeforesThenTestThenAfters(MethodRoadie.java:87) at org.junit.internal.runners.MethodRoadie.runTest(MethodRoadie.java:77) at org.junit.internal.runners.MethodRoadie.run(MethodRoadie.java:42) at org.junit.internal.runners.JUnit4ClassRunner.invokeTestMethod(JUnit4ClassRunner.java:88) at org.junit.internal.runners.JUnit4ClassRunner.runMethods(JUnit4ClassRunner.java:51) at org.junit.internal.runners.JUnit4ClassRunner$1.run(JUnit4ClassRunner.java:44) at org.junit.internal.runners.ClassRoadie.runUnprotected(ClassRoadie.java:27) at org.junit.internal.runners.ClassRoadie.runProtected(ClassRoadie.java:37) at org.junit.internal.runners.JUnit4ClassRunner.run(JUnit4ClassRunner.java:42) at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:38) at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196) Caused by: java.lang.ClassCastException: mondrian.rolap.RolapHierarchy$RolapNullMember at mondrian.rolap.RolapCubeMember.compareTo(RolapCubeMember.java:148) at mondrian.olap.fun.FunUtil$OrderKey.compareTo(FunUtil.java:3102) at mondrian.olap.fun.FunUtil.compareValues(FunUtil.java:862) at mondrian.olap.fun.FunUtil$MemberComparator.compareByValue(FunUtil.java:2473) at mondrian.olap.fun.FunUtil$BreakMemberComparator.compare(FunUtil.java:2539) at mondrian.olap.fun.FunUtil$BreakMemberComparator.compare(FunUtil.java:2532) at org.apache.commons.collections.comparators.ComparatorChain.compare(ComparatorChain.java:277) at java.util.Arrays.mergeSort(Arrays.java:1284) at java.util.Arrays.mergeSort(Arrays.java:1296) at java.util.Arrays.mergeSort(Arrays.java:1296) at java.util.Arrays.sort(Arrays.java:1223) at java.util.Collections.sort(Collections.java:159) at mondrian.olap.fun.FunUtil.sortMembers(FunUtil.java:535) at mondrian.olap.fun.OrderFunDef$MemberCalcImpl.evaluateMemberList(OrderFunDef.java:217) at mondrian.calc.impl.AbstractMemberListCalc.evaluate(AbstractMemberListCalc.java:71) at mondrian.rolap.RolapResult.evaluateExp(RolapResult.java:864) at mondrian.rolap.RolapNamedSetEvaluator.ensureList(RolapNamedSetEvaluator.java:140) at mondrian.rolap.RolapNamedSetEvaluator.evaluateMemberIterable(RolapNamedSetEvaluator.java:68) at mondrian.mdx.NamedSetExpr$2.evaluateMemberIterable(NamedSetExpr.java:122) at mondrian.calc.impl.AbstractMemberIterCalc.evaluate(AbstractMemberIterCalc.java:52) at mondrian.rolap.RolapResult.executeAxis(RolapResult.java:744) at mondrian.rolap.RolapResult.evalLoad(RolapResult.java:587) at mondrian.rolap.RolapResult.loadMembers(RolapResult.java:553) at mondrian.rolap.RolapResult.<init>(RolapResult.java:268) at mondrian.rolap.RolapConnection.execute(RolapConnection.java:563) at com.pentaho.analyzer.service.impl.AnalysisAreaManager.executeQuery(AnalysisAreaManager.java:335) ... 28 more
        Hide
        Julian Hyde added a comment -
        Fixed in change 13283, mondrian-3.1 branch.
        Show
        Julian Hyde added a comment - Fixed in change 13283, mondrian-3.1 branch.

          People

          • Assignee:
            Jared Cornelius
            Reporter:
            Benny Chow
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: