Hitachi Vantara Pentaho Community Forums
Results 1 to 3 of 3

Thread: MeasureExpression Problem

  1. #1

    Default MeasureExpression Problem

    Hi,

    Despite the fact that the embedded SQL works perfectly when tested on the database directly, the following measure definition causes Mondrian to throw an exception (trace at end of post):

    <Measure name="GoodDelay" aggregator="sum" formatString="#,###.00" visible="false">
    <MeasureExpression>
    <SQL dialect="generic">
    (case when Facts.Delay < 20 then 1 else 0 end)
    </SQL>
    </MeasureExpression>
    </Measure>

    It turns out that the use of the '<' operator is the cause of the problem - Mondrian seems to have trouble parsing cube definition when it is present; this problem doesn't occur if that operator is replaced with either '=' or '>'.

    Does anyone know why this happens or how I can fix my measure definition?
    thanks,
    Tom

    Stacktrace:

    Caused by: mondrian.olap.MondrianException: Mondrian Error:Internal error: while parsing catalog jndi:/localhost/mondrian/WEB-INF/queries/FoodMart.xml
    at mondrian.resource.MondrianResource$_Def0.ex(MondrianResource.java:755)
    at mondrian.olap.Util.newInternal(Util.java:1175)
    at mondrian.olap.Util.newError(Util.java:1191)
    at mondrian.rolap.RolapSchema.load(RolapSchema.java:327)
    at mondrian.rolap.RolapSchema.<init>(RolapSchema.java:215)
    at mondrian.rolap.RolapSchema.<init>(RolapSchema.java:208)
    at mondrian.rolap.RolapSchema$Pool.get(RolapSchema.java:872)
    at mondrian.rolap.RolapSchema$Pool.get(RolapSchema.java:689)
    at mondrian.rolap.RolapConnection.<init>(RolapConnection.java:149)
    at mondrian.rolap.RolapConnection.<init>(RolapConnection.java:80)
    at mondrian.olap.DriverManager.getConnection(DriverManager.java:190)
    at mondrian.olap.DriverManager.getConnection(DriverManager.java:131)
    at mondrian.xmla.XmlaHandler.getConnection(XmlaHandler.java:2635)
    at mondrian.xmla.RowsetDefinition$MdschemaCubesRowset.populate(RowsetDefinition.java:3408)
    at mondrian.xmla.Rowset.unparse(Rowset.java:148)
    at mondrian.xmla.XmlaHandler.discover(XmlaHandler.java:2538)
    ... 23 more
    Caused by: org.eigenbase.xom.XOMException: Document parse failed: [Fatal Error] :277:43: The content of elements must consist of well-formed character data or markup.

    at org.eigenbase.xom.wrappers.GenericDOMParser.handleErrors(Unknown Source)
    at org.eigenbase.xom.wrappers.JaxpDOMParser.parseInputSource(Unknown Source)
    at org.eigenbase.xom.wrappers.GenericDOMParser.parse(Unknown Source)
    at mondrian.rolap.RolapSchema.load(RolapSchema.java:303)
    ... 35 more

  2. #2

    Default

    Hi,

    Try :
    < &lt;
    > &gt;
    <= &lt=;
    >= &gt;

    Regards,

    Marc

  3. #3

    Default

    Thanks, Marc
    That fixes my problem.

    Tom

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Privacy Policy | Legal Notices | Safe Harbor Privacy Policy

Copyright © 2005 - 2019 Hitachi Vantara Corporation. All Rights Reserved.