Fri 10 Feb 2006
OLAP Reporting on Open Source Software – II
Posted by Nishith under Open Source Analytics , Reporting[18] Comments
In the last post (OLAP Reporting on Open Source Software – I) we spoke about Mondrian, an open-source OLAP server.
In this post we would be setting up OLAP reporting for a hypothetical retailer called FoodMart that sells various grocery products in a chain of stores across US, Canada, and Mexico.
Assuming that you are running MS Windows on your machine, we would need:
- JDK 1.4.2 or above downloadable from Sun’s java download page (I used j2sdk1.4.2)
- Microsoft Access to act as the data store (drop a comment if you do not have MS-Access and I can provide detailed instructions on setting it up on another database such as MySQL)
- Tomcat 5 from apache.org. Go to the bottom and download Windows Binary Distribution (I am using jakarta-tomcat-5.0.28.exe).
- Mondrian along with FoodMart data from sourceforge.net
So now that you have downloaded all the software required, we can go about setting things up.
- Install JDK (say in c:\j2sdk1.4.2). This may require you to reboot your machine a couple of times. Do not install Tomcat yet.
- Right click on My Computer, select Properties -> Advanced -> Environment Variables. Create a new environment variable JAVA_HOME and point it to your JDK instalation (c:\j2sdk1.4.2)
- Now install Tomcat (say in C:\Program Files\Apache Software Foundation\Tomcat 5.0). It should get installed as a service.
- Go to Control Panel -> Administrative Tools -> Services to check if Tomcat5 service is running. If not, start the service.
- Unzip Mondrian2.0.1.zip somewhere (say C:\Mondrian). Copy mondrian.war file from C:\Mondrian\mondrian-2.0.1\lib folder and place it in the webapps folder of your tomcat installation (C:\Program Files\Apache Software Foundation\Tomcat 5.0\webapps).
- Within the unzipped Mondrian (in demo/access folder), you fill find a MS Access database file called MondrianFoodMart.mdb. This is where the data is going to get picked up from once we create a ODBC DSN.
- Go to Control Panel -> Administrative Tools -> Data Sources (ODBC) -> System DSN. Create a new ODBC DSN called ModrianFoodMart pointing to the MondrianFoodMart.mdb above. Make sure you get this step correct (drop a comment if you need help).
Okay, now time to go see the brand new reports by pointing your browser to http://localhost:8080/mondrian/. If everything has gone right, you should see a page with a couple of links there. Click the first link called “JPivot pivot tables” under the heading “Mondrian Examples”. You will see a nice little report showing Unit Sales, Store Cost, and Store Sales for our FoodMart.

The user-interface is quite intuitive, so play around by clicking on various buttons. Do not forget to try out the top-left button (OLAP Navigator) that allows you to define your own reports by selecting measures, rows, columns and filters.
Have a go. And do let me know.
April 19th, 2006 at 4:54 am
Hi,
Got through the basic setup stuff ok, but not able to view the ‘LOCALHOST:8080/mondrian/” test page. I am able to view the ‘LOCALHOST:8080/manager’ page ok. Where should I start looking???
Thanks so much!
April 25th, 2006 at 12:19 am
Hi Steve,
You can get help with your question most assuredly in Mondrian’s discussion forms at http://sourceforge.net/forum/?group_id=35302.
You can get an embedded example of Mondrian and JPivot by downloading the Pentaho demo from http://www.pentaho.org/download/latest.
Pentaho is a commercial open source company that recently teamed up with Mondrian, Kettle ETL, JFreeReport report engine, and several other open source projects to provide a comprehensive BI platform. Check it out, I think you will find the demo much easier to setup (unzip and run), and you will get a clear idea of the power of Mondrian.
Best regards,
Gretchen Moran
Pentaho Community Connection
April 26th, 2006 at 5:33 pm
Thanks Gretchen for pointing out the Mondrian discussion forum.
Hi Steve,
Sorry I could not reply earlier. Your Tomcat setup appears to be fine, and I assume you placed the ‘mondrian.war’ as specified and now have a folder called ‘mondrian’ in ‘C:\Program Files\Apache Software Foundation\Tomcat 5.0\webapps’. If not, something got missed during setup. At this point http://localhost:8080/mondrian/index.jsp should work.
Are you getting an error on the screen? If so, I would need to see the exact error (send it by email). Have you checked the ODBC DSN, as that is another area that can be missed?
Nishith
May 31st, 2006 at 3:19 pm
hi,
i have one doubt, how to display 10 records in each page if i have 100 records.
thanks for let me know
May 31st, 2006 at 7:43 pm
Hi Ramu,
I assume you mean how to display in multiple pages if you have 100 records ‘in a report’, right? If the question is about how to break a Mondrian/JPivot report across multiple pages, then I don’t have a simple answer.
However what I would recommend is the following:
Keep the report summarized and at a high level, and let the detailed data be available on click-through. When click-through at a summarized value in the report, the detailed records contributing to that summarization appear as a separate table below, and this table has pages for scrolling.
Hope this helps.
May 31st, 2006 at 7:46 pm
Hi Ramu,
The click-through icon on JPivot is the 6th from right in the screenshot above (the thick green arrow icon to the right of red arrows and to the left of the chart icon).
Nishith
June 20th, 2007 at 12:53 am
Hello!
I have read your article and I have done all the steps, but there is a problem: when I try to open http://127.0.0.1:8080/mondrian/, I can see only this:
HTTP Status 404 – /mondrian/
type Status report
message /mondrian/
description The requested resource (/mondrian/) is not available.
Apache Tomcat/5.0.28
Please, help me!
Thank you!
August 16th, 2007 at 12:44 pm
Hi Duria,
I am also fracing the same problem. did you got any resolution on this problem.
August 16th, 2007 at 1:08 pm
Hi Satya and Daria,
Can you check for the following:
Is the Tomcat setup alright? Can you get to the http://localhost:8080/manager page?
If Tomcat seems to be working fine, next go to the webapps folder in Tomcat (C:\Program Files\Apache Software Foundation\Tomcat 5.0\webapps) and check if there is a new folder called “mondrian” inside there. The mondrian.war that you placed in this folder would have been uncompressed into a new folder named “mondrian” (or whatever the .war file was called).
At this point http://localhost:8080/mondrian/index.jsp should work if the tomcat service is up and running. Do let me know.
August 28th, 2007 at 1:23 am
I am having the same issue, where the http:/localhost:8080/mondrian gives an http 404 error: The requested resource (/mondrian/index.jsp) is not available.
I am able to get to the Tomcat admin page, and Tomcat logs look good.
Any help would be much appreciated!
August 28th, 2007 at 4:40 pm
Hi Danyale,
Hope you are using the right tomcat version (Daria above was having a problem because of an older tomcat version).
Also, can you confirm if the mondrian.war you placed in ‘C:\Program Files\Apache Software Foundation\Tomcat 5.0\webapps’ folder was expanded into a new folder called ‘mondrian’ at the same location. If the war file was named different, you would need to modify the URL accordingly.
August 28th, 2007 at 9:08 pm
Got things working – seemed to be version mismatches. What finally worked was the following:
Tomcat 5.0.28
Java 1.5.0_12 (had to move tools.jar to the Tomcat directory)
Mondrian 2.4.1.9779
The only thing still not functioning is the link “Various queries formatting used the Mondrian tag-library”
Error:
java.lang.NullPointerException
at mondrian.web.taglib.TransformTag.doEndTag(TransformTag.java:55)
at org.apache.jsp.taglib_jsp._jspx_meth_mdx_transform_0(taglib_jsp.java:424)
at org.apache.jsp.taglib_jsp._jspService(taglib_jsp.java:103)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)
…
Any guidance on this one?
September 24th, 2007 at 2:37 pm
I also have this mondrian 404 error problem. Did anyone manage to solve this ?
September 25th, 2007 at 8:31 pm
Hi Gary,
Many users have faced the 404 error problem and it has always been due to wrong JDK version. So can you check the steps outlined in the above comments and let us know if you succeed.
March 5th, 2008 at 10:31 am
i ve followed the instruction for configuring Mondrian,but i m geting—
org.apache.jasper.JasperException: javax.servlet.jsp.JspException: javax.servlet.jsp.JspException: Malformed data source given for determining XML/A provider.plz help me.
April 19th, 2008 at 10:19 pm
Hello there,
i ve followed the instruction for configuring Mondrian,but i m geting—
org.apache.jasper.JasperException: javax.servlet.jsp.JspException: javax.servlet.jsp.JspException: Malformed data source given for determining XML/A provider.plz help me.
Thanks..
October 14th, 2008 at 9:54 pm
Kudos, just stopped by. God love google, fine site. Thanks.
January 24th, 2010 at 3:27 pm
Hi Nishith! Thank you for your posts, I find them very interesting.
I think there’s a typo in the post above… I guess the new ODBC DSN should be called “MondrianFoodMart” instead of “ModrianFoodMart”.
Thanks again!