Wednesday, November 24, 2010

Upgrade JPivot 1.8 to Mondrian 3.3.x

Like me, if you are stuck with last (old) release of Jpivot 1.8 with embedded Mondrian version 3.0 and want to upgrade to latest Mondrian (community version) release 3.3.x then, I have a solution. JPivot sourceforge site is not uptodate with the Mondrian ROLAP engine and there are several bugs which have been fixed in latest release of Mondrian.

In my environment (Struts 1.2, JBoss 4.x, Tomcat 5.x) simply replacing the mondrian.jar with latest jar library from Mondrian Sourceforge project does not work. It fails with several ClassNotFoundException and/or NoSuchMethodError during runtime. Here is what I did and it worked fine:

  1. Download latest Mondrian distribution
  2. Expand the dowloaded jar archive
  3. Navigate to WEB-INF/classes in the expanded location
  4. Create jpivot.jar from classes inside WEB-INF/classes directory e.g. using jar command line tool as shown below. Run this command inside WEB-INF/classes directory.
  • jar cvfz jpivot.jar com/*

5. Replace the jpivot.jar inside the expanded mondrian/lib directory with the jpivot.jar created above

6. Copy all the jar files in the lib directory (including new jpivot.jar) to your deployment location. Voila, you have upgraded JPivot 1.8 to the latest mondrian (3.3) release.

Enjoy!