Book: "Pentaho Kettle Solutions", Matt Casters, Roland Bouman, & Jos van Dongen, Wiley 2010 Book: "Pentaho Solutions", Roland Bouman & Jos van Dongen, Wiley 2009

Saturday, March 19, 2016

Need a Mondrian .WAR? Check out XMondrian.

To whom it may concern, this is a quick note to bring the xmondrian project to your attention.

Introduction: Open Source OLAP, Mondrian, Pentaho, and JasperSoft

Mondrian is the open source OLAP engine. Mondrian provides:
  • a multi-dimensional view of a relational database (ROLAP)
  • a MDX query engine
  • Clever, advanced caching layers to speed up OLAP query performance (making it a MOLAP/ROLAN hybrid i.e., HOLAP)
  • Standards compliant OLAP data access by providing XML for Analysis (XML/A) and OLAP4J access APIs
Mondrian was designed and invented by Julian Hyde, who acted as technical and architectural lead of the Mondrian project for many years.

Mondrian was adopted by Pentaho, and is included in the Pentaho BI Stack as Pentaho Analysis Services. Mondrian is also the OLAP engine that ships with the Tibco/JasperSoft Reporting server, and with Meteorite BI's Saiku product.

Running Mondrian Standalone

While Pentaho, Jaspersoft and Meteorite all do a good job of integrating Mondrian inside their respective BI servers, some people would like to run only Mondrian directly in their java servers. The Mondrian project used to make that quite easy, since it shipped a .WAR (web-archive) file containing Mondrian itself, documentation, sample cubes, and the JPivot mondrian client.

Unfortunately, the Mondrian project stopped supporting the .WAR and sample content. This happpened a while ago already, but there are still people that are finding out about it only now. This might have to do with the fact that the Mondrian documentation has not been very well maintained and still refers to the .WAR as if it is part of the Mondrian project.

Introducing XMondrian

I felt the need to have a Mondrian .WAR myself. Main reason is that I created a couple of OLAP client tools myself, and I want to provide potential users with a quick and easy path to check them out. So, I decided to pack them all in a .WAR, together with Mondrian, the Foodmart Sample cube, and an embedded dataset.

The result is called xmondrian which you can find on github.

Getting started with XMondrian

Getting started with XMondrian is easy:
  • Download the .WAR file
  • Deploy to your java server. In theory, the process to do that will be dependent upon which webserver you are running. I tried with Apache Tomcat, Jetty, and Tiny Java Web Server, and for all these products you can simply copy the .WAR to the webapps directory
  • Find the XMondrian homepage by navigating your browser to the xmondrian webapp. For example, suppose you installed Tomcat or Jetty locally, using the default port of 8080, then http://localhost:8080/xmondrian will bring you there.

What's inside XMondrian

Once you're on the XMondrian homepage, you can find more information about what's inside, but I'll summarize below:
  • Mondrian 3.12
  • A web.xml to instantiate and hook up the MondrianXmlaServlet. After installation of xmondrian, your webserver can receive XML/A requests via /xmondrian/xmla
  • HSQLDB embedded database engine
  • Sample Datasets and Schemas Both the Foodmart and Steelwheels datasets are included as embedded hsqldb database in a .jar file. There are predefined Mondrian Schema files for each dataset as well, which specify how these databases are mapped to cubes, measures, dimensions, etc. Finally, there are datasource files that tell mondrian to connect to the sample database and use the respective schema file
  • xmla4js - A javascript XML/A client library. You can use this in browser-based web applications to communicate with Mondrian via the XML/A protocol. Xmla4js ships with code samples as well as API documentation
  • Client Applications
    • XMLash - XML/A Shell: an interactive MDX command line interface for inspecting Mondrian schema objects, an for creating and running MDX queries. (See a demonstration )
    • Xavier - XML/A Visualizer: an interactive OLAP ad-hoc reporting and charting tool with a graphical user interface

The XML/A Shell Application


The XML/A Visualizer Application



I hope this post was useful to you. Please let me know how you get along with the xmondrian .WAR. I'm open to suggestions and I would love to collaborate to make xmondrian better. Please use the github issue tracker to provide your feedback. Thanks for your time and interest.


Macray Leo said...

thank you

Mouadh KAABACHI said...

thank you very mucg !!!!

Mouadh KAABACHI said...

is there a solution to display all soap log results (discover/execute) on the server console on each call??

Roland Bouman said...


check out the WEB-INF/classes dir of the extracted XMondrian web application. You'll notice it has a log4j.xml configuration file.

XMondrian is pre-configured to write mondrian, mdx and sql logs to the logs directory. You should see files in there like mondrian.log, mondrian-mdx.log and mondrian-sql.log

If the log levels are not to your liking you could experiment by changing the settings in the log4j.xml file. If you need advice on how to set the log levels, please find suppport on the mondrian mailing list.

HTH, Roland.

Mouadh KAABACHI said...

You just made my day, thanks a lot

dimas said...

Hi Roland, I took your solution, but got an error at run time, which I can not understand. Could you post the full source code of the solution, not only WAR-file?

Roland Bouman said...

Hi Dimas,

for source code, please checkout the mondrian project That's not my code and I don't think I should redistribute it.

The only thing I'm doing is pulling mondrian jars together. I'm doing that with a simple ant script. It's not particularly valuable to me but it's also not of very high quality that's why I'd rather not share it.

What error message are you getting btw?

dimas said...

I described it on github.

Most likely I have not installed (or not available), some dependencies needed to run... but I can not understand what.

The environment in which I have tried:
Windows; Java 1.7; Tomcat 8.5

Roland Bouman said...

@Dimas, thanks! Let's continue discussion on github.

Nathan said...

Just a note:-

If using Windows; in web.xml relying on the default path for datasources.xml doesn't seem to work.

Uncomment init-param as follows:


Roland Bouman said...

Thanks @Nathan!

Anonymous said...

Hi Roland, I have installed older versions of mondrian, and able to open the page http://localhost:8080/mondrian/

However I don't know how do I view my olap cubes created in my Schema workbench.

Or is there any way to create olap cubes here on the web application?

Any help is highly appreciated.

Roland Bouman said...

Hi @anonymous,

It really is not a big deal. Just copy your schema to the java web server where modnrian is running and edit the datasources.xml file.