java.lang.ClassCastException

Pentaho BI Platform Tracking | scudderfish | 1 decade ago
  1. 0

    I'm attempting to connect to an Oracle DB via JPivot. Mondrian connects successfully and does run some SQL against it. However, in rendering the table, it blows up with this :- javax.servlet.ServletException: javax.servlet.jsp.JspException: com.tonbeller.jpivot.olap.model.OlapException: mondrian.olap.MondrianException: Mondrian Error:Internal error: Error while executing query [select {[Measures].[cdrs], [Measures].[duration]} ON COLUMNS, {([Period].[Year], [CDRType].[Type])} ON ROWS from [XDRs] ] javax.servlet.ServletException: javax.servlet.jsp.JspException: com.tonbeller.jpivot.olap.model.OlapException: mondrian.olap.MondrianException: Mondrian Error:Internal error: Error while executing query [select {[Measures].[cdrs], [Measures].[duration]} ON COLUMNS, {([Period].[Year], [CDRType].[Type])} ON ROWS from [XDRs] ] at org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:821) at org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:758) at org.apache.jsp.test_jsp._jspService(test_jsp.java:108) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94) at javax.servlet.http.HttpServlet.service(HttpServlet.java:810) at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:298) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236) at javax.servlet.http.HttpServlet.service(HttpServlet.java:810) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:237) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157) at com.tonbeller.wcf.controller.RequestFilter$MyHandler.normalRequest(RequestFilter.java:139) at com.tonbeller.wcf.controller.RequestSynchronizer.handleRequest(RequestSynchronizer.java:127) at com.tonbeller.wcf.controller.RequestFilter.doFilter(RequestFilter.java:263) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:186) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157) at uk.co.cartesian.ascertain.web.session.filter.AscertainSessionFilter.doFilter(AscertainSessionFilter.java:189) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:186) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:214) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520) at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:198) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:152) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:137) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929) at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:793) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:702) at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:571) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:644) at java.lang.Thread.run(Thread.java:534) com.tonbeller.jpivot.olap.model.OlapException: mondrian.olap.MondrianException: Mondrian Error:Internal error: Error while executing query [select {[Measures].[cdrs], [Measures].[duration]} ON COLUMNS, {([Period].[Year], [CDRType].[Type])} ON ROWS from [XDRs] ] com.tonbeller.jpivot.olap.model.OlapException: mondrian.olap.MondrianException: Mondrian Error:Internal error: Error while executing query [select {[Measures].[cdrs], [Measures].[duration]} ON COLUMNS, {([Period].[Year], [CDRType].[Type])} ON ROWS from [XDRs] ] at com.tonbeller.jpivot.mondrian.MondrianModel.getResult(MondrianModel.java:204) at com.tonbeller.jpivot.olap.model.OlapModelDecorator.getResult(OlapModelDecorator.java:54) at com.tonbeller.jpivot.olap.model.CachingOlapModel.getResult(CachingOlapModel.java:48) at com.tonbeller.jpivot.olap.model.OlapModelDecorator.getResult(OlapModelDecorator.java:54) at com.tonbeller.jpivot.table.TableComponent.updateOlapModel(TableComponent.java:245) at com.tonbeller.jpivot.table.TableComponent.render2(TableComponent.java:250) at com.tonbeller.jpivot.table.TableComponent.render(TableComponent.java:234) at com.tonbeller.wcf.component.RendererTag.doEndTag(RendererTag.java:137) at org.apache.jsp.test_jsp._jspx_meth_wcf_render_0(test_jsp.java:219) at org.apache.jsp.test_jsp._jspService(test_jsp.java:97) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94) at javax.servlet.http.HttpServlet.service(HttpServlet.java:810) at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:298) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236) at javax.servlet.http.HttpServlet.service(HttpServlet.java:810) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:237) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157) at com.tonbeller.wcf.controller.RequestFilter$MyHandler.normalRequest(RequestFilter.java:139) at com.tonbeller.wcf.controller.RequestSynchronizer.handleRequest(RequestSynchronizer.java:127) at com.tonbeller.wcf.controller.RequestFilter.doFilter(RequestFilter.java:263) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:186) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157) at uk.co.cartesian.ascertain.web.session.filter.AscertainSessionFilter.doFilter(AscertainSessionFilter.java:189) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:186) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:214) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520) at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:198) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:152) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:137) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929) at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:793) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:702) at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:571) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:644) at java.lang.Thread.run(Thread.java:534) Caused by: mondrian.olap.MondrianException: Mondrian Error:Internal error: Error while executing query [select {[Measures].[cdrs], [Measures].[duration]} ON COLUMNS, {([Period].[Year], [CDRType].[Type])} ON ROWS from [XDRs] ] at mondrian.resource.MondrianResource$_Def0.ex(MondrianResource.java:1030) at mondrian.olap.Util.newInternal(Util.java:893) at mondrian.olap.Util.newError(Util.java:909) at mondrian.rolap.RolapConnection.execute(RolapConnection.java:353) at com.tonbeller.jpivot.mondrian.MondrianModel.getResult(MondrianModel.java:185) ... 47 more Caused by: java.lang.ClassCastException at mondrian.calc.impl.GenericCalc.evaluateMember(GenericCalc.java:61) at mondrian.olap.fun.TupleFunDef$CalcImpl.evaluateTuple(TupleFunDef.java:126) at mondrian.olap.fun.SetFunDef$4.evaluateVoid(SetFunDef.java:174) at mondrian.olap.fun.SetFunDef$SetCalc.evaluateList(SetFunDef.java:189) at mondrian.calc.impl.AbstractListCalc.evaluate(AbstractListCalc.java:45) at mondrian.rolap.RolapResult.executeAxis(RolapResult.java:197) at mondrian.rolap.RolapResult.(RolapResult.java:81) at mondrian.rolap.RolapConnection.execute(RolapConnection.java:330) ... 48 more mondrian.olap.MondrianException: Mondrian Error:Internal error: Error while executing query [select {[Measures].[cdrs], [Measures].[duration]} ON COLUMNS, {([Period].[Year], [CDRType].[Type])} ON ROWS from [XDRs] ] mondrian.olap.MondrianException: Mondrian Error:Internal error: Error while executing query [select {[Measures].[cdrs], [Measures].[duration]} ON COLUMNS, {([Period].[Year], [CDRType].[Type])} ON ROWS from [XDRs] ] at mondrian.resource.MondrianResource$_Def0.ex(MondrianResource.java:1030) at mondrian.olap.Util.newInternal(Util.java:893) at mondrian.olap.Util.newError(Util.java:909) at mondrian.rolap.RolapConnection.execute(RolapConnection.java:353) at com.tonbeller.jpivot.mondrian.MondrianModel.getResult(MondrianModel.java:185) at com.tonbeller.jpivot.olap.model.OlapModelDecorator.getResult(OlapModelDecorator.java:54) at com.tonbeller.jpivot.olap.model.CachingOlapModel.getResult(CachingOlapModel.java:48) at com.tonbeller.jpivot.olap.model.OlapModelDecorator.getResult(OlapModelDecorator.java:54) at com.tonbeller.jpivot.table.TableComponent.updateOlapModel(TableComponent.java:245) at com.tonbeller.jpivot.table.TableComponent.render2(TableComponent.java:250) at com.tonbeller.jpivot.table.TableComponent.render(TableComponent.java:234) at com.tonbeller.wcf.component.RendererTag.doEndTag(RendererTag.java:137) at org.apache.jsp.test_jsp._jspx_meth_wcf_render_0(test_jsp.java:219) at org.apache.jsp.test_jsp._jspService(test_jsp.java:97) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94) at javax.servlet.http.HttpServlet.service(HttpServlet.java:810) at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:298) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236) at javax.servlet.http.HttpServlet.service(HttpServlet.java:810) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:237) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157) at com.tonbeller.wcf.controller.RequestFilter$MyHandler.normalRequest(RequestFilter.java:139) at com.tonbeller.wcf.controller.RequestSynchronizer.handleRequest(RequestSynchronizer.java:127) at com.tonbeller.wcf.controller.RequestFilter.doFilter(RequestFilter.java:263) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:186) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157) at uk.co.cartesian.ascertain.web.session.filter.AscertainSessionFilter.doFilter(AscertainSessionFilter.java:189) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:186) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:214) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520) at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:198) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:152) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:137) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929) at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:793) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:702) at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:571) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:644) at java.lang.Thread.run(Thread.java:534) Caused by: java.lang.ClassCastException at mondrian.calc.impl.GenericCalc.evaluateMember(GenericCalc.java:61) at mondrian.olap.fun.TupleFunDef$CalcImpl.evaluateTuple(TupleFunDef.java:126) at mondrian.olap.fun.SetFunDef$4.evaluateVoid(SetFunDef.java:174) at mondrian.olap.fun.SetFunDef$SetCalc.evaluateList(SetFunDef.java:189) at mondrian.calc.impl.AbstractListCalc.evaluate(AbstractListCalc.java:45) at mondrian.rolap.RolapResult.executeAxis(RolapResult.java:197) at mondrian.rolap.RolapResult.(RolapResult.java:81) at mondrian.rolap.RolapConnection.execute(RolapConnection.java:330) ... 48 more java.lang.ClassCastException java.lang.ClassCastException at mondrian.calc.impl.GenericCalc.evaluateMember(GenericCalc.java:61) at mondrian.olap.fun.TupleFunDef$CalcImpl.evaluateTuple(TupleFunDef.java:126) at mondrian.olap.fun.SetFunDef$4.evaluateVoid(SetFunDef.java:174) at mondrian.olap.fun.SetFunDef$SetCalc.evaluateList(SetFunDef.java:189) at mondrian.calc.impl.AbstractListCalc.evaluate(AbstractListCalc.java:45) at mondrian.rolap.RolapResult.executeAxis(RolapResult.java:197) at mondrian.rolap.RolapResult.(RolapResult.java:81) at mondrian.rolap.RolapConnection.execute(RolapConnection.java:330) at com.tonbeller.jpivot.mondrian.MondrianModel.getResult(MondrianModel.java:185) at com.tonbeller.jpivot.olap.model.OlapModelDecorator.getResult(OlapModelDecorator.java:54) at com.tonbeller.jpivot.olap.model.CachingOlapModel.getResult(CachingOlapModel.java:48) at com.tonbeller.jpivot.olap.model.OlapModelDecorator.getResult(OlapModelDecorator.java:54) at com.tonbeller.jpivot.table.TableComponent.updateOlapModel(TableComponent.java:245) at com.tonbeller.jpivot.table.TableComponent.render2(TableComponent.java:250) at com.tonbeller.jpivot.table.TableComponent.render(TableComponent.java:234) at com.tonbeller.wcf.component.RendererTag.doEndTag(RendererTag.java:137) at org.apache.jsp.test_jsp._jspx_meth_wcf_render_0(test_jsp.java:219) at org.apache.jsp.test_jsp._jspService(test_jsp.java:97) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94) at javax.servlet.http.HttpServlet.service(HttpServlet.java:810) at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:298) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236) at javax.servlet.http.HttpServlet.service(HttpServlet.java:810) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:237) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157) at com.tonbeller.wcf.controller.RequestFilter$MyHandler.normalRequest(RequestFilter.java:139) at com.tonbeller.wcf.controller.RequestSynchronizer.handleRequest(RequestSynchronizer.java:127) at com.tonbeller.wcf.controller.RequestFilter.doFilter(RequestFilter.java:263) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:186) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157) at uk.co.cartesian.ascertain.web.session.filter.AscertainSessionFilter.doFilter(AscertainSessionFilter.java:189) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:186) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:214) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520) at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:198) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:152) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:137) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) at org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929) at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:793) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:702) at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:571) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:644) at java.lang.Thread.run(Thread.java:534) My schema definition is :- <Schema name="Bob"> <Cube name="XDRs"> <Table name="XDR" /> <Dimension name="Period" foreignKey="PERIOD_ID"> <Hierarchy hasAll="false" primaryKey="PERIOD_ID"> <Table name="XDR_PERIOD" /> <Level name="Year" column="YEAR" type="String" uniqueMembers="true" /> <Level name="Quarter" column="QUARTER" type="Numeric" uniqueMembers="false" /> <Level name="Month" column="MONTH" type="Numeric" uniqueMembers="false" /> <Level name="Day" column="DAY" type="Numeric" uniqueMembers="false" /> </Hierarchy> </Dimension> <Dimension name="CDRType" foreignKey="XDR_TYPE_ID"> <Hierarchy hasAll="true" primaryKey="XDR_TYPE_ID"> <Table name="XDR_TYPE" /> <Level name="Type" column="XDR_TYPE" type="String" uniqueMembers="true" /> <Level name="SubType" column="XDR_SUB_TYPE" type="String" uniqueMembers="true" /> </Hierarchy> </Dimension> <Measure name="cdrs" column="CDRS" aggregator="sum" /> <Measure name="duration" column="DURATION" aggregator="sum" /> </Cube> </Schema> And I am querying it within the jsp as :- <jp:mondrianQuery id="query01" jdbcDriver="oracle.jdbc.driver.OracleDriver" jdbcUrl="jdbc:oracle:thin:@localhost:1521:paphdv16" jdbcUser="scott" jdbcPassword="tiger" catalogUri="/WEB-INF/dataModel.xml"> select {Measures.cdrs,Measures.duration} on columns, {(Period.Year,CDRType.Type)} ON rows from XDRs </jp:mondrianQuery> <body> <h1>Test</h1> <jp:table id="table01" query="#{query01}" visible="true"/> <wcf:render ref="table01" xslUri="/WEB-INF/jpivot/table/mdxtable.xsl" xslCache="true"/> <h1>End</h1> I may well have a configuration problem (I'm low on the learning curve), but I find the ClassCastException scary

    Pentaho BI Platform Tracking | 1 decade ago | scudderfish
    java.lang.ClassCastException
  2. 0

    I followed the documentation on Mondrian on how to pass a parameter... See the report attached. Double click on the data source. Select the Data Source connection, SampleData. Preview the query... it will work. Now, try running it in Preview mode. It appears that we need to remove the quotes. Here is the query in the report which allow a default value, [All Products].[Classic Cars]. select Hierarchize(Union(Union(Union(Crossjoin({[Markets].[All Markets].[APAC]}, {[Time].[All Years].[2003], [Time].[All Years].[2004], [Time].[All Years].[2005]}), Crossjoin({[Markets].[All Markets].[EMEA]}, {[Time].[All Years].[2003], [Time].[All Years].[2004], [Time].[All Years].[2005]})), Crossjoin({[Markets].[All Markets].[Japan]}, {[Time].[All Years].[2003], [Time].[All Years].[2004], [Time].[All Years].[2005]})), Crossjoin({[Markets].[All Markets].[NA]}, {[Time].[All Years].[2003], [Time].[All Years].[2004], [Time].[All Years].[2005]}))) ON COLUMNS, Parameter("sLine", [Product], [Product].[All Products].[Classic Cars]) ON ROWS from [SteelWheelsSales] where Parameter("sMeasures",[Measures],[Measures].[Sales]) Error appears in console. mondrian.olap.MondrianException: Mondrian Error:Internal error: Error while executing query [select Hierarchize(Union(Union(Union(Crossjoin({[Markets].[All Markets].[APAC]}, {[Time].[All Years].[2003], [Time].[All Years].[2004], [Time].[All Years].[2005]}), Crossjoin({[Markets].[All Markets].[EMEA]}, {[Time].[All Years].[2003], [Time].[All Years].[2004], [Time].[All Years].[2005]})), Crossjoin({[Markets].[All Markets].[Japan]}, {[Time].[All Years].[2003], [Time].[All Years].[2004], [Time].[All Years].[2005]})), Crossjoin({[Markets].[All Markets].[NA]}, {[Time].[All Years].[2003], [Time].[All Years].[2004], [Time].[All Years].[2005]}))) ON COLUMNS, {Parameter("sLine", [Product], "[Product].[All Products].[Motorcycles]")} ON ROWS from [SteelWheelsSales] where Parameter("sMeasures", [Measures], [Measures].[Sales]) ] 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 org.pentaho.reporting.engine.classic.extensions.datasources.mondrian.AbstractMDXDataFactory.performQuery(AbstractMDXDataFactory.java:238) at org.pentaho.reporting.engine.classic.extensions.datasources.mondrian.BandedMDXDataFactory.queryData(BandedMDXDataFactory.java:41) at org.pentaho.reporting.engine.classic.core.CompoundDataFactory.queryData(CompoundDataFactory.java:101) at org.pentaho.reporting.engine.classic.core.states.CachingDataFactory.queryInternal(CachingDataFactory.java:185) at org.pentaho.reporting.engine.classic.core.states.CachingDataFactory.queryData(CachingDataFactory.java:160) at org.pentaho.reporting.engine.classic.core.states.CascadingDataFactory.queryData(CascadingDataFactory.java:94) at org.pentaho.reporting.engine.classic.core.states.datarow.ReportDataRow.createDataRow(ReportDataRow.java:110) at org.pentaho.reporting.engine.classic.core.states.datarow.DefaultFlowController.performQuery(DefaultFlowController.java:193) at org.pentaho.reporting.engine.classic.core.states.process.ProcessState.<init>(ProcessState.java:237) at org.pentaho.reporting.engine.classic.core.layout.output.AbstractReportProcessor.prepareReportProcessing(AbstractReportProcessor.java:387) at org.pentaho.reporting.engine.classic.core.modules.output.pageable.graphics.PrintReportProcessor.getNumberOfPages(PrintReportProcessor.java:90) at org.pentaho.reporting.engine.classic.core.modules.gui.base.PreviewPane$RepaginationRunnable.run(PreviewPane.java:274) at org.pentaho.reporting.engine.classic.core.util.Worker.run(Worker.java:187) Caused by: java.lang.ClassCastException: java.lang.String at mondrian.calc.impl.GenericCalc.evaluateMember(GenericCalc.java:80) at mondrian.olap.fun.SetFunDef$MemberSetListCalc$2.evaluateVoid(SetFunDef.java:172) at mondrian.olap.fun.SetFunDef$MemberSetListCalc.evaluateMemberList(SetFunDef.java:189) at mondrian.calc.impl.AbstractExpCompiler$MemberListIterCalc.evaluateMemberIterable(AbstractExpCompiler.java:544) at mondrian.calc.impl.AbstractMemberIterCalc.evaluate(AbstractMemberIterCalc.java:55) at mondrian.rolap.RolapResult.executeAxis(RolapResult.java:731) at mondrian.rolap.RolapResult.evalLoad(RolapResult.java:577) at mondrian.rolap.RolapResult.loadMembers(RolapResult.java:552) at mondrian.rolap.RolapResult.<init>(RolapResult.java:269) at mondrian.rolap.RolapConnection.execute(RolapConnection.java:560) ... 13 more IF YOU TAKE THE QUOTES OUT OF THE QUERY IT RUNS FINE!!!!!!! select Hierarchize(Union(Union(Union(Crossjoin({[Markets].[All Markets].[APAC]}, {[Time].[All Years].[2003], [Time].[All Years].[2004], [Time].[All Years].[2005]}), Crossjoin({[Markets].[All Markets].[EMEA]}, {[Time].[All Years].[2003], [Time].[All Years].[2004], [Time].[All Years].[2005]})), Crossjoin({[Markets].[All Markets].[Japan]}, {[Time].[All Years].[2003], [Time].[All Years].[2004], [Time].[All Years].[2005]})), Crossjoin({[Markets].[All Markets].[NA]}, {[Time].[All Years].[2003], [Time].[All Years].[2004], [Time].[All Years].[2005]}))) ON COLUMNS, {Parameter("sLine", [Product], [Product].[All Products].[Motorcycles])} ON ROWS from [SteelWheelsSales] where Parameter("sMeasures", [Measures], [Measures].[Sales])

    Pentaho BI Platform Tracking | 7 years ago | Kurtis Cruzada
    mondrian.olap.MondrianException: Mondrian Error:Internal error: Error while executing query [select Hierarchize(Union(Union(Union(Crossjoin({[Markets].[All Markets].[APAC]}, {[Time].[All Years].[2003], [Time].[All Years].[2004], [Time].[All Years].[2005]}), Crossjoin({[Markets].[All Markets].[EMEA]}, {[Time].[All Years].[2003], [Time].[All Years].[2004], [Time].[All Years].[2005]})), Crossjoin({[Markets].[All Markets].[Japan]}, {[Time].[All Years].[2003], [Time].[All Years].[2004], [Time].[All Years].[2005]})), Crossjoin({[Markets].[All Markets].[NA]}, {[Time].[All Years].[2003], [Time].[All Years].[2004], [Time].[All Years].[2005]}))) ON COLUMNS, {Parameter("sLine", [Product], "[Product].[All Products].[Motorcycles]")} ON ROWS from [SteelWheelsSales] where Parameter("sMeasures", [Measures], [Measures].[Sales]) ]
  3. 0

    I followed the documentation on Mondrian on how to pass a parameter... See the report attached. Double click on the data source. Select the Data Source connection, SampleData. Preview the query... it will work. Now, try running it in Preview mode. It appears that we need to remove the quotes. Here is the query in the report which allow a default value, [All Products].[Classic Cars]. select Hierarchize(Union(Union(Union(Crossjoin({[Markets].[All Markets].[APAC]}, {[Time].[All Years].[2003], [Time].[All Years].[2004], [Time].[All Years].[2005]}), Crossjoin({[Markets].[All Markets].[EMEA]}, {[Time].[All Years].[2003], [Time].[All Years].[2004], [Time].[All Years].[2005]})), Crossjoin({[Markets].[All Markets].[Japan]}, {[Time].[All Years].[2003], [Time].[All Years].[2004], [Time].[All Years].[2005]})), Crossjoin({[Markets].[All Markets].[NA]}, {[Time].[All Years].[2003], [Time].[All Years].[2004], [Time].[All Years].[2005]}))) ON COLUMNS, Parameter("sLine", [Product], [Product].[All Products].[Classic Cars]) ON ROWS from [SteelWheelsSales] where Parameter("sMeasures",[Measures],[Measures].[Sales]) Error appears in console. mondrian.olap.MondrianException: Mondrian Error:Internal error: Error while executing query [select Hierarchize(Union(Union(Union(Crossjoin({[Markets].[All Markets].[APAC]}, {[Time].[All Years].[2003], [Time].[All Years].[2004], [Time].[All Years].[2005]}), Crossjoin({[Markets].[All Markets].[EMEA]}, {[Time].[All Years].[2003], [Time].[All Years].[2004], [Time].[All Years].[2005]})), Crossjoin({[Markets].[All Markets].[Japan]}, {[Time].[All Years].[2003], [Time].[All Years].[2004], [Time].[All Years].[2005]})), Crossjoin({[Markets].[All Markets].[NA]}, {[Time].[All Years].[2003], [Time].[All Years].[2004], [Time].[All Years].[2005]}))) ON COLUMNS, {Parameter("sLine", [Product], "[Product].[All Products].[Motorcycles]")} ON ROWS from [SteelWheelsSales] where Parameter("sMeasures", [Measures], [Measures].[Sales]) ] 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 org.pentaho.reporting.engine.classic.extensions.datasources.mondrian.AbstractMDXDataFactory.performQuery(AbstractMDXDataFactory.java:238) at org.pentaho.reporting.engine.classic.extensions.datasources.mondrian.BandedMDXDataFactory.queryData(BandedMDXDataFactory.java:41) at org.pentaho.reporting.engine.classic.core.CompoundDataFactory.queryData(CompoundDataFactory.java:101) at org.pentaho.reporting.engine.classic.core.states.CachingDataFactory.queryInternal(CachingDataFactory.java:185) at org.pentaho.reporting.engine.classic.core.states.CachingDataFactory.queryData(CachingDataFactory.java:160) at org.pentaho.reporting.engine.classic.core.states.CascadingDataFactory.queryData(CascadingDataFactory.java:94) at org.pentaho.reporting.engine.classic.core.states.datarow.ReportDataRow.createDataRow(ReportDataRow.java:110) at org.pentaho.reporting.engine.classic.core.states.datarow.DefaultFlowController.performQuery(DefaultFlowController.java:193) at org.pentaho.reporting.engine.classic.core.states.process.ProcessState.<init>(ProcessState.java:237) at org.pentaho.reporting.engine.classic.core.layout.output.AbstractReportProcessor.prepareReportProcessing(AbstractReportProcessor.java:387) at org.pentaho.reporting.engine.classic.core.modules.output.pageable.graphics.PrintReportProcessor.getNumberOfPages(PrintReportProcessor.java:90) at org.pentaho.reporting.engine.classic.core.modules.gui.base.PreviewPane$RepaginationRunnable.run(PreviewPane.java:274) at org.pentaho.reporting.engine.classic.core.util.Worker.run(Worker.java:187) Caused by: java.lang.ClassCastException: java.lang.String at mondrian.calc.impl.GenericCalc.evaluateMember(GenericCalc.java:80) at mondrian.olap.fun.SetFunDef$MemberSetListCalc$2.evaluateVoid(SetFunDef.java:172) at mondrian.olap.fun.SetFunDef$MemberSetListCalc.evaluateMemberList(SetFunDef.java:189) at mondrian.calc.impl.AbstractExpCompiler$MemberListIterCalc.evaluateMemberIterable(AbstractExpCompiler.java:544) at mondrian.calc.impl.AbstractMemberIterCalc.evaluate(AbstractMemberIterCalc.java:55) at mondrian.rolap.RolapResult.executeAxis(RolapResult.java:731) at mondrian.rolap.RolapResult.evalLoad(RolapResult.java:577) at mondrian.rolap.RolapResult.loadMembers(RolapResult.java:552) at mondrian.rolap.RolapResult.<init>(RolapResult.java:269) at mondrian.rolap.RolapConnection.execute(RolapConnection.java:560) ... 13 more IF YOU TAKE THE QUOTES OUT OF THE QUERY IT RUNS FINE!!!!!!! select Hierarchize(Union(Union(Union(Crossjoin({[Markets].[All Markets].[APAC]}, {[Time].[All Years].[2003], [Time].[All Years].[2004], [Time].[All Years].[2005]}), Crossjoin({[Markets].[All Markets].[EMEA]}, {[Time].[All Years].[2003], [Time].[All Years].[2004], [Time].[All Years].[2005]})), Crossjoin({[Markets].[All Markets].[Japan]}, {[Time].[All Years].[2003], [Time].[All Years].[2004], [Time].[All Years].[2005]})), Crossjoin({[Markets].[All Markets].[NA]}, {[Time].[All Years].[2003], [Time].[All Years].[2004], [Time].[All Years].[2005]}))) ON COLUMNS, {Parameter("sLine", [Product], [Product].[All Products].[Motorcycles])} ON ROWS from [SteelWheelsSales] where Parameter("sMeasures", [Measures], [Measures].[Sales])

    Pentaho BI Platform Tracking | 7 years ago | Kurtis Cruzada
    mondrian.olap.MondrianException: Mondrian Error:Internal error: Error while executing query [select Hierarchize(Union(Union(Union(Crossjoin({[Markets].[All Markets].[APAC]}, {[Time].[All Years].[2003], [Time].[All Years].[2004], [Time].[All Years].[2005]}), Crossjoin({[Markets].[All Markets].[EMEA]}, {[Time].[All Years].[2003], [Time].[All Years].[2004], [Time].[All Years].[2005]})), Crossjoin({[Markets].[All Markets].[Japan]}, {[Time].[All Years].[2003], [Time].[All Years].[2004], [Time].[All Years].[2005]})), Crossjoin({[Markets].[All Markets].[NA]}, {[Time].[All Years].[2003], [Time].[All Years].[2004], [Time].[All Years].[2005]}))) ON COLUMNS, {Parameter("sLine", [Product], "[Product].[All Products].[Motorcycles]")} ON ROWS from [SteelWheelsSales] where Parameter("sMeasures", [Measures], [Measures].[Sales]) ]
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    ClassCastException : PortableRemoteObject.

    Oracle Community | 1 decade ago | 403765
    java.lang.ClassCastException

    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.ClassCastException

      No message provided

      at mondrian.calc.impl.GenericCalc.evaluateMember()
    2. mondrian.calc.impl
      GenericCalc.evaluateMember
      1. mondrian.calc.impl.GenericCalc.evaluateMember(GenericCalc.java:61)
      1 frame
    3. mondrian.olap.fun
      SetFunDef$SetCalc.evaluateList
      1. mondrian.olap.fun.TupleFunDef$CalcImpl.evaluateTuple(TupleFunDef.java:126)
      2. mondrian.olap.fun.SetFunDef$4.evaluateVoid(SetFunDef.java:174)
      3. mondrian.olap.fun.SetFunDef$SetCalc.evaluateList(SetFunDef.java:189)
      3 frames
    4. mondrian.calc.impl
      AbstractListCalc.evaluate
      1. mondrian.calc.impl.AbstractListCalc.evaluate(AbstractListCalc.java:45)
      1 frame
    5. mondrian.rolap
      RolapConnection.execute
      1. mondrian.rolap.RolapResult.executeAxis(RolapResult.java:197)
      2. mondrian.rolap.RolapResult.<init>(RolapResult.java:81)
      3. mondrian.rolap.RolapConnection.execute(RolapConnection.java:330)
      3 frames
    6. com.tonbeller.jpivot
      TableComponent.render
      1. com.tonbeller.jpivot.mondrian.MondrianModel.getResult(MondrianModel.java:185)
      2. com.tonbeller.jpivot.olap.model.OlapModelDecorator.getResult(OlapModelDecorator.java:54)
      3. com.tonbeller.jpivot.olap.model.CachingOlapModel.getResult(CachingOlapModel.java:48)
      4. com.tonbeller.jpivot.olap.model.OlapModelDecorator.getResult(OlapModelDecorator.java:54)
      5. com.tonbeller.jpivot.table.TableComponent.updateOlapModel(TableComponent.java:245)
      6. com.tonbeller.jpivot.table.TableComponent.render2(TableComponent.java:250)
      7. com.tonbeller.jpivot.table.TableComponent.render(TableComponent.java:234)
      7 frames
    7. com.tonbeller.wcf
      RendererTag.doEndTag
      1. com.tonbeller.wcf.component.RendererTag.doEndTag(RendererTag.java:137)
      1 frame
    8. org.apache.jsp
      test_jsp._jspService
      1. org.apache.jsp.test_jsp._jspx_meth_wcf_render_0(test_jsp.java:219)
      2. org.apache.jsp.test_jsp._jspService(test_jsp.java:97)
      2 frames
    9. GWT dev
      HttpJspBase.service
      1. org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)
      1 frame
    10. JavaServlet
      HttpServlet.service
      1. javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
      1 frame
    11. GWT dev
      JspServlet.service
      1. org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:298)
      2. org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
      3. org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
      3 frames
    12. JavaServlet
      HttpServlet.service
      1. javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
      1 frame
    13. Glassfish Core
      ApplicationFilterChain.doFilter
      1. org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:237)
      2. org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
      2 frames
    14. com.tonbeller.wcf
      RequestFilter.doFilter
      1. com.tonbeller.wcf.controller.RequestFilter$MyHandler.normalRequest(RequestFilter.java:139)
      2. com.tonbeller.wcf.controller.RequestSynchronizer.handleRequest(RequestSynchronizer.java:127)
      3. com.tonbeller.wcf.controller.RequestFilter.doFilter(RequestFilter.java:263)
      3 frames
    15. Glassfish Core
      ApplicationFilterChain.doFilter
      1. org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:186)
      2. org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
      2 frames
    16. uk.co.cartesian
      AscertainSessionFilter.doFilter
      1. uk.co.cartesian.ascertain.web.session.filter.AscertainSessionFilter.doFilter(AscertainSessionFilter.java:189)
      1 frame
    17. Glassfish Core
      ContainerBase.invoke
      1. org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:186)
      2. org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:157)
      3. org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:214)
      4. org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
      5. org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
      6. org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:198)
      7. org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:152)
      8. org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
      9. org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
      10. org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:137)
      11. org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
      12. org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
      13. org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:102)
      14. org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
      15. org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
      16. org.apache.catalina.core.StandardValveContext.invokeNext(StandardValveContext.java:104)
      17. org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:520)
      18. org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:929)
      18 frames
    18. org.apache.coyote
      CoyoteAdapter.service
      1. org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:160)
      1 frame
    19. Grizzly HTTP
      TcpWorkerThread.runIt
      1. org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:793)
      2. org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:702)
      3. org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:571)
      3 frames
    20. Tomcat Util
      ThreadPool$ControlRunnable.run
      1. org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:644)
      1 frame
    21. Java RT
      Thread.run
      1. java.lang.Thread.run(Thread.java:534)
      1 frame