java.lang.RuntimeException

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.

  • Two statements, executed in a row, raise an exception. Any statement alone works well. Following Code to produces the exception: package mondrian.test; import junit.framework.TestCase; import mondrian.olap.*; /** * bad sequence * */ public class Sequence extends TestCase { /** * Constructor for Sequence. * @param arg0 */ public Sequence(String arg0) { super(arg0); } public static void main(String[] args) { junit.textui.TestRunner.run (Sequence.class); } public void testSequence() { String mdxQueries[] = { "select {[Measures].[Unit Sales], [Measures].[Store Cost], [Measures].[Store Sales]} ON columns, "+ "Order("+ "{([Store].[All Stores].[USA].[CA], [Product].[All Products].[Drink].[Alcoholic Beverages]), "+ "([Store].[All Stores].[USA].[CA], [Product].[All Products].[Drink].[Beverages]), "+ "Crossjoin({[Store].[All Stores].[USA].[CA].Children}, {[Product].[All Products].[Drink].[Beverages]}), "+ "([Store].[All Stores].[USA].[CA], [Product].[All Products].[Drink].[Dairy]), "+ "([Store].[All Stores].[USA].[OR], [Product].[All Products].[Drink].[Alcoholic Beverages]), "+ "([Store].[All Stores].[USA].[OR], [Product].[All Products].[Drink].[Beverages]), "+ "([Store].[All Stores].[USA].[OR], [Product].[All Products].[Drink].[Dairy]), "+ "([Store].[All Stores].[USA].[WA], [Product].[All Products].[Drink].[Alcoholic Beverages]), "+ "([Store].[All Stores].[USA].[WA], [Product].[All Products].[Drink].[Beverages]), "+ "([Store].[All Stores].[USA].[WA], [Product].[All Products].[Drink].[Dairy])}, "+ "[Measures].[Store Cost], BDESC) ON rows "+ "from [Sales] "+ "where ([Time].[1997])" , "select {[Measures].[Unit Sales], [Measures].[Store Cost], [Measures].[Store Sales]} ON columns, "+ "Order("+ "{([Store].[All Stores].[USA].[WA], [Product].[All Products].[Drink].[Beverages]), "+ "([Store].[All Stores].[USA].[CA], [Product].[All Products].[Drink].[Beverages]), "+ "([Store].[All Stores].[USA].[OR], [Product].[All Products].[Drink].[Beverages]), "+ "([Store].[All Stores].[USA].[WA], [Product].[All Products].[Drink].[Alcoholic Beverages]), "+ "([Store].[All Stores].[USA].[CA], [Product].[All Products].[Drink].[Alcoholic Beverages]), "+ "([Store].[All Stores].[USA].[OR], [Product].[All Products].[Drink].[Alcoholic Beverages]), "+ "([Store].[All Stores].[USA].[WA], [Product].[All Products].[Drink].[Dairy]), "+ "([Store].[All Stores].[USA].[CA].[San Diego], [Product].[All Products].[Drink].[Beverages]), "+ "([Store].[All Stores].[USA].[CA].[Los Angeles], [Product].[All Products].[Drink].[Beverages]), "+ "Crossjoin({[Store].[All Stores].[USA].[CA].[Los Angeles]}, {[Product].[All Products].[Drink]. [Beverages].Children}), "+ "([Store].[All Stores].[USA].[CA].[Beverly Hills], [Product].[All Products].[Drink].[Beverages]), "+ "([Store].[All Stores].[USA].[CA], [Product].[All Products].[Drink].[Dairy]), "+ "([Store].[All Stores].[USA].[OR], [Product].[All Products].[Drink].[Dairy]), "+ "([Store].[All Stores].[USA].[CA].[San Francisco], [Product].[All Products].[Drink].[Beverages])}, "+ "[Measures].[Store Cost], BDESC) ON rows "+ "from [Sales] "+ "where ([Time].[1997])" }; Connection connection = TestContext.instance ().getFoodMartConnection(); for ( int i = 0; i < mdxQueries.length; i++ ) { Query query = connection.parseQuery(mdxQueries [i]); connection.execute(query); } } } The call stack is: java.lang.ClassCastException: java.lang.RuntimeException at mondrian.olap.fun.FunUtil.compareValues (FunUtil.java:366) at mondrian.olap.fun.BreakArrayComparator.compare (FunUtil.java:873) at mondrian.olap.fun.ArrayComparator.compare (FunUtil.java:787) at mondrian.olap.fun.ReverseComparator.compare (FunUtil.java:884) at java.util.Arrays.mergeSort (Arrays.java:1241) at java.util.Arrays.mergeSort (Arrays.java:1248) at java.util.Arrays.mergeSort (Arrays.java:1249) at java.util.Arrays.sort(Arrays.java:1188) at mondrian.olap.fun.FunUtil.sort (FunUtil.java:375) at mondrian.olap.fun.FunUtil.sort (FunUtil.java:353) at mondrian.olap.fun.BuiltinFunTable$50.evaluate (BuiltinFunTable.java:1736) at mondrian.olap.fun.FunkFunDef.evaluate (MultiResolver.java:93) at mondrian.rolap.RolapEvaluator.xx (RolapEvaluator.java:116) at mondrian.olap.FunCall.evaluate (FunCall.java:244) at mondrian.rolap.RolapResult.executeAxis (RolapResult.java:154) at mondrian.rolap.RolapResult.<init> (RolapResult.java:70) at mondrian.rolap.RolapConnection.execute (RolapConnection.java:99) at mondrian.test.Sequence.testSequence (Sequence.java:94) 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:324) at junit.framework.TestCase.runTest (TestCase.java:166) at junit.framework.TestCase.runBare (TestCase.java:140) at junit.framework.TestResult$1.protect (TestResult.java:106) at junit.framework.TestResult.runProtected (TestResult.java:124) at junit.framework.TestResult.run (TestResult.java:109) at junit.framework.TestCase.run (TestCase.java:131) at junit.framework.TestSuite.runTest (TestSuite.java:173) at junit.framework.TestSuite.run (TestSuite.java:168) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.ru nTests(RemoteTestRunner.java:329) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.ru n(RemoteTestRunner.java:218) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.m ain(RemoteTestRunner.java:151)
    via by hhaas,
    • java.lang.RuntimeException at mondrian.olap.fun.FunUtil.compareValues(FunUtil.java:366) at mondrian.olap.fun.BreakArrayComparator.compare(FunUtil.java:873) at mondrian.olap.fun.ArrayComparator.compare(FunUtil.java:787) at mondrian.olap.fun.ReverseComparator.compare(FunUtil.java:884) at java.util.Arrays.mergeSort(Arrays.java:1241) at java.util.Arrays.mergeSort(Arrays.java:1248) at java.util.Arrays.mergeSort(Arrays.java:1249) at java.util.Arrays.sort(Arrays.java:1188) at mondrian.olap.fun.FunUtil.sort(FunUtil.java:375) at mondrian.olap.fun.FunUtil.sort(FunUtil.java:353) at mondrian.olap.fun.BuiltinFunTable$50.evaluate(BuiltinFunTable.java:1736) at mondrian.olap.fun.FunkFunDef.evaluate(MultiResolver.java:93) at mondrian.rolap.RolapEvaluator.xx(RolapEvaluator.java:116) at mondrian.olap.FunCall.evaluate(FunCall.java:244) at mondrian.rolap.RolapResult.executeAxis(RolapResult.java:154) at mondrian.rolap.RolapResult.<init>(RolapResult.java:70) at mondrian.rolap.RolapConnection.execute(RolapConnection.java:99) at mondrian.test.Sequence.testSequence(Sequence.java:94) 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:324) at junit.framework.TestCase.runTest(TestCase.java:166) at junit.framework.TestCase.runBare(TestCase.java:140) at junit.framework.TestResult$1.protect(TestResult.java:106) at junit.framework.TestResult.runProtected(TestResult.java:124) at junit.framework.TestResult.run(TestResult.java:109) at junit.framework.TestCase.run(TestCase.java:131) at junit.framework.TestSuite.runTest(TestSuite.java:173) at junit.framework.TestSuite.run(TestSuite.java:168) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:329) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:218) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:151)
    No Bugmate found.