US and Worldwide: +1 (866) 660-7555
Results 1 to 3 of 3

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

  1. #1
    Join Date
    Jan 2011
    Posts
    4

    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.2.1.13885, 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.

    Thanks,
    Suriya

  2. #2
    Join Date
    Apr 2008
    Posts
    2,633

    Default

    Could you post the steps you used to connect your Mondrian to ADOMD?
    **THIS IS A SIGNATURE - IT GETS POSTED ON (ALMOST) EVERY POST**
    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
    Posts
    4

    Default

    Hi,

    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, (http://www.microsoft.com/en-us/downl....aspx?id=11988)
    X86 Package (SQLServer2005_ADOMD.msi)
    X64 Package (SQLServer2005_ADOMD_x64.msi)
    IA64 Package (SQLServer2005_ADOMD_ia64.msi)

    For Visual Studio 2010 Applications, (http://www.microsoft.com/en-in/downl...s.aspx?id=6375)
    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,
    [C#]
    AdomdConnection con = new AdomdConnection("Data Source=http://localhost:8080/mondrian/xmla; Initial Catalog=FoodMart;");
    con.Open();

    Step 3: Form an AdomdCommand object with sample MDX Query,
    [C#]
    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.
    [C#]
    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.

    Regards,
    Suriya
    Last edited by suriyasoft; 06-13-2013 at 02:44 AM. Reason: Grammatical changes

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
  •