org.olap4j.OlapException: mondrian gave exception while executing query

Pentaho BI Platform Tracking | Johan Cosemans | 3 months ago
  1. 0

    Mondrian is not able to execute queries with multiple dimensions on the WHERE clause when a calculated measure is set as defaultMeasure. This is the stacktrace: {code} org.olap4j.OlapException: mondrian gave exception while executing query at mondrian.olap4j.MondrianOlap4jConnection$Helper.createException(MondrianOlap4jConnection.java:842) at mondrian.olap4j.MondrianOlap4jStatement.executeOlapQueryInternal(MondrianOlap4jStatement.java:421) at mondrian.olap4j.MondrianOlap4jPreparedStatement.executeQuery(MondrianOlap4jPreparedStatement.java:72) at com.fuseanalytics.olap.MdxConsole.query(MdxConsole.java:138) at com.fuseanalytics.olap.MdxConsole.eval(MdxConsole.java:296) at com.fuseanalytics.olap.Shell$1.actionPerformed(Shell.java:49) at javax.swing.SwingUtilities.notifyAction(SwingUtilities.java:1662) at javax.swing.JComponent.processKeyBinding(JComponent.java:2879) at javax.swing.JComponent.processKeyBindings(JComponent.java:2926) at javax.swing.JComponent.processKeyEvent(JComponent.java:2842) at java.awt.Component.processEvent(Component.java:6293) at java.awt.Container.processEvent(Container.java:2229) at java.awt.Component.dispatchEventImpl(Component.java:4872) at java.awt.Container.dispatchEventImpl(Container.java:2287) at java.awt.Component.dispatchEvent(Component.java:4698) at java.awt.KeyboardFocusManager.redispatchEvent(KeyboardFocusManager.java:1887) at java.awt.DefaultKeyboardFocusManager.dispatchKeyEvent(DefaultKeyboardFocusManager.java:762) at java.awt.DefaultKeyboardFocusManager.preDispatchKeyEvent(DefaultKeyboardFocusManager.java:1027) at java.awt.DefaultKeyboardFocusManager.typeAheadAssertions(DefaultKeyboardFocusManager.java:899) at java.awt.DefaultKeyboardFocusManager.dispatchEvent(DefaultKeyboardFocusManager.java:727) at java.awt.Component.dispatchEventImpl(Component.java:4742) at java.awt.Container.dispatchEventImpl(Container.java:2287) at java.awt.Window.dispatchEventImpl(Window.java:2719) at java.awt.Component.dispatchEvent(Component.java:4698) at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:747) at java.awt.EventQueue.access$300(EventQueue.java:103) at java.awt.EventQueue$3.run(EventQueue.java:706) at java.awt.EventQueue$3.run(EventQueue.java:704) at java.security.AccessController.doPrivileged(Native Method) at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76) at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:87) at java.awt.EventQueue$4.run(EventQueue.java:720) at java.awt.EventQueue$4.run(EventQueue.java:718) at java.security.AccessController.doPrivileged(Native Method) at java.security.ProtectionDomain$1.doIntersectionPrivilege(ProtectionDomain.java:76) at java.awt.EventQueue.dispatchEvent(EventQueue.java:717) at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:242) at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:161) at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:150) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:146) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:138) at java.awt.EventDispatchThread.run(EventDispatchThread.java:91) Caused by: mondrian.olap.MondrianException: Mondrian Error:Internal error: Error while executing query [select NON EMPTY {[Ethnicity].[Ethnicity].[ethnicity].Members} ON COLUMNS, NON EMPTY {[Measures].[headCount]} ON ROWS from [workforce] where ({[Organization].[Organization].[Unknown]} * {([employmentDate].[yearQuarterMonth].[2015] : [employmentDate].[yearQuarterMonth].[2016])}) ] at mondrian.resource.MondrianResource$_Def0.ex(MondrianResource.java:992) at mondrian.olap.Util.newInternal(Util.java:2543) at mondrian.olap.Util.newError(Util.java:2559) at mondrian.rolap.RolapConnection.executeInternal(RolapConnection.java:535) at mondrian.rolap.RolapConnection.access$000(RolapConnection.java:45) at mondrian.rolap.RolapConnection$1.call(RolapConnection.java:448) at mondrian.rolap.RolapConnection$1.call(RolapConnection.java:446) at java.util.concurrent.FutureTask.run(FutureTask.java:262) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at java.lang.Thread.run(Thread.java:745) Caused by: java.lang.NullPointerException at mondrian.olap.fun.AggregateFunDef$AggregateCalc.dimensionJoinsToBaseCube(AggregateFunDef.java:552) at mondrian.olap.fun.AggregateFunDef$AggregateCalc.canOptimize(AggregateFunDef.java:530) at mondrian.olap.fun.AggregateFunDef$AggregateCalc.optimizeMemberSet(AggregateFunDef.java:487) at mondrian.olap.fun.AggregateFunDef$AggregateCalc.optimizeChildren(AggregateFunDef.java:396) at mondrian.olap.fun.AggregateFunDef$AggregateCalc.optimizeTupleList(AggregateFunDef.java:250) at mondrian.rolap.RolapResult.<init>(RolapResult.java:351) at mondrian.rolap.RolapConnection.executeInternal(RolapConnection.java:500) ... 7 more {code} The NullPointerException is occuring in AggregateFunDef.java, method dimensionJoinsToBaseCube. When a calculated measure is the default measure of a cube, there is no measure group and its value will be null. The signature of this method has changed between mondrian 3 and mondrian 4.

    Pentaho BI Platform Tracking | 3 months ago | Johan Cosemans
    org.olap4j.OlapException: mondrian gave exception while executing query
  2. 0

    Android: Saving Map State in Google map

    Stack Overflow | 11 months ago | Junie Negentien
    java.lang.RuntimeException: Unable to resume activity {com.ourThesis.junieNegentien2015/com.ourThesis.junieNegentien2015.MainActivity}: java.lang.NullPointerException
  3. Speed up your debug routine!

    Automated exception search integrated into your IDE

    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. java.lang.NullPointerException

      No message provided

      at mondrian.olap.fun.AggregateFunDef$AggregateCalc.dimensionJoinsToBaseCube()
    2. mondrian.olap.fun
      AggregateFunDef$AggregateCalc.optimizeTupleList
      1. mondrian.olap.fun.AggregateFunDef$AggregateCalc.dimensionJoinsToBaseCube(AggregateFunDef.java:552)
      2. mondrian.olap.fun.AggregateFunDef$AggregateCalc.canOptimize(AggregateFunDef.java:530)
      3. mondrian.olap.fun.AggregateFunDef$AggregateCalc.optimizeMemberSet(AggregateFunDef.java:487)
      4. mondrian.olap.fun.AggregateFunDef$AggregateCalc.optimizeChildren(AggregateFunDef.java:396)
      5. mondrian.olap.fun.AggregateFunDef$AggregateCalc.optimizeTupleList(AggregateFunDef.java:250)
      5 frames
    3. mondrian.rolap
      RolapConnection$1.call
      1. mondrian.rolap.RolapResult.<init>(RolapResult.java:351)
      2. mondrian.rolap.RolapConnection.executeInternal(RolapConnection.java:500)
      3. mondrian.rolap.RolapConnection.access$000(RolapConnection.java:45)
      4. mondrian.rolap.RolapConnection$1.call(RolapConnection.java:448)
      5. mondrian.rolap.RolapConnection$1.call(RolapConnection.java:446)
      5 frames
    4. Java RT
      Thread.run
      1. java.util.concurrent.FutureTask.run(FutureTask.java:262)
      2. java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
      3. java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
      4. java.lang.Thread.run(Thread.java:745)
      4 frames