[Mondrian] Error running tests against foodmart db

Matt Campbell mcampbell at pentaho.com
Wed Jul 31 09:58:39 EDT 2013


Hi Rachel,
Verify your foodmart database is up and running, and your test connection information is correct in mondrian.properties.

   java.sql.SQLSyntaxErrorException: Table/View 'time_by_day' does not exist.



On 07/31/2013 09:54 AM, Chacko, Rachel (Truven Health) wrote:
I’m getting the error below trying to run the tests in mondrian 3.2 against the foodmart database. I see the same error with all tests and seem to be happening on setup. Any help is appreciated.

mondrian.olap.MondrianException: Mondrian Error:Named set in cube 'Sales' has bad formula
                at mondrian.resource.MondrianResource$_Def0.ex(MondrianResource.java:821)
                at mondrian.rolap.RolapCube.resolveCalcMembers(RolapCube.java:876)
                at mondrian.rolap.RolapCube.createCalcMembersAndNamedSets(RolapCube.java:816)
                at mondrian.rolap.RolapCube.init(RolapCube.java:761)
                at mondrian.rolap.RolapCube.<init>(RolapCube.java:277)
                at mondrian.rolap.RolapSchema.load(RolapSchema.java:426)
                at mondrian.rolap.RolapSchema.load(RolapSchema.java:310)
                at mondrian.rolap.RolapSchema.<init>(RolapSchema.java:221)
                at mondrian.rolap.RolapSchema.<init>(RolapSchema.java:214)
                at mondrian.rolap.RolapSchema$Pool.get(RolapSchema.java:973)
                at mondrian.rolap.RolapSchema$Pool.get(RolapSchema.java:757)
                at mondrian.rolap.RolapConnection.<init>(RolapConnection.java:166)
                at mondrian.rolap.RolapConnection.<init>(RolapConnection.java:95)
                at mondrian.olap.DriverManager.getConnection(DriverManager.java:110)
                at mondrian.olap.DriverManager.getConnection(DriverManager.java:74)
                at mondrian.test.TestContext.getFoodMartConnection(TestContext.java:236)
                at mondrian.test.TestContext.getConnection(TestContext.java:209)
                at mondrian.test.TestContext.executeQuery(TestContext.java:515)
                at mondrian.test.TestContext.assertQueryReturns(TestContext.java:1053)
                at mondrian.test.FoodMartTestCase.assertQueryReturns(FoodMartTestCase.java:125)
                at mondrian.test.BasicQueryTest.testSample0(BasicQueryTest.java:445)
                at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
                at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
                at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
                at java.lang.reflect.Method.invoke(Unknown Source)
                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: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].[Profit]
  AS '[Measures].[Store Sales] - [Measures].[Store Cost]',
FORMAT_STRING = "$#,##0.00",
[$member_scope] = 'CUBE',
MEMBER_ORDINAL = 6
MEMBER [Measures].[Profit last Period]
  AS 'COALESCEEMPTY((Measures.[Profit], [Time].[Time].PREVMEMBER),    Measures.[Profit])',
FORMAT_STRING = "$#,##0.00",
MEMBER_ORDINAL = 18,
[$member_scope] = 'CUBE'
MEMBER [Measures].[Profit Growth]
  AS '([Measures].[Profit] - [Measures].[Profit last Period]) / [Measures].[Profit last Period]',
FORMAT_STRING = "0.0%",
[$member_scope] = 'CUBE',
MEMBER_ORDINAL = 8
SELECT FROM [Sales]'
                at mondrian.resource.MondrianResource$_Def0.ex(MondrianResource.java:821)
                at mondrian.olap.ConnectionBase.parseQuery(ConnectionBase.java:137)
                at mondrian.olap.ConnectionBase.parseQuery(ConnectionBase.java:63)
                at mondrian.rolap.RolapCube.resolveCalcMembers(RolapCube.java:874)
                ... 37 more
