Hitachi Vantara Pentaho Community Forums
Results 1 to 5 of 5

Thread: MDX Query execution on Mondrian 3.5 version with Microsoft ADOMD Client reference

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jan 2011

    Exclamation MDX Query execution on Mondrian 3.5 version with Microsoft ADOMD Client reference

    Hi Team,

    We successfully created an XMLA service for FoodMart data using Mondrian 3.5, My SQL 5.0.88 and Tomcat 6.0, and we tried to connect this service through Microsoft’s ADOMD Client reference and we got the following exception, while executing the following MDX Query (an MDX Query without WHERE Clause).

    MDX query:
    select {[Measures].[Unit Sales], [Measures].[Store Cost], [Measures].[Store Sales]} ON COLUMNS from [Sales]

    Exception details:
    Main exception - The server sent an unrecognizable response.
    Inner exception - 'Element' is an invalid XmlNodeType. Line 236, position 8.

    Stack trace:
    at System.Xml.XmlReader.ReadEndElement()
    at Microsoft.AnalysisServices.AdomdClient.XmlaReader.ReadEndElement()
    at Microsoft.AnalysisServices.AdomdClient.MDDatasetFormatter.ReadMembers(XmlReader reader)
    at Microsoft.AnalysisServices.AdomdClient.MDDatasetFormatter.ReadMDDataset(XmlReader reader)
    at Microsoft.AnalysisServices.AdomdClient.SoapFormatter.ReadDataSetResponsePrivate(XmlReader reader)
    at Microsoft.AnalysisServices.AdomdClient.SoapFormatter.ReadExecuteResponsePrivate(XmlReader reader, InlineErrorHandlingType inlineErrorHandling)
    at Microsoft.AnalysisServices.AdomdClient.SoapFormatter.ReadResponse(XmlReader reader, InlineErrorHandlingType inlineErrorHandling)

    Sample link (We need Microsoft Visual Studio 2008 OR Microsoft Visual Studio 2010 to run this sample)

    Please note that we were not able to reproduce this issue in our existing Mondrian versions (namely, 3.3.0.xxxx) and reproduced when we upgraded to Mondrian version 3.5.

    Further analysis on this issue, we found that each MDX query should have ‘WHERE’ clause to get the cell set without any error through ADOMD Client reference regardless of JPivot environment.

    Please let us know if you have any questions.


  2. #2
    Join Date
    Apr 2008


    Could you post the steps you used to connect your Mondrian to ADOMD?
    I'm no expert.
    Take my comments at your own risk.

    PDI user since PDI 3.1
    PDI on Windows 7 & Linux

    Please keep in mind (and this may not apply to this thread):
    No forum member is going to do your work for you. We will help you sort out how to do a specific part of the work, as best we can, in the timelines that our work will allow us.
    Signature Updated: 2014-06-30

  3. #3
    Join Date
    Jan 2011



    Thanks for your reply and here are the steps to connect Mondrian with ADOMD Client:

    Step 1: Create a console application (using Microsoft Visual Studio 2008/2010) and add a reference called, “Microsoft.AnalysisServices.AdomdClient”.
    (You can get this reference by installing SQL Server feature packs
    For Visual Studio 2008 Applications, (
    X86 Package (SQLServer2005_ADOMD.msi)
    X64 Package (SQLServer2005_ADOMD_x64.msi)
    IA64 Package (SQLServer2005_ADOMD_ia64.msi)

    For Visual Studio 2010 Applications, (
    X86 Package(SQLSERVER2008_ASADOMD10.msi) - 4411 KB
    X64 Package (SQLSERVER2008_ASADOMD10.msi) - 6926 KB
    IA64 Package(SQLSERVER2008_ASADOMD10.msi) - 9420 KB

    Step 2: Initialize a connection for AdomdConnection object with the proper connection string,
    For example,
    AdomdConnection con = new AdomdConnection("Data Source=http://localhost:8080/mondrian/xmla; Initial Catalog=FoodMart;");

    Step 3: Form an AdomdCommand object with sample MDX Query,
    string mdxQuery = @"select {[Measures].[Unit Sales], [Measures].[Store Cost], [Measures].[Store Sales]} ON COLUMNS from [Sales] "; // It will work when we append WHERE ([Time].[1997])
    AdomdCommand cmd = new AdomdCommand(mdxQuery, con);

    Step 4: Try to execute this AdomdCommand and you will get an error as I reported earlier.
    CellSet cellSet = cmd.ExecuteCellSet(); //This line returns an error!, no error in Mondrian 3.2 or 3.3 versions.

    OR, You can download and run the sample(as we sent in earlier thread) in Microsoft Visual Studio IDE.

    Please revert back if you have still any clarifications.

    Last edited by suriyasoft; 06-13-2013 at 01:44 AM. Reason: Grammatical changes

  4. #4


    Hi Team,

    I am facing issue while connecting to mondrian from C# application.
    Visual Studio version - 2015
    Mondrian - mondrian-
    Tomcat - apache-tomcat-7.0.62
    I have followed the same steps as mentioned above. Installed SQLSERVER2008_ASADOMD10.msi (6926 KB) as I am using Windows 7 64 bit OS.

    EDIT - It is NOT mentioned for Visual Studio 2015 Applications. Is it not supported for Visual Studio 2015 ?

    Below is my code;

    public DataTable GetMondrianData(string mdxQuery)
    string connectionString = "Data Source=http://localhost:8080/mondrian/xmla; Initial Catalog=FoodMart;";
    using (AdomdConnection con = new AdomdConnection(connectionString))

    AdomdCommand cmd = new AdomdCommand(mdxQuery, con);
    AdomdDataAdapter da = new AdomdDataAdapter(cmd);
    DataSet dsMondrian = new DataSet();
    da.Fill(dsMondrian, "olap");
    return dtResult;
    catch (Exception ex)
    throw new Exception("An error occurred while fetching mondrian data " + ex.Message);

    In con.Open(); I am getting {"Element 'return' was not found. Line 7, position 4."} error.

    Please let me know how to resolve this issue.

    Last edited by vishwanathbk; 09-12-2016 at 01:44 AM.

  5. #5
    Join Date
    Nov 2016


    The "Element 'return' was not found. Line 7, position 4." error can be solved by adding "ProtectionLevel=NONE;" to your connection string. This tells the connector to connect without authentication information.

    But after this I am getting another error: "Microsoft.AnalysisServices.AdomdClient.AdomdErrorResponseException: XMLA SOAP Body processing error"

    Seems like Mondrian is not supporting anymore. Referencing this answer:

Tags for this Thread

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.