When running the latest code (as of 2105-10-14), loading the FoodMart.xml catalog with a Derby database (but probably unrelated) fails with the following stack trace:
mondrian.olap.MondrianException: Mondrian Error:Calculated member or named set in cube 'Warehouse and Sales' has bad formula
at mondrian.resource.MondrianResource$_Def0.ex(MondrianResource.java:992)
at mondrian.rolap.RolapSchemaLoader.resolveCalcMembers(RolapSchemaLoader.java:4730)
at mondrian.rolap.RolapSchemaLoader.createCalcMembersAndNamedSets(RolapSchemaLoader.java:4655)
at mondrian.rolap.RolapSchemaLoader.createCube(RolapSchemaLoader.java:1918)
at mondrian.rolap.RolapSchemaLoader.loadStage2(RolapSchemaLoader.java:419)
at mondrian.rolap.RolapSchemaLoader.loadStage1(RolapSchemaLoader.java:335)
at mondrian.rolap.RolapSchemaLoader.loadStage0(RolapSchemaLoader.java:271)
at mondrian.rolap.RolapSchemaLoader.createSchema(RolapSchemaLoader.java:4302)
at mondrian.rolap.RolapSchemaPool.get(RolapSchemaPool.java:210)
at mondrian.rolap.RolapSchemaPool.get(RolapSchemaPool.java:62)
at mondrian.rolap.RolapConnection.(RolapConnection.java:160)
at mondrian.rolap.RolapConnection.(RolapConnection.java:84)
at mondrian.olap.DriverManager.getConnection(DriverManager.java:113)
at mondrian.olap.DriverManager.getConnection(DriverManager.java:68)
at mondrian.olap4j.MondrianOlap4jConnection.(MondrianOlap4jConnection.java:155)
at mondrian.olap4j.FactoryJdbc4Plus$AbstractConnection.(FactoryJdbc4Plus.java:323)
at mondrian.olap4j.FactoryJdbc41Impl$MondrianOlap4jConnectionJdbc41.(FactoryJdbc41Impl.java:105)
at mondrian.olap4j.FactoryJdbc41Impl.newConnection(FactoryJdbc41Impl.java:32)
at mondrian.olap4j.MondrianOlap4jDriver.connect(MondrianOlap4jDriver.java:139)
at java.sql.DriverManager.getConnection(DriverManager.java:664)
at java.sql.DriverManager.getConnection(DriverManager.java:270)
at sage.store.cube.TestFoodmartDerbyDataSource.testCreateMondrianConnection(TestFoodmartDerbyDataSource.java:74)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47)
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44)
at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:271)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:70)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229)
at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)
at org.junit.runners.ParentRunner.run(ParentRunner.java:309)
at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:50)
at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)
Caused by: mondrian.olap.MondrianException: Mondrian Error:Failed to parse query 'WITH
MEMBER [Measures].[Measures].[Profit]
AS '[Measures].[Store Sales] - [Measures].[Store Cost]',
FORMAT_STRING = "$#,##0.00",
[$member_scope] = 'CUBE',
MEMBER_ORDINAL = 11
MEMBER [Measures].[Measures].[Profit Growth]
AS '([Measures].[Profit] - [Measures].[Profit last Period]) / [Measures].[Profit last Period]',
FORMAT_STRING = "0.0%",
[$member_scope] = 'CUBE',
MEMBER_ORDINAL = 12
MEMBER [Measures].[Measures].[Average Warehouse Sale]
AS '[Measures].[Warehouse Sales] / [Measures].[Warehouse Cost]',
FORMAT_STRING = "$#,##0.00",
[$member_scope] = 'CUBE',
MEMBER_ORDINAL = 13
MEMBER [Measures].[Measures].[Profit Per Unit Shipped]
AS '[Measures].[Profit] / [Measures].[Units Shipped]',
[$member_scope] = 'CUBE',
MEMBER_ORDINAL = 14
SELECT FROM [Warehouse and Sales]'
at mondrian.resource.MondrianResource$_Def0.ex(MondrianResource.java:992)
at mondrian.olap.ConnectionBase.parseStatement(ConnectionBase.java:100)
at mondrian.rolap.RolapConnection.parseStatement(RolapConnection.java:589)
at mondrian.olap.ConnectionBase.parseQuery(ConnectionBase.java:55)
at mondrian.rolap.RolapSchemaLoader$9.execute(RolapSchemaLoader.java:4723)
at mondrian.rolap.RolapSchemaLoader$9.execute(RolapSchemaLoader.java:1)
at mondrian.server.Locus.execute(Locus.java:88)
at mondrian.server.Locus.execute(Locus.java:73)
at mondrian.rolap.RolapSchemaLoader.resolveCalcMembers(RolapSchemaLoader.java:4718)
... 44 more
Caused by: mondrian.olap.MondrianException: Mondrian Error:MDX object '[Measures].[Profit last Period]' not found in cube 'Warehouse and Sales'
at mondrian.resource.MondrianResource$_Def1.ex(MondrianResource.java:1009)
at mondrian.olap.Util.lookup(Util.java:990)
at mondrian.olap.Id.accept(Id.java:111)
at mondrian.olap.ValidatorImpl.validate(ValidatorImpl.java:79)
at mondrian.olap.fun.FunUtil.resolveFunArgs(FunUtil.java:1995)
at mondrian.mdx.UnresolvedFunCall.accept(UnresolvedFunCall.java:103)
at mondrian.olap.ValidatorImpl.validate(ValidatorImpl.java:79)
at mondrian.olap.fun.FunUtil.resolveFunArgs(FunUtil.java:1995)
at mondrian.mdx.UnresolvedFunCall.accept(UnresolvedFunCall.java:103)
at mondrian.olap.ValidatorImpl.validate(ValidatorImpl.java:79)
at mondrian.olap.fun.FunUtil.resolveFunArgs(FunUtil.java:1995)
at mondrian.mdx.UnresolvedFunCall.accept(UnresolvedFunCall.java:103)
at mondrian.olap.ValidatorImpl.validate(ValidatorImpl.java:79)
at mondrian.olap.Formula.accept(Formula.java:105)
at mondrian.olap.ValidatorImpl.validate(ValidatorImpl.java:155)
at mondrian.olap.Query.resolve(Query.java:552)
at mondrian.olap.Query.resolve(Query.java:445)
at mondrian.olap.Query.(Query.java:199)
at mondrian.olap.Query.(Query.java:168)
at mondrian.parser.QueryPartFactoryImpl.makeQuery(QueryPartFactoryImpl.java:38)
at mondrian.parser.MdxParserImpl.selectStatement(MdxParserImpl.java:1241)
at mondrian.parser.MdxParserImpl.statement(MdxParserImpl.java:1074)
at mondrian.parser.MdxParserImpl.statementEof(MdxParserImpl.java:188)
at mondrian.parser.JavaccParserValidatorImpl.parseInternal(JavaccParserValidatorImpl.java:57)
at mondrian.olap.ConnectionBase.parseStatement(ConnectionBase.java:97)
... 51 more
When running the latest code (as of 2105-10-14), loading the FoodMart.xml catalog with a Derby database (but probably unrelated) fails with the following stack trace:
mondrian.olap.MondrianException: Mondrian Error:Calculated member or named set in cube 'Warehouse and Sales' has bad formula at mondrian.resource.MondrianResource$_Def0.ex(MondrianResource.java:992) at mondrian.rolap.RolapSchemaLoader.resolveCalcMembers(RolapSchemaLoader.java:4730) at mondrian.rolap.RolapSchemaLoader.createCalcMembersAndNamedSets(RolapSchemaLoader.java:4655) at mondrian.rolap.RolapSchemaLoader.createCube(RolapSchemaLoader.java:1918) at mondrian.rolap.RolapSchemaLoader.loadStage2(RolapSchemaLoader.java:419) at mondrian.rolap.RolapSchemaLoader.loadStage1(RolapSchemaLoader.java:335) at mondrian.rolap.RolapSchemaLoader.loadStage0(RolapSchemaLoader.java:271) at mondrian.rolap.RolapSchemaLoader.createSchema(RolapSchemaLoader.java:4302) at mondrian.rolap.RolapSchemaPool.get(RolapSchemaPool.java:210) at mondrian.rolap.RolapSchemaPool.get(RolapSchemaPool.java:62) at mondrian.rolap.RolapConnection.(RolapConnection.java:160)
at mondrian.rolap.RolapConnection.(RolapConnection.java:84)
at mondrian.olap.DriverManager.getConnection(DriverManager.java:113)
at mondrian.olap.DriverManager.getConnection(DriverManager.java:68)
at mondrian.olap4j.MondrianOlap4jConnection.(MondrianOlap4jConnection.java:155)
at mondrian.olap4j.FactoryJdbc4Plus$AbstractConnection.(FactoryJdbc4Plus.java:323)
at mondrian.olap4j.FactoryJdbc41Impl$MondrianOlap4jConnectionJdbc41.(FactoryJdbc41Impl.java:105)
at mondrian.olap4j.FactoryJdbc41Impl.newConnection(FactoryJdbc41Impl.java:32)
at mondrian.olap4j.MondrianOlap4jDriver.connect(MondrianOlap4jDriver.java:139)
at java.sql.DriverManager.getConnection(DriverManager.java:664)
at java.sql.DriverManager.getConnection(DriverManager.java:270)
at sage.store.cube.TestFoodmartDerbyDataSource.testCreateMondrianConnection(TestFoodmartDerbyDataSource.java:74)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47)
at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44)
at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:271)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:70)
at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50)
at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238)
at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63)
at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236)
at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53)
at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229)
at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)
at org.junit.runners.ParentRunner.run(ParentRunner.java:309)
at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:50)
at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197)
Caused by: mondrian.olap.MondrianException: Mondrian Error:Failed to parse query 'WITH
MEMBER [Measures].[Measures].[Profit]
AS '[Measures].[Store Sales] - [Measures].[Store Cost]',
FORMAT_STRING = "$#,##0.00",
[$member_scope] = 'CUBE',
MEMBER_ORDINAL = 11
MEMBER [Measures].[Measures].[Profit Growth]
AS '([Measures].[Profit] - [Measures].[Profit last Period]) / [Measures].[Profit last Period]',
FORMAT_STRING = "0.0%",
[$member_scope] = 'CUBE',
MEMBER_ORDINAL = 12
MEMBER [Measures].[Measures].[Average Warehouse Sale]
AS '[Measures].[Warehouse Sales] / [Measures].[Warehouse Cost]',
FORMAT_STRING = "$#,##0.00",
[$member_scope] = 'CUBE',
MEMBER_ORDINAL = 13
MEMBER [Measures].[Measures].[Profit Per Unit Shipped]
AS '[Measures].[Profit] / [Measures].[Units Shipped]',
[$member_scope] = 'CUBE',
MEMBER_ORDINAL = 14
SELECT FROM [Warehouse and Sales]'
at mondrian.resource.MondrianResource$_Def0.ex(MondrianResource.java:992)
at mondrian.olap.ConnectionBase.parseStatement(ConnectionBase.java:100)
at mondrian.rolap.RolapConnection.parseStatement(RolapConnection.java:589)
at mondrian.olap.ConnectionBase.parseQuery(ConnectionBase.java:55)
at mondrian.rolap.RolapSchemaLoader$9.execute(RolapSchemaLoader.java:4723)
at mondrian.rolap.RolapSchemaLoader$9.execute(RolapSchemaLoader.java:1)
at mondrian.server.Locus.execute(Locus.java:88)
at mondrian.server.Locus.execute(Locus.java:73)
at mondrian.rolap.RolapSchemaLoader.resolveCalcMembers(RolapSchemaLoader.java:4718)
... 44 more
Caused by: mondrian.olap.MondrianException: Mondrian Error:MDX object '[Measures].[Profit last Period]' not found in cube 'Warehouse and Sales'
at mondrian.resource.MondrianResource$_Def1.ex(MondrianResource.java:1009)
at mondrian.olap.Util.lookup(Util.java:990)
at mondrian.olap.Id.accept(Id.java:111)
at mondrian.olap.ValidatorImpl.validate(ValidatorImpl.java:79)
at mondrian.olap.fun.FunUtil.resolveFunArgs(FunUtil.java:1995)
at mondrian.mdx.UnresolvedFunCall.accept(UnresolvedFunCall.java:103)
at mondrian.olap.ValidatorImpl.validate(ValidatorImpl.java:79)
at mondrian.olap.fun.FunUtil.resolveFunArgs(FunUtil.java:1995)
at mondrian.mdx.UnresolvedFunCall.accept(UnresolvedFunCall.java:103)
at mondrian.olap.ValidatorImpl.validate(ValidatorImpl.java:79)
at mondrian.olap.fun.FunUtil.resolveFunArgs(FunUtil.java:1995)
at mondrian.mdx.UnresolvedFunCall.accept(UnresolvedFunCall.java:103)
at mondrian.olap.ValidatorImpl.validate(ValidatorImpl.java:79)
at mondrian.olap.Formula.accept(Formula.java:105)
at mondrian.olap.ValidatorImpl.validate(ValidatorImpl.java:155)
at mondrian.olap.Query.resolve(Query.java:552)
at mondrian.olap.Query.resolve(Query.java:445)
at mondrian.olap.Query.(Query.java:199)
at mondrian.olap.Query.(Query.java:168)
at mondrian.parser.QueryPartFactoryImpl.makeQuery(QueryPartFactoryImpl.java:38)
at mondrian.parser.MdxParserImpl.selectStatement(MdxParserImpl.java:1241)
at mondrian.parser.MdxParserImpl.statement(MdxParserImpl.java:1074)
at mondrian.parser.MdxParserImpl.statementEof(MdxParserImpl.java:188)
at mondrian.parser.JavaccParserValidatorImpl.parseInternal(JavaccParserValidatorImpl.java:57)
at mondrian.olap.ConnectionBase.parseStatement(ConnectionBase.java:97)
... 51 more