[Mondrian] same query with NON EMPTY on it causes Internal error: cannot restrict SQL to calculated member
Pedro Alves
pedro at neraka.no-ip.org
Mon Jul 14 10:22:09 EDT 2008
Hello.
I stumbled into this error: Caused by: mondrian.olap.MondrianException:
Mondrian Error:Internal error: cannot restrict SQL to calculated member
I have a query that works 100% of the times:
select {[Measures].[Total Proveito]} ON COLUMNS,
non empty Descendants([Empresas].[Todas], [Empresas].[Empresa]) ON ROWS
from [Resumo Final]
if I add a non empty statement I get this:
Caused by: java.lang.RuntimeException: com.tonbeller.jpivot.olap.model.OlapException: mondrian.olap.MondrianException: Mondrian Error:Inte
rnal error: Error while executing query [select {[Measures].[Total Proveito]} ON COLUMNS,
NON EMPTY Descendants([Empresas].[Todas], [Empresas].[Empresa]) ON ROWS
from [Resumo Final]
]
at com.tonbeller.jpivot.mondrian.MondrianModel.getCurrentMdx(MondrianModel.java:860)
at com.tonbeller.jpivot.mondrian.MondrianMdxQuery.getMdxQuery(MondrianMdxQuery.java:36)
... 87 more
Caused by: com.tonbeller.jpivot.olap.model.OlapException: mondrian.olap.MondrianException: Mondrian Error:Internal error: Error while exec
uting query [select {[Measures].[Total Proveito]} ON COLUMNS,
NON EMPTY Descendants([Empresas].[Todas], [Empresas].[Empresa]) ON ROWS
from [Resumo Final]
]
at com.tonbeller.jpivot.mondrian.MondrianModel.getResult(MondrianModel.java:305)
at com.tonbeller.jpivot.mondrian.MondrianModel.getCurrentMdx(MondrianModel.java:857)
... 88 more
Caused by: mondrian.olap.MondrianException: Mondrian Error:Internal error: Error while executing query [select {[Measures].[Total Proveito
]} ON COLUMNS,
NON EMPTY Descendants([Empresas].[Todas], [Empresas].[Empresa]) ON ROWS
from [Resumo Final]
]
at mondrian.resource.MondrianResource$_Def0.ex(MondrianResource.java:790)
at mondrian.olap.Util.newInternal(Util.java:1426)
at mondrian.olap.Util.newError(Util.java:1442)
at mondrian.rolap.RolapConnection.execute(RolapConnection.java:471)
at com.tonbeller.jpivot.mondrian.MondrianModel.getResult(MondrianModel.java:279)
... 89 more
Caused by: mondrian.olap.MondrianException: Mondrian Error:Internal error: cannot restrict SQL to calculated member
at mondrian.resource.MondrianResource$_Def0.ex(MondrianResource.java:787)
at mondrian.olap.Util.newInternal(Util.java:1419)
at mondrian.rolap.SqlContextConstraint.addMemberConstraint(SqlContextConstraint.java:222)
at mondrian.rolap.SqlMemberSource.makeChildMemberSql(SqlMemberSource.java:506)
at mondrian.rolap.SqlMemberSource.getMemberChildren2(SqlMemberSource.java:719)
at mondrian.rolap.SqlMemberSource.getMemberChildren(SqlMemberSource.java:653)
at mondrian.rolap.SqlMemberSource.getMemberChildren(SqlMemberSource.java:628)
at mondrian.rolap.SmartMemberReader.readMemberChildren(SmartMemberReader.java:237)
at mondrian.rolap.RolapCubeHierarchy$RolapCubeHierarchyMemberReader.readMemberChildren(RolapCubeHierarchy.java:470)
(...)
Sometimes (don't know when) this starts working. After restarting the
server, the error restarts.
Any tips?
--
Pedro Alves
More information about the Mondrian
mailing list