Dear folks,
I'm facing a strange issue whilst using CDA with pentaho-bi-ce 4.8.0 and cda 13.09.10.
My CDA-File looks like this:
For the default values, I get no error using the Query-Url of the CDA file. But if I change the parameters, no matter of month or year, to an existing value, I get an Status 500 Error. In the Logfile I see the following Error:
If I copy the Query and execute it in saiku, it works perfectly and as expected.
I checked the Datatype of the fields which get aggregated in my RDBMS, everything related to this query should be Integer so I don't understand the problem at all.
I changed the Parameter type to String, with almost no effect.
Sometimes it works for some month/year combinations, sometimes not o.O
Please let me know if you have any suggestions!
Kind Regards
I'm facing a strange issue whilst using CDA with pentaho-bi-ce 4.8.0 and cda 13.09.10.
My CDA-File looks like this:
Code:
<?xml version="1.0" encoding="utf-8"?>
<CDADescriptor>
<DataSources>
<Connection id="1" type="mondrian.jndi">
<Jndi>combinedCubes</Jndi>
<Catalog>../combinedCubes/Combined_Cubes.xml</Catalog>
<Cube>VirtualCube</Cube>
</Connection>
</DataSources>
<DataAccess id="1" connection="1" type="mdx" access="public" cache="true">
<Name>Delays by Fleet and Month</Name>
<Query>
SELECT
NON EMPTY {[Measures].[DLY]} ON COLUMNS,
NON EMPTY {Hierarchize({[FLEET].[TYPE].Members})} ON ROWS
FROM [VirtualCube]
WHERE {[DATE].[${year}].[${month}]}
</Query>
<Parameters>
<Parameter name="year" type="Integer" default="2011"/>
<Parameter name="month" type="Integer" default="1"/>
</Parameters>
<Columns>
<Column idx="1">
<Name>Fleet-Type</Name>
</Column>
<Column idx="2">
<Name>Number of Delays</Name>
</Column>
</Columns>
<Output indexes="1,2"/>
</DataAccess>
</CDADescriptor>
Code:
2013-12-16 16:18:37,535 ERROR [pt.webdetails.cda.CdaContentGenerator] doQuery: Mondrian Error:Internal error: Error while executing query [select NON EMPTY {[Measures].[DLY]} ON COLUMNS,
NON EMPTY {Hierarchize({[FLEET].[TYPE].Members})} ON ROWS
from [VirtualCube]
where {[DATE].[2011].[2]}
]
pt.webdetails.cda.dataaccess.QueryException: Mondrian Error:Internal error: Error while executing query [select NON EMPTY {[Measures].[DLY]} ON COLUMNS,
NON EMPTY {Hierarchize({[FLEET].[TYPE].Members})} ON ROWS
from [VirtualCube]
where {[DATE].[2011].[2]}
]
at pt.webdetails.cda.dataaccess.PREDataAccess.performRawQuery(PREDataAccess.java:178)
at pt.webdetails.cda.dataaccess.MdxDataAccess.performRawQuery(MdxDataAccess.java:310)
at pt.webdetails.cda.dataaccess.SimpleDataAccess.queryDataSource(SimpleDataAccess.java:127)
at pt.webdetails.cda.dataaccess.AbstractDataAccess.doQuery(AbstractDataAccess.java:263)
at pt.webdetails.cda.CdaEngine.doQuery(CdaEngine.java:77)
at pt.webdetails.cda.CdaCoreService.doQuery(CdaCoreService.java:187)
at pt.webdetails.cda.CdaContentGenerator.doQuery(CdaContentGenerator.java:98)
at sun.reflect.GeneratedMethodAccessor148.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at pt.webdetails.cpf.SimpleContentGenerator.invokeMethod(SimpleContentGenerator.java:324)
at pt.webdetails.cpf.SimpleContentGenerator.createContent(SimpleContentGenerator.java:158)
at org.pentaho.platform.web.servlet.GenericServlet.doGet(GenericServlet.java:261)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
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.pentaho.platform.web.http.filters.PentahoWebContextFilter.doFilter(PentahoWebContextFilter.java:142)
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:84)
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.pentaho.platform.web.http.security.SecurityStartupFilter.doFilter(SecurityStartupFilter.java:103)
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.pentaho.platform.web.http.security.RequestParameterAuthenticationFilter.doFilter(RequestParameterAuthenticationFilter.java:169)
at org.springframework.security.util.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:390)
at org.springframework.security.ui.basicauth.BasicProcessingFilter.doFilterHttp(BasicProcessingFilter.java:174)
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.AbstractProcessingFilter.doFilterHttp(AbstractProcessingFilter.java:278)
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.logout.LogoutFilter.doFilterHttp(LogoutFilter.java:89)
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.security.HttpSessionReuseDetectionFilter.doFilter(HttpSessionReuseDetectionFilter.java:134)
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.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:60)
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:113)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at com.thetransactioncompany.cors.CORSFilter.doFilter(CORSFilter.java:168)
at com.thetransactioncompany.cors.CORSFilter.doFilter(CORSFilter.java:233)
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:102)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
at org.apache.coyote.http11.Http11AprProcessor.process(Http11AprProcessor.java:861)
at org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.process(Http11AprProtocol.java:579)
at org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:1584)
at java.lang.Thread.run(Thread.java:724)
Caused by: mondrian.olap.MondrianException: Mondrian Error:Internal error: Error while executing query [select NON EMPTY {[Measures].[DLY]} ON COLUMNS,
NON EMPTY {Hierarchize({[FLEET].[TYPE].Members})} ON ROWS
from [VirtualCube]
where {[DATE].[2011].[2]}
]
at mondrian.resource.MondrianResource$_Def0.ex(MondrianResource.java:967)
at mondrian.olap.Util.newInternal(Util.java:2400)
at mondrian.olap.Util.newError(Util.java:2416)
at mondrian.rolap.RolapConnection.executeInternal(RolapConnection.java:715)
at mondrian.rolap.RolapConnection.access$000(RolapConnection.java:51)
at mondrian.rolap.RolapConnection$1.call(RolapConnection.java:631)
at mondrian.rolap.RolapConnection$1.call(RolapConnection.java:630)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
at java.util.concurrent.FutureTask.run(FutureTask.java:166)
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.ClassCastException: java.lang.Double cannot be cast to java.lang.Integer
at mondrian.rolap.RolapAggregator$1.aggregate(RolapAggregator.java:61)
at mondrian.rolap.agg.SegmentBuilder.rollup(SegmentBuilder.java:386)
at mondrian.rolap.FastBatchingCellReader.loadAggregations(FastBatchingCellReader.java:296)
at mondrian.rolap.RolapResult.phase(RolapResult.java:505)
at mondrian.rolap.RolapResult.executeBody(RolapResult.java:865)
at mondrian.rolap.RolapResult.<init>(RolapResult.java:452)
at mondrian.rolap.RolapConnection.executeInternal(RolapConnection.java:680)
... 8 more
I checked the Datatype of the fields which get aggregated in my RDBMS, everything related to this query should be Integer so I don't understand the problem at all.
I changed the Parameter type to String, with almost no effect.
Sometimes it works for some month/year combinations, sometimes not o.O
Please let me know if you have any suggestions!
Kind Regards