Caused by: mondrian.olap.MondrianException: Mondrian Error:Error while parsing MDX statement 'WITH
MEMBER [Measures].[Profit]
  AS '[Measures].[Store Sales] - [Measures].[Store Cost]',
FORMAT_STRING = "$#,##0.00",
[$member_scope] = 'CUBE',
MEMBER_ORDINAL = 6
MEMBER [Measures].[Profit last Period]
  AS 'COALESCEEMPTY((Measures.[Profit], [Time].[Time].PREVMEMBER),    Measures.[Profit])',
FORMAT_STRING = "$#,##0.00",
MEMBER_ORDINAL = 18,
[$member_scope] = 'CUBE'
MEMBER [Measures].[Profit Growth]
  AS '([Measures].[Profit] - [Measures].[Profit last Period]) / [Measures].[Profit last Period]',
FORMAT_STRING = "0.0%",
[$member_scope] = 'CUBE',
MEMBER_ORDINAL = 8
SELECT FROM [Sales]'
                at mondrian.resource.MondrianResource$_Def0.ex(MondrianResource.java:821)
                at mondrian.olap.Parser.parseInternal(Parser.java:784)
                at mondrian.olap.ConnectionBase.parseQuery(ConnectionBase.java:134)
                ... 39 more
Caused by: mondrian.olap.MondrianException: Mondrian Error:Internal error: Populating member cache with members for [[Time].[Year]]; sql=[select "time_by_day"."the_year" from "time_by_day" as "time_by_day" group by "time_by_day"."the_year" order by "time_by_day"."the_year" ASC]
                at mondrian.resource.MondrianResource$_Def0.ex(MondrianResource.java:821)
                at mondrian.olap.Util.newInternal(Util.java:1514)
                at mondrian.olap.Util.newError(Util.java:1530)
                at mondrian.rolap.SqlStatement.handle(SqlStatement.java:249)
                at mondrian.rolap.SqlStatement.execute(SqlStatement.java:169)
                at mondrian.rolap.RolapUtil.executeQuery(RolapUtil.java:228)
                at mondrian.rolap.SqlTupleReader.prepareTuples(SqlTupleReader.java:373)
                at mondrian.rolap.SqlTupleReader.readTuples(SqlTupleReader.java:520)
                at mondrian.rolap.SqlMemberSource.getMembersInLevel(SqlMemberSource.java:480)
                at mondrian.rolap.SqlMemberSource.getMembersInLevel(SqlMemberSource.java:467)
                at mondrian.rolap.SmartMemberReader.getMembersInLevel(SmartMemberReader.java:147)
                at mondrian.rolap.RolapCubeHierarchy$CacheRolapCubeHierarchyMemberReader.getMembersInLevel(RolapCubeHierarchy.java:678)
                at mondrian.rolap.RolapSchemaReader.getLevelMembers(RolapSchemaReader.java:479)
                at mondrian.rolap.RolapSchemaReader.getLevelMembers(RolapSchemaReader.java:464)
                at mondrian.rolap.RolapCube$RolapCubeSchemaReader.getLevelMembers(RolapCube.java:2699)
                at mondrian.rolap.RolapSchemaReader.getHierarchyRootMembers(RolapSchemaReader.java:84)
                at mondrian.olap.Util.lookupHierarchyRootMember(Util.java:910)
                at mondrian.olap.HierarchyBase.lookupChild(HierarchyBase.java:163)
                at mondrian.olap.DimensionBase.lookupChild(DimensionBase.java:109)
                at mondrian.rolap.RolapSchemaReader.getElementChild(RolapSchemaReader.java:356)
                at mondrian.olap.Util.lookupCompound(Util.java:595)
                at mondrian.rolap.RolapSchemaReader.lookupCompound(RolapSchemaReader.java:394)
                at mondrian.olap.DelegatingSchemaReader.lookupCompound(DelegatingSchemaReader.java:112)
                at mondrian.olap.Query$QuerySchemaReader.lookupCompound(Query.java:1575)
                at mondrian.olap.Query$QuerySchemaReader.lookupCompound(Query.java:1546)
                at mondrian.olap.DelegatingSchemaReader.lookupCompound(DelegatingSchemaReader.java:112)
                at mondrian.olap.Query$ScopedSchemaReader.lookupCompound(Query.java:1743)
                at mondrian.olap.DelegatingSchemaReader.lookupCompound(DelegatingSchemaReader.java:104)
                at mondrian.olap.Util.lookup(Util.java:775)
                at mondrian.olap.Id.accept(Id.java:108)
                at mondrian.olap.ValidatorImpl.validate(ValidatorImpl.java:80)
                at mondrian.olap.fun.FunUtil.resolveFunArgs(FunUtil.java:1945)
                at mondrian.mdx.UnresolvedFunCall.accept(UnresolvedFunCall.java:104)
                at mondrian.olap.ValidatorImpl.validate(ValidatorImpl.java:80)
                at mondrian.olap.fun.FunUtil.resolveFunArgs(FunUtil.java:1945)
                at mondrian.mdx.UnresolvedFunCall.accept(UnresolvedFunCall.java:104)
                at mondrian.olap.ValidatorImpl.validate(ValidatorImpl.java:80)
                at mondrian.olap.fun.FunUtil.resolveFunArgs(FunUtil.java:1945)
                at mondrian.mdx.UnresolvedFunCall.accept(UnresolvedFunCall.java:104)
                at mondrian.olap.ValidatorImpl.validate(ValidatorImpl.java:80)
                at mondrian.olap.Formula.accept(Formula.java:110)
                at mondrian.olap.ValidatorImpl.validate(ValidatorImpl.java:156)
                at mondrian.olap.Query.resolve(Query.java:609)
                at mondrian.olap.Query.resolve(Query.java:504)
                at mondrian.olap.Query.<init>(Query.java:252)
                at mondrian.olap.Query.<init>(Query.java:217)
                at mondrian.olap.Parser.makeQuery(Parser.java:877)
                at mondrian.olap.CUP$Parser$actions.CUP$Parser$do_action(Parser.java:1771)
                at mondrian.olap.Parser.do_action(Parser.java:706)
                at java_cup.runtime.lr_parser.parse(lr_parser.java:569)
                at mondrian.olap.Parser.parseInternal(Parser.java:779)
                ... 40 more
Caused by: java.sql.SQLSyntaxErrorException: Table/View 'time_by_day' does not exist.
                at org.apache.derby.impl.jdbc.SQLExceptionFactory40.getSQLException(Unknown Source)
                at org.apache.derby.impl.jdbc.Util.generateCsSQLException(Unknown Source)
                at org.apache.derby.impl.jdbc.TransactionResourceImpl.wrapInSQLException(Unknown Source)
                at org.apache.derby.impl.jdbc.TransactionResourceImpl.handleException(Unknown Source)
                at org.apache.derby.impl.jdbc.EmbedConnection.handleException(Unknown Source)
                at org.apache.derby.impl.jdbc.ConnectionChild.handleException(Unknown Source)
                at org.apache.derby.impl.jdbc.EmbedStatement.execute(Unknown Source)
                at org.apache.derby.impl.jdbc.EmbedStatement.executeQuery(Unknown Source)
                at org.apache.commons.dbcp.DelegatingStatement.executeQuery(DelegatingStatement.java:174)
                at mondrian.rolap.SqlStatement.execute(SqlStatement.java:150)
                ... 86 more
Caused by: java.sql.SQLException: Table/View 'time_by_day' does not exist.
                at org.apache.derby.impl.jdbc.SQLExceptionFactory.getSQLException(Unknown Source)
                at org.apache.derby.impl.jdbc.SQLExceptionFactory40.wrapArgsForTransportAcrossDRDA(Unknown Source)
                ... 96 more

Thanks,
Rachel

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.pentaho.org/pipermail/mondrian/attachments/20130731/8fa5374f/attachment-0001.html 


More information about the Mondrian mailing list