mondrian.olap.MondrianException

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.

  • Mondrian throws a class-cast exception when attempting to process an MDX referencing members on a Parent/child dimension where there is no closure on the hierarchy. I have confirmed this issue against the latest code in the 3.1 Perforce repo as of this morning. Attached is a TestCase which I believe would be most appropriate to put in mondrian.test.ParentChildHierarchyTest (which is where I have been using it). The test case is 'simple'. It runs a simple MDX query against the Parent/Child hierarchy in FoodMart(Employees) using a Closure table. Then runs the identical MDX against the identical cube except the second time there is no closure defined. It attemtps to assert that the results of both MDX's are identical. The trace as thrown in JUnit is as follows, and I have taken the liberty of 'annotating it' so that I can describe the relevant details of the problem. My notes are indicated with *rlear note x* and after the trace I give a break-down of the relevant system states for the various notes. mondrian.olap.MondrianException: Mondrian Error:Internal error: Error while executing query [select {[Measures].[Count]} ON COLUMNS, NON EMPTY {[Employees].AllMembers} ON ROWS from [HR4C] ] at mondrian.resource.MondrianResource$_Def0.ex(MondrianResource.java:811) at mondrian.olap.Util.newInternal(Util.java:1472) at mondrian.olap.Util.newError(Util.java:1488) at mondrian.rolap.RolapConnection.execute(RolapConnection.java:589) at mondrian.test.TestContext.executeQuery(TestContext.java:478) at mondrian.test.TestContext.assertQueryReturns(TestContext.java:820) at mondrian.test.ParentChildHierarchyTest.testClosureVsNoClosure(ParentChildHierarchyTest.java:238) 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 junit.framework.TestCase.runTest(TestCase.java:164) at junit.framework.TestCase.runBare(TestCase.java:130) 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:120) at junit.framework.TestSuite.runTest(TestSuite.java:230) at junit.framework.TestSuite.run(TestSuite.java:225) at org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run(JUnit3TestReference.java:130) 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.RolapMember *rlear note 1* at mondrian.rolap.RolapCubeHierarchy$CacheRolapCubeHierarchyMemberReader.readMemberChildren(RolapCubeHierarchy.java:475) at mondrian.rolap.RolapCubeHierarchy$CacheRolapCubeHierarchyMemberReader.getMemberChildren(RolapCubeHierarchy.java:585) at mondrian.rolap.SmartMemberReader.getMemberChildren(SmartMemberReader.java:175) at mondrian.rolap.SmartMemberReader.getMemberChildren(SmartMemberReader.java:165) *rlear note 2* at mondrian.rolap.SqlMemberSource$RolapParentChildMember.getPropertyValue(SqlMemberSource.java:1158) at mondrian.rolap.RolapCubeMember.getPropertyValue(RolapCubeMember.java:223) at mondrian.rolap.RolapMember.getPropertyValue(RolapMember.java:524) at mondrian.olap.fun.BuiltinFunTable$22$1.aggregateChildren(BuiltinFunTable.java:713) at mondrian.olap.fun.BuiltinFunTable$22$1$1.evaluate(BuiltinFunTable.java:700) at mondrian.rolap.RolapEvaluator.evaluateCurrent(RolapEvaluator.java:449) at mondrian.rolap.RolapResult.executeStripe(RolapResult.java:890) at mondrian.rolap.RolapResult.executeStripe(RolapResult.java:1027) at mondrian.rolap.RolapResult.executeStripe(RolapResult.java:1027) at mondrian.rolap.RolapResult.executeBody(RolapResult.java:788) at mondrian.rolap.RolapResult.<init>(RolapResult.java:414) at mondrian.rolap.RolapConnection.execute(RolapConnection.java:560) ... 21 more *rlear note 1* the list parentRolapCubeMemberList is iterated over with the expectation that it contains RolapCubeMember instances. In this particular case though, it contains just a RolapMember (not RolapCubeMember). This is what causes the exception. *rlear note 2* the RolapParentChildMember that is referred to here is actually a RolapParentChildMemberNoClosure, and the significance of the trace at this point is that the 'dataMember' instance variable is a plain RolapMember, not a RolapCubeMember. This is why the ClassCastException happens later in the trace. I tried to 'fix' this issue by modifying the SqlMemberSource.makeMember() method to create the RolapParentChildMemberNoClosure instance with a RolapCubeMember in the constructor instead of a RolapCube, and this works for single-level hierarchies, but, there is a form of recursion that happens in this code section as the hierarchy is traversed finding the Child members, and I can't find a way to ensure that the correct RolapCubeMember is used in the lower levels. Further, I am not certain that this would be the best 'fix'. Rolf
    via by rlear,
  • Mondrian throws a class-cast exception when attempting to process an MDX referencing members on a Parent/child dimension where there is no closure on the hierarchy. I have confirmed this issue against the latest code in the 3.1 Perforce repo as of this morning. Attached is a TestCase which I believe would be most appropriate to put in mondrian.test.ParentChildHierarchyTest (which is where I have been using it). The test case is 'simple'. It runs a simple MDX query against the Parent/Child hierarchy in FoodMart(Employees) using a Closure table. Then runs the identical MDX against the identical cube except the second time there is no closure defined. It attemtps to assert that the results of both MDX's are identical. The trace as thrown in JUnit is as follows, and I have taken the liberty of 'annotating it' so that I can describe the relevant details of the problem. My notes are indicated with *rlear note x* and after the trace I give a break-down of the relevant system states for the various notes. mondrian.olap.MondrianException: Mondrian Error:Internal error: Error while executing query [select {[Measures].[Count]} ON COLUMNS, NON EMPTY {[Employees].AllMembers} ON ROWS from [HR4C] ] at mondrian.resource.MondrianResource$_Def0.ex(MondrianResource.java:811) at mondrian.olap.Util.newInternal(Util.java:1472) at mondrian.olap.Util.newError(Util.java:1488) at mondrian.rolap.RolapConnection.execute(RolapConnection.java:589) at mondrian.test.TestContext.executeQuery(TestContext.java:478) at mondrian.test.TestContext.assertQueryReturns(TestContext.java:820) at mondrian.test.ParentChildHierarchyTest.testClosureVsNoClosure(ParentChildHierarchyTest.java:238) 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 junit.framework.TestCase.runTest(TestCase.java:164) at junit.framework.TestCase.runBare(TestCase.java:130) 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:120) at junit.framework.TestSuite.runTest(TestSuite.java:230) at junit.framework.TestSuite.run(TestSuite.java:225) at org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run(JUnit3TestReference.java:130) 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.RolapMember *rlear note 1* at mondrian.rolap.RolapCubeHierarchy$CacheRolapCubeHierarchyMemberReader.readMemberChildren(RolapCubeHierarchy.java:475) at mondrian.rolap.RolapCubeHierarchy$CacheRolapCubeHierarchyMemberReader.getMemberChildren(RolapCubeHierarchy.java:585) at mondrian.rolap.SmartMemberReader.getMemberChildren(SmartMemberReader.java:175) at mondrian.rolap.SmartMemberReader.getMemberChildren(SmartMemberReader.java:165) *rlear note 2* at mondrian.rolap.SqlMemberSource$RolapParentChildMember.getPropertyValue(SqlMemberSource.java:1158) at mondrian.rolap.RolapCubeMember.getPropertyValue(RolapCubeMember.java:223) at mondrian.rolap.RolapMember.getPropertyValue(RolapMember.java:524) at mondrian.olap.fun.BuiltinFunTable$22$1.aggregateChildren(BuiltinFunTable.java:713) at mondrian.olap.fun.BuiltinFunTable$22$1$1.evaluate(BuiltinFunTable.java:700) at mondrian.rolap.RolapEvaluator.evaluateCurrent(RolapEvaluator.java:449) at mondrian.rolap.RolapResult.executeStripe(RolapResult.java:890) at mondrian.rolap.RolapResult.executeStripe(RolapResult.java:1027) at mondrian.rolap.RolapResult.executeStripe(RolapResult.java:1027) at mondrian.rolap.RolapResult.executeBody(RolapResult.java:788) at mondrian.rolap.RolapResult.<init>(RolapResult.java:414) at mondrian.rolap.RolapConnection.execute(RolapConnection.java:560) ... 21 more *rlear note 1* the list parentRolapCubeMemberList is iterated over with the expectation that it contains RolapCubeMember instances. In this particular case though, it contains just a RolapMember (not RolapCubeMember). This is what causes the exception. *rlear note 2* the RolapParentChildMember that is referred to here is actually a RolapParentChildMemberNoClosure, and the significance of the trace at this point is that the 'dataMember' instance variable is a plain RolapMember, not a RolapCubeMember. This is why the ClassCastException happens later in the trace. I tried to 'fix' this issue by modifying the SqlMemberSource.makeMember() method to create the RolapParentChildMemberNoClosure instance with a RolapCubeMember in the constructor instead of a RolapCube, and this works for single-level hierarchies, but, there is a form of recursion that happens in this code section as the hierarchy is traversed finding the Child members, and I can't find a way to ensure that the correct RolapCubeMember is used in the lower levels. Further, I am not certain that this would be the best 'fix'. Rolf
    via by rlear,
  • I'm seeing a problem that is similar to MONDRIAN-762 in two ways. 1) The error raised is "mondrian.rolap.RolapMemberBase cannot be cast to mondrian.rolap.RolapCubeMember" 2) The error occurs only with XMLA (not through MDXQueryServlet) Unlike MONDRIAN-762 however, I was not able to reproduce this problem with the Mondrian demo and FoodMart schema. I have extended the Mondrian demo software to work with our influenza surveillance database. I've created a modified "MDXQueryServlet" that points to our schema, and I've added our catalog to datasources.properties. Here is my XMLA request: <Execute xmlns="urn:schemas-microsoft-com:xml-analysis" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"> <Command> <Statement> SELECT {[Measures].Members} ON COLUMNS, NON EMPTY {[Time].[Week].Members} ON ROWS FROM [Flu] </Statement> </Command> <Properties> <PropertyList> <Catalog>Distribute</Catalog> <DataSourceInfo>Provider=Mondrian;DataSource=Distribute;</DataSourceInfo> <Format>Multidimensional</Format> <Content>SchemaData</Content> </PropertyList> </Properties> </Execute> I am able to consistently reproduce the error after restarting Tomcat, however if I remove the "NON EMPTY" from the statement, the request succeeds. If I then add the "NON EMPTY" back in, the request continues to succeed. If the request fails (with "NON EMPTY" there) and then I remove the "NON EMPTY", the request continues to fail. --------- Here is the Distribute catalog (this stripped down version still reproduces the error): <Schema name="Distribute"> <Cube name="Flu"> <Table name="fact_observation_small"/> <Dimension name="Time" foreignKey="id_dateTimeRange" type="TimeDimension"> <Hierarchy primaryKey="id_dateTimeRange" hasAll="true"> <Table name="cdim_day"/> <Level name="Week" column="weekCdcEnding" uniqueMembers="false" levelType="TimeWeeks" type="String"/> <Level name="Day" column="day" uniqueMembers="false" levelType="TimeDays" type="String"/> </Hierarchy> </Dimension> <Measure name="Value" column="value" aggregator="sum" datatype="Numeric" formatString="#,###.####"/> </Cube> </Schema> -------- Stack trace: [JPivot] 11 Aug 2010 16:27:38,551 ERROR [Session ] mondrian.xmla.XmlaServlet#doPost: Errors when handling XML/A message mondrian.xmla.XmlaException: Mondrian Error:XMLA Execute unparse results error at mondrian.xmla.XmlaHandler.execute(XmlaHandler.java:697) at mondrian.xmla.XmlaHandler.process(XmlaHandler.java:551) at mondrian.xmla.impl.DefaultXmlaServlet.handleSoapBody(DefaultXmlaServlet.java:426) at mondrian.xmla.XmlaServlet.doPost(XmlaServlet.java:329) at javax.servlet.http.HttpServlet.service(HttpServlet.java:647) at javax.servlet.http.HttpServlet.service(HttpServlet.java:729) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188) at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:679) at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:461) at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:364) at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:301) at org.apache.jsp.xmla_jsp._jspService(xmla_jsp.java:57) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:98) at javax.servlet.http.HttpServlet.service(HttpServlet.java:729) at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:331) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:329) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265) at javax.servlet.http.HttpServlet.service(HttpServlet.java:729) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:172) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:174) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:873) at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665) at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528) at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:689) at java.lang.Thread.run(Thread.java:619) Caused by: java.lang.ClassCastException: mondrian.rolap.RolapMemberBase cannot be cast to mondrian.rolap.RolapCubeMember at mondrian.rolap.RolapCubeHierarchy$CacheRolapCubeHierarchyMemberReader.readMemberChildren(RolapCubeHierarchy.java:569) at mondrian.rolap.RolapCubeHierarchy$CacheRolapCubeHierarchyMemberReader.getMemberChildren(RolapCubeHierarchy.java:679) at mondrian.rolap.SmartMemberReader.getMemberChildren(SmartMemberReader.java:176) at mondrian.rolap.SmartMemberReader.getMemberChildren(SmartMemberReader.java:166) at mondrian.rolap.RolapMemberBase.getPropertyValue(RolapMemberBase.java:356) at mondrian.rolap.RolapMemberBase.getPropertyValue(RolapMemberBase.java:282) at mondrian.rolap.DelegatingRolapMember.getPropertyValue(DelegatingRolapMember.java:105) at mondrian.xmla.XmlaHandler$MDDataSet_Multidimensional.writeMember(XmlaHandler.java:2137) at mondrian.xmla.XmlaHandler$MDDataSet_Multidimensional.axis(XmlaHandler.java:2107) at mondrian.xmla.XmlaHandler$MDDataSet_Multidimensional.axes(XmlaHandler.java:1974) at mondrian.xmla.XmlaHandler$MDDataSet_Multidimensional.unparse(XmlaHandler.java:1784) at mondrian.xmla.XmlaHandler.execute(XmlaHandler.java:690) ... 32 more
    via by Kim Goldov,
  • I'm seeing a problem that is similar to MONDRIAN-762 in two ways. 1) The error raised is "mondrian.rolap.RolapMemberBase cannot be cast to mondrian.rolap.RolapCubeMember" 2) The error occurs only with XMLA (not through MDXQueryServlet) Unlike MONDRIAN-762 however, I was not able to reproduce this problem with the Mondrian demo and FoodMart schema. I have extended the Mondrian demo software to work with our influenza surveillance database. I've created a modified "MDXQueryServlet" that points to our schema, and I've added our catalog to datasources.properties. Here is my XMLA request: <Execute xmlns="urn:schemas-microsoft-com:xml-analysis" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"> <Command> <Statement> SELECT {[Measures].Members} ON COLUMNS, NON EMPTY {[Time].[Week].Members} ON ROWS FROM [Flu] </Statement> </Command> <Properties> <PropertyList> <Catalog>Distribute</Catalog> <DataSourceInfo>Provider=Mondrian;DataSource=Distribute;</DataSourceInfo> <Format>Multidimensional</Format> <Content>SchemaData</Content> </PropertyList> </Properties> </Execute> I am able to consistently reproduce the error after restarting Tomcat, however if I remove the "NON EMPTY" from the statement, the request succeeds. If I then add the "NON EMPTY" back in, the request continues to succeed. If the request fails (with "NON EMPTY" there) and then I remove the "NON EMPTY", the request continues to fail. --------- Here is the Distribute catalog (this stripped down version still reproduces the error): <Schema name="Distribute"> <Cube name="Flu"> <Table name="fact_observation_small"/> <Dimension name="Time" foreignKey="id_dateTimeRange" type="TimeDimension"> <Hierarchy primaryKey="id_dateTimeRange" hasAll="true"> <Table name="cdim_day"/> <Level name="Week" column="weekCdcEnding" uniqueMembers="false" levelType="TimeWeeks" type="String"/> <Level name="Day" column="day" uniqueMembers="false" levelType="TimeDays" type="String"/> </Hierarchy> </Dimension> <Measure name="Value" column="value" aggregator="sum" datatype="Numeric" formatString="#,###.####"/> </Cube> </Schema> -------- Stack trace: [JPivot] 11 Aug 2010 16:27:38,551 ERROR [Session ] mondrian.xmla.XmlaServlet#doPost: Errors when handling XML/A message mondrian.xmla.XmlaException: Mondrian Error:XMLA Execute unparse results error at mondrian.xmla.XmlaHandler.execute(XmlaHandler.java:697) at mondrian.xmla.XmlaHandler.process(XmlaHandler.java:551) at mondrian.xmla.impl.DefaultXmlaServlet.handleSoapBody(DefaultXmlaServlet.java:426) at mondrian.xmla.XmlaServlet.doPost(XmlaServlet.java:329) at javax.servlet.http.HttpServlet.service(HttpServlet.java:647) at javax.servlet.http.HttpServlet.service(HttpServlet.java:729) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188) at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:679) at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:461) at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:364) at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:301) at org.apache.jsp.xmla_jsp._jspService(xmla_jsp.java:57) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:98) at javax.servlet.http.HttpServlet.service(HttpServlet.java:729) at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:331) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:329) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:265) at javax.servlet.http.HttpServlet.service(HttpServlet.java:729) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:172) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:174) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:873) at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665) at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528) at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:689) at java.lang.Thread.run(Thread.java:619) Caused by: java.lang.ClassCastException: mondrian.rolap.RolapMemberBase cannot be cast to mondrian.rolap.RolapCubeMember at mondrian.rolap.RolapCubeHierarchy$CacheRolapCubeHierarchyMemberReader.readMemberChildren(RolapCubeHierarchy.java:569) at mondrian.rolap.RolapCubeHierarchy$CacheRolapCubeHierarchyMemberReader.getMemberChildren(RolapCubeHierarchy.java:679) at mondrian.rolap.SmartMemberReader.getMemberChildren(SmartMemberReader.java:176) at mondrian.rolap.SmartMemberReader.getMemberChildren(SmartMemberReader.java:166) at mondrian.rolap.RolapMemberBase.getPropertyValue(RolapMemberBase.java:356) at mondrian.rolap.RolapMemberBase.getPropertyValue(RolapMemberBase.java:282) at mondrian.rolap.DelegatingRolapMember.getPropertyValue(DelegatingRolapMember.java:105) at mondrian.xmla.XmlaHandler$MDDataSet_Multidimensional.writeMember(XmlaHandler.java:2137) at mondrian.xmla.XmlaHandler$MDDataSet_Multidimensional.axis(XmlaHandler.java:2107) at mondrian.xmla.XmlaHandler$MDDataSet_Multidimensional.axes(XmlaHandler.java:1974) at mondrian.xmla.XmlaHandler$MDDataSet_Multidimensional.unparse(XmlaHandler.java:1784) at mondrian.xmla.XmlaHandler.execute(XmlaHandler.java:690) ... 32 more
    via by Kim Goldov,
  • Sergei Mazin wrote: I got [an exception] when executed the same query above from http://localhost:8080/mondrian/xmlaTest.jsp utility <Execute xmlns="urn:schemas-microsoft-com:xml-analysis"> <Command> <Statement> WITH SET [XL_Row_Dim_0] as 'VisualTotals(Distinct(Hierarchize({ Ascendants([Customers].[All Customers].[USA].[CA].[Beverly Hills].[Ari Tweten]), Descendants([Customers].[All Customers].[USA].[CA].[Beverly Hills].[Ari Tweten]), Ascendants([Customers].[All Customers].[Mexico]), Descendants([Customers].[All Customers].[Mexico]) })))' select NON EMPTY Hierarchize(Intersect(DrilldownMember({{DrilldownMember({{DrilldownLevel({[C ustomers].[All Customers]})}}, {[Customers].[All Customers].[USA]})}}, {[Customers].[All Customers].[USA].[CA]}), [XL_Row_Dim_0])) DIMENSION PROPERTIES PARENT_UNIQUE_NAME ON COLUMNS from [Sales] where [Measures].[Unit Sales] </Statement> </Command> <Properties> <PropertyList> <Catalog>FoodMart</Catalog> <DataSourceInfo>Provider=Mondrian;DataSource=MondrianFoodMart;</DataSourceIn fo> <Format>Multidimensional</Format> <AxisFormat>TupleFormat</AxisFormat> </PropertyList> </Properties> </Execute> mondrian.xmla.XmlaException: Mondrian Error:XMLA Execute unparse results error at mondrian.xmla.XmlaHandler.execute(XmlaHandler.java:704) at mondrian.xmla.XmlaHandler.process(XmlaHandler.java:554) at mondrian.xmla.impl.DefaultXmlaServlet.handleSoapBody(DefaultXmlaServlet.java:415) at mondrian.xmla.XmlaServlet.doPost(XmlaServlet.java:311) at javax.servlet.http.HttpServlet.service(HttpServlet.java:637) at javax.servlet.http.HttpServlet.service(HttpServlet.java:717) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:646) at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:436) at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:342) at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:302) at org.apache.jsp.xmla_jsp._jspService(xmla_jsp.java:68) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70) at javax.servlet.http.HttpServlet.service(HttpServlet.java:717) at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:374) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:342) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:267) at javax.servlet.http.HttpServlet.service(HttpServlet.java:717) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290) 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.core.StandardHostValve.invoke(StandardHostValve.java:128) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) 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:849) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583) at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:454) at java.lang.Thread.run(Thread.java:619) Caused by: java.lang.ClassCastException: mondrian.olap.fun.VisualTotalsFunDef$VisualTotalMember cannot be cast to mondrian.rolap.RolapCubeMember at mondrian.rolap.RolapCubeHierarchy$CacheRolapCubeHierarchyMemberReader.readMemberChildren(RolapCubeHierarchy.java:533) at mondrian.rolap.RolapCubeHierarchy$CacheRolapCubeHierarchyMemberReader.getMemberChildren(RolapCubeHierarchy.java:646) at mondrian.rolap.SmartMemberReader.getMemberChildren(SmartMemberReader.java:176) at mondrian.rolap.SmartMemberReader.getMemberChildren(SmartMemberReader.java:166) at mondrian.rolap.RolapMember.getPropertyValue(RolapMember.java:619) at mondrian.rolap.RolapMember.getPropertyValue(RolapMember.java:545) at mondrian.xmla.XmlaHandler$MDDataSet_Multidimensional.writeMember(XmlaHandler.java:2133) at mondrian.xmla.XmlaHandler$MDDataSet_Multidimensional.axis(XmlaHandler.java:2102) at mondrian.xmla.XmlaHandler$MDDataSet_Multidimensional.axes(XmlaHandler.java:1973) at mondrian.xmla.XmlaHandler$MDDataSet_Multidimensional.unparse(XmlaHandler.java:1788) at mondrian.xmla.XmlaHandler.execute(XmlaHandler.java:698) ... 30 more It got fixed by changing file mondrian/rolap/RolapCubeHierarchy.java: /* old final List<RolapCubeMember> parentRolapCubeMemberList = Util.cast(parentMembers); for (RolapCubeMember member : parentRolapCubeMemberList) { lookup.put( getUniqueNameForMemberWithoutHierarchy( member.getRolapMember()), member); rolapParents.add(member.getRolapMember()); } */ //new for (Object o : parentMembers) { if(o instanceof VisualTotalMember) { // always skip VisualTotalMembers continue; } else { RolapCubeMember member = (RolapCubeMember)o; lookup.put( getUniqueNameForMemberWithoutHierarchy( member.getRolapMember()), member); rolapParents.add(member.getRolapMember()); } }
    via by Julian Hyde,
    • mondrian.olap.MondrianException: Mondrian Error:Internal error: Error while executing query [select {[Measures].[Count]} ON COLUMNS, NON EMPTY {[Employees].AllMembers} ON ROWS from [HR4C] ] at mondrian.resource.MondrianResource$_Def0.ex(MondrianResource.java:811) at mondrian.olap.Util.newInternal(Util.java:1472) at mondrian.olap.Util.newError(Util.java:1488) at mondrian.rolap.RolapConnection.execute(RolapConnection.java:589) at mondrian.test.TestContext.executeQuery(TestContext.java:478) at mondrian.test.TestContext.assertQueryReturns(TestContext.java:820) at mondrian.test.ParentChildHierarchyTest.testClosureVsNoClosure(ParentChildHierarchyTest.java:238) 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 junit.framework.TestCase.runTest(TestCase.java:164) at junit.framework.TestCase.runBare(TestCase.java:130) 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:120) at junit.framework.TestSuite.runTest(TestSuite.java:230) at junit.framework.TestSuite.run(TestSuite.java:225) at org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run(JUnit3TestReference.java:130) 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.RolapMember *rlear note 1* at mondrian.rolap.RolapCubeHierarchy$CacheRolapCubeHierarchyMemberReader.readMemberChildren(RolapCubeHierarchy.java:475) at mondrian.rolap.RolapCubeHierarchy$CacheRolapCubeHierarchyMemberReader.getMemberChildren(RolapCubeHierarchy.java:585) at mondrian.rolap.SmartMemberReader.getMemberChildren(SmartMemberReader.java:175) at mondrian.rolap.SmartMemberReader.getMemberChildren(SmartMemberReader.java:165)
    No Bugmate found.