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

NPE from query if use a scenario and one of the cells is empty/null

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Medium Medium
    • Resolution: Fixed
    • Affects Version/s: 3.2.0 GA (3.6.0 GA Suite Release)
    • Component/s: None
    • Labels:
      None
    • Notice:
      When an issue is open, the "Fix Version/s" field conveys a target, not necessarily a commitment. When an issue is closed, the "Fix Version/s" field conveys the version that the issue was fixed in.

      Description

      Hi guys,

      Following feedback from saturday night I finally got time to retry scenario support, the very basic queries work fine but as soon as I try something like:

      SELECT

      NON EMPTY { { [Store].[All Stores], [Store].[All Stores].Children } } ON COLUMNS,
      NON EMPTY { { [Product].[All Products], [Product].[All Products].Children } } ON ROWS FROM

      [Sales]

      On a scenario enabled cube it blows up inside mondrian which is a shame. But on the bright side the stack is always the same.... so I have attached it.

      You'll notice I've not actually added a scenario to the filter, this is the first time I've executed the query and I'm just looking for a normal query resultset.

      I'm running mondrian rev 3.2.1.13852.

      Cheers

      Tom

      [INFO] 23:11:32,282 ERROR [QueryServlet] An exception was encountered while executing the query.
      [INFO] mondrian.olap.MondrianException: Mondrian Error:Internal error: Error while executing query [select NON EMPTY {Hierarchize({[Store].[All Stores], [Store].[All Stores].Children})} ON COLUMNS,
      [INFO] NON EMPTY {Hierarchize({[Product].[All Products], [Product].[All Products].Children})} ON ROWS
      [INFO] from [Sales]
      [INFO] ]
      [INFO] at mondrian.resource.MondrianResource$_Def0.ex(MondrianResource.java:841)
      [INFO] at mondrian.olap.Util.newInternal(Util.java:1539)
      [INFO] at mondrian.olap.Util.newError(Util.java:1555)
      [INFO] at mondrian.rolap.RolapConnection.execute(RolapConnection.java:622)
      [INFO] at mondrian.olap4j.MondrianOlap4jCellSet.execute(MondrianOlap4jCellSet.java:82)
      [INFO] at mondrian.olap4j.MondrianOlap4jStatement.executeOlapQueryInternal(MondrianOlap4jStatement.java:320)
      [INFO] at mondrian.olap4j.MondrianOlap4jStatement.executeOlapQuery(MondrianOlap4jStatement.java:289)
      [INFO] at mondrian.olap4j.MondrianOlap4jStatement.executeOlapQuery(MondrianOlap4jStatement.java:333)
      [INFO] at org.olap4j.query.Query.execute(Query.java:283)
      [INFO] at org.pentaho.pat.server.services.impl.QueryServiceImpl.executeQuery(QueryServiceImpl.java:943)
      [INFO] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      [INFO] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      [INFO] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      [INFO] at java.lang.reflect.Method.invoke(Method.java:597)
      [INFO] at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:307)
      [INFO] at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182)
      [INFO] at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149)
      [INFO] at org.springframework.security.intercept.method.aopalliance.MethodSecurityInterceptor.invoke(MethodSecurityInterceptor.java:66)
      [INFO] at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
      [INFO] at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
      [INFO] at $Proxy20.executeQuery(Unknown Source)
      [INFO] at org.pentaho.pat.server.servlet.QueryServlet.executeQuery(QueryServlet.java:448)
      [INFO] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      [INFO] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      [INFO] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      [INFO] at java.lang.reflect.Method.invoke(Method.java:597)
      [INFO] at com.google.gwt.user.server.rpc.RPC.invokeAndEncodeResponse(RPC.java:527)
      [INFO] at com.google.gwt.user.server.rpc.RemoteServiceServlet.processCall(RemoteServiceServlet.java:166)
      [INFO] at com.google.gwt.user.server.rpc.RemoteServiceServlet.doPost(RemoteServiceServlet.java:86)
      [INFO] at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
      [INFO] at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
      [INFO] at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:487)
      [INFO] at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1097)
      [INFO] at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:378)
      [INFO] at org.springframework.security.intercept.web.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:109)
      [INFO] at org.springframework.security.intercept.web.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:83)
      [INFO] at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:390)
      [INFO] at org.springframework.security.ui.SessionFixationProtectionFilter.doFilterHttp(SessionFixationProtectionFilter.java:67)
      [INFO] at org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)
      [INFO] at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:390)
      [INFO] at org.springframework.security.ui.ExceptionTranslationFilter.doFilterHttp(ExceptionTranslationFilter.java:101)
      [INFO] at org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)
      [INFO] at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:390)
      [INFO] at org.springframework.security.providers.anonymous.AnonymousProcessingFilter.doFilterHttp(AnonymousProcessingFilter.java:105)
      [INFO] at org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)
      [INFO] at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:390)
      [INFO] at org.springframework.security.ui.rememberme.RememberMeProcessingFilter.doFilterHttp(RememberMeProcessingFilter.java:116)
      [INFO] at org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)
      [INFO] at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:390)
      [INFO] at org.springframework.security.wrapper.SecurityContextHolderAwareRequestFilter.doFilterHttp(SecurityContextHolderAwareRequestFilter.java:91)
      [INFO] at org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)
      [INFO] at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:390)
      [INFO] at org.springframework.security.ui.basicauth.BasicProcessingFilter.doFilterHttp(BasicProcessingFilter.java:174)
      [INFO] at org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)
      [INFO] at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:390)
      [INFO] at org.springframework.security.ui.AbstractProcessingFilter.doFilterHttp(AbstractProcessingFilter.java:278)
      [INFO] at org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)
      [INFO] at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:390)
      [INFO] at org.springframework.security.ui.logout.LogoutFilter.doFilterHttp(LogoutFilter.java:89)
      [INFO] at org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)
      [INFO] at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:390)
      [INFO] at org.springframework.security.context.HttpSessionContextIntegrationFilter.doFilterHttp(HttpSessionContextIntegrationFilter.java:235)
      [INFO] at org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)
      [INFO] at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:390)
      [INFO] at org.springframework.security.util.FilterChainProxy.doFilter(FilterChainProxy.java:175)
      [INFO] at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:236)
      [INFO] at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:167)
      [INFO] at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1088)
      [INFO] at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:360)
      [INFO] at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
      [INFO] at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:181)
      [INFO] at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:729)
      [INFO] at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:405)
      [INFO] at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
      [INFO] at org.mortbay.jetty.handler.RequestLogHandler.handle(RequestLogHandler.java:49)
      [INFO] at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
      [INFO] at org.mortbay.jetty.Server.handle(Server.java:324)
      [INFO] at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:505)
      [INFO] at org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java:843)
      [INFO] at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:647)
      [INFO] at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:205)
      [INFO] at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:380)
      [INFO] at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:395)
      [INFO] at org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:488)
      [INFO] Caused by: java.lang.NullPointerException
      [INFO] at mondrian.rolap.ScenarioImpl$ScenarioCalc.evaluate(ScenarioImpl.java:484)
      [INFO] at mondrian.rolap.RolapEvaluator.evaluateCurrent(RolapEvaluator.java:511)
      [INFO] at mondrian.rolap.RolapResult.executeStripe(RolapResult.java:903)
      [INFO] at mondrian.rolap.RolapResult.executeStripe(RolapResult.java:1058)
      [INFO] at mondrian.rolap.RolapResult.executeStripe(RolapResult.java:1058)
      [INFO] at mondrian.rolap.RolapResult.executeBody(RolapResult.java:799)
      [INFO] at mondrian.rolap.RolapResult.<init>(RolapResult.java:417)
      [INFO] at mondrian.rolap.RolapConnection.execute(RolapConnection.java:593)
      [INFO] ... 80 more

        Activity

        Hide
        Julian Hyde added a comment -
        Fixed in change 13858. Will be in 3.2.2.
        Show
        Julian Hyde added a comment - Fixed in change 13858. Will be in 3.2.2.

          People

          • Assignee:
            Triage
            Reporter:
            Tom Barber
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: