Hitachi Vantara Pentaho Community Forums
Results 1 to 5 of 5

Thread: NullPointerException

  1. #1
    Join Date
    Apr 2014
    Posts
    18

    Default NullPointerException

    I am using Mondrian Community edition. I have a cube that contains aggregation tables.
    When adding a dimension and selecting the last level on a dimension hierarchy as part of an MDX query I get a NullPointerException error. This only happen when using aggregation tables in the schema in combination with a hierarchy dimension and it always happen at the lowest level in the hierarchy. For example: a time dimension with a year, quarter, month, date levels with one measure, when I select the date level to be display then I get the error. However, if I add a filter to the date, then it doesn't generate the error.

    I don't know if this is a bug in Mondrian or if I am missing a flag in the schema. I also try changing the Collapse flag to false, with the same results.

    Please help!

    Reynaldo Nunez

  2. #2
    Join Date
    Jan 2013
    Posts
    796

    Default

    Posting the MDX and full exception contents might give some clues.

  3. #3
    Join Date
    Apr 2014
    Posts
    18

    Default

    Thanks MCampbell

    The MDX is very simple, see below:

    SELECT
    NON EMPTY {Hierarchize({[Measures].[submission_charge_count]})} ON COLUMNS,
    NON EMPTY {Hierarchize({[d_charge_responsibility.h_charge_responsibility].[responsibility].Members})} ON ROWS
    FROM [opsChargesReceivables_Rev008]
    WHERE {[d_organization.h_organization].[NUNEZ MEDICAL GRP].[NUNEZ MEDICAL GRP].[NUNEZ MEDICAL GRP]}

    The exception is: NullPointerException:
    That's all I am getting from Mondrian.

    The
    {Hierarchize({[d_charge_responsibility.h_charge_responsibility].[responsibility].Members})} is the last level in the hierarchy. If I add filter to the level, I don't get the exception.

    Thanks!


  4. #4
    Join Date
    Apr 2014
    Posts
    18

    Default

    Full error stack:

    location=jdbc:mondrian:Catalog=mondrian:/Charg...
    driver=mondrian.olap4j.MondrianOlap4jDriver
    -- listing properties --
    location=jdbc:mondrian:Catalog=mondrian:/Charg...
    driver=mondrian.olap4j.MondrianOlap4jDriver
    -- listing properties --
    location=jdbc:mondrian:Catalog=mondrian:/Steel...
    driver=mondrian.olap4j.MondrianOlap4jDriver
    07:21:53,408 ERROR [QueryResource] Cannot execute query (C69EF4F1-C219-7F79-AD8F-6712C0AF8F2A)
    org.saiku.service.util.exception.SaikuServiceException: runId:13 Can't execute query: C69EF4F1-C219-7F79-AD8F-6712C0AF8F2A
    at org.saiku.service.olap.OlapQueryService.execute(OlapQueryService.java:305)
    at org.saiku.service.olap.OlapQueryService.execute(OlapQueryService.java:223)
    at org.saiku.web.rest.resources.QueryResource.execute(QueryResource.java:745)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:606)
    at com.sun.jersey.spi.container.JavaMethodInvokerFactory$1.invoke(JavaMethodInvokerFactory.java:60)
    at com.sun.jersey.server.impl.model.method.dispatch.AbstractResourceMethodDispatchProvider$TypeOutInvoker._dispatch(AbstractResourceMethodDispatchProvider.java:185)
    at com.sun.jersey.server.impl.model.method.dispatch.ResourceJavaMethodDispatcher.dispatch(ResourceJavaMethodDispatcher.java:75)
    at com.sun.jersey.server.impl.uri.rules.HttpMethodRule.accept(HttpMethodRule.java:302)
    at com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:147)
    at com.sun.jersey.server.impl.uri.rules.ResourceClassRule.accept(ResourceClassRule.java:108)
    at com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:147)
    at com.sun.jersey.server.impl.uri.rules.RootResourceClassesRule.accept(RootResourceClassesRule.java:84)
    at com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1511)
    at com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1442)
    at com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1391)
    at com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1381)
    at com.sun.jersey.spi.container.servlet.WebComponent.service(WebComponent.java:416)
    at com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:538)
    at com.sun.jersey.spi.container.servlet.ServletContainer.service(ServletContainer.java:716)
    at org.pentaho.platform.web.servlet.JAXRSPluginServlet.service(JAXRSPluginServlet.java:62)
    at org.saiku.plugin.resources.ExtendedJAXRSPluginServlet.service(ExtendedJAXRSPluginServlet.java:65)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
    at org.pentaho.platform.web.servlet.JAXRSPluginServlet.service(JAXRSPluginServlet.java:67)
    at org.pentaho.platform.web.servlet.PluginDispatchServlet.service(PluginDispatchServlet.java:89)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    at org.pentaho.platform.web.http.filters.PentahoWebContextFilter.doFilter(PentahoWebContextFilter.java:161)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    at org.pentaho.platform.web.http.filters.PentahoRequestContextFilter.doFilter(PentahoRequestContextFilter.java:83)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:378)
    at org.springframework.security.intercept.web.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:109)
    at org.springframework.security.intercept.web.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:83)
    at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:390)
    at org.springframework.security.ui.ExceptionTranslationFilter.doFilterHttp(ExceptionTranslationFilter.java:101)
    at org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)
    at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:390)
    at org.springframework.security.providers.anonymous.AnonymousProcessingFilter.doFilterHttp(AnonymousProcessingFilter.java:105)
    at org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)
    at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:390)
    at org.springframework.security.ui.basicauth.BasicProcessingFilter.doFilterHttp(BasicProcessingFilter.java:174)
    at org.pentaho.platform.web.http.security.PentahoBasicProcessingFilter.doFilterHttp(PentahoBasicProcessingFilter.java:88)
    at org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)
    at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:390)
    at org.springframework.security.context.HttpSessionContextIntegrationFilter.doFilterHttp(HttpSessionContextIntegrationFilter.java:235)
    at org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)
    at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:390)
    at org.pentaho.platform.web.http.filters.HttpSessionPentahoSessionIntegrationFilter.doFilter(HttpSessionPentahoSessionIntegrationFilter.java:265)
    at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:390)
    at org.springframework.security.wrapper.SecurityContextHolderAwareRequestFilter.doFilterHttp(SecurityContextHolderAwareRequestFilter.java:91)
    at org.springframework.security.ui.SpringSecurityFilter.doFilter(SpringSecurityFilter.java:53)
    at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:390)
    at org.springframework.security.util.FilterChainProxy.doFilter(FilterChainProxy.java:175)
    at org.springframework.security.util.FilterToBeanProxy.doFilter(FilterToBeanProxy.java:99)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    at org.pentaho.platform.web.http.filters.SystemStatusFilter.doFilter(SystemStatusFilter.java:59)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    at org.pentaho.platform.web.http.filters.SetCharacterEncodingFilter.doFilter(SetCharacterEncodingFilter.java:112)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    at org.pentaho.platform.web.http.filters.WebappRootForwardingFilter.doFilter(WebappRootForwardingFilter.java:66)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
    at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:470)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)
    at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:861)
    at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:606)
    at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
    at java.lang.Thread.run(Thread.java:744)
    Caused by: org.olap4j.OlapException: mondrian gave exception while executing query
    at mondrian.olap4j.MondrianOlap4jConnection$Helper.createException(MondrianOlap4jConnection.java:840)
    at mondrian.olap4j.MondrianOlap4jStatement.executeOlapQueryInternal(MondrianOlap4jStatement.java:423)
    at mondrian.olap4j.MondrianOlap4jStatement.executeOlapQuery(MondrianOlap4jStatement.java:347)
    at org.saiku.olap.query.OlapQuery.execute(OlapQuery.java:290)
    at org.saiku.service.olap.OlapQueryService.execute(OlapQueryService.java:249)
    ... 80 more
    Caused by: mondrian.olap.MondrianException: Mondrian Error:Internal error: Error while executing query [select NON EMPTY {Hierarchize({[Measures].[billed_dollars]})} ON COLUMNS,
    NON EMPTY {Hierarchize({[d_date_of_service.h_date_of_Service ].[dos_month].Members})} ON ROWS
    from [opsChargesReceivables_Rev008 Test]
    where {[d_security.h_security].[1]}
    ]
    at mondrian.resource.MondrianResource$_Def0.ex(MondrianResource.java:972)
    at mondrian.olap.Util.newInternal(Util.java:2403)
    at mondrian.olap.Util.newError(Util.java:2419)
    at mondrian.rolap.RolapConnection.executeInternal(RolapConnection.java:706)
    at mondrian.rolap.RolapConnection.access$000(RolapConnection.java:51)
    at mondrian.rolap.RolapConnection$1.call(RolapConnection.java:622)
    at mondrian.rolap.RolapConnection$1.call(RolapConnection.java:621)
    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)
    ... 1 more
    Caused by: java.lang.NullPointerException
    at mondrian.rolap.SqlMemberSource.isLevelCollapsed(SqlMemberSource.java:814)
    at mondrian.rolap.SqlTupleReader.addLevelMemberSql(SqlTupleReader.java:1058)
    at mondrian.rolap.SqlTupleReader.generateSelectForLevels(SqlTupleReader.java:914)
    at mondrian.rolap.SqlTupleReader.makeLevelMembersSql(SqlTupleReader.java:839)
    at mondrian.rolap.SqlTupleReader.prepareTuples(SqlTupleReader.java:390)
    at mondrian.rolap.SqlTupleReader.readMembers(SqlTupleReader.java:506)
    at mondrian.rolap.SqlMemberSource.getMembersInLevel(SqlMemberSource.java:527)
    at mondrian.rolap.SmartMemberReader.getMembersInLevel(SmartMemberReader.java:146)
    at mondrian.rolap.RolapCubeHierarchy$CacheRolapCubeHierarchyMemberReader.getMembersInLevel(RolapCubeHierarchy.java:727)
    at mondrian.rolap.RolapSchemaReader.getLevelMembers(RolapSchemaReader.java:566)
    at mondrian.olap.DelegatingSchemaReader.getLevelMembers(DelegatingSchemaReader.java:242)
    at mondrian.olap.fun.FunUtil.getNonEmptyLevelMembers(FunUtil.java:2195)
    at mondrian.olap.fun.FunUtil.levelMembers(FunUtil.java:2209)
    at mondrian.olap.fun.LevelMembersFunDef$1.evaluateList(LevelMembersFunDef.java:37)
    at mondrian.olap.fun.HierarchizeFunDef$1.evaluateList(HierarchizeFunDef.java:46)
    at mondrian.calc.impl.AbstractListCalc.evaluateIterable(AbstractListCalc.java:71)
    at mondrian.rolap.RolapResult.executeAxis(RolapResult.java:875)
    at mondrian.rolap.RolapResult.evalLoad(RolapResult.java:700)
    at mondrian.rolap.RolapResult.loadMembers(RolapResult.java:656)
    at mondrian.rolap.RolapResult.<init>(RolapResult.java:288)
    at mondrian.rolap.RolapConnection.executeInternal(RolapConnection.java:671)

  5. #5
    Join Date
    Apr 2014
    Posts
    18

    Default

    I have been looking everywhere for this error and it seems to be an open bug at the Mondrian engine. I will like to know if there is a fix or work around this problem?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Privacy Policy | Legal Notices | Safe Harbor Privacy Policy

Copyright © 2005 - 2019 Hitachi Vantara Corporation. All Rights Reserved.