Hitachi Vantara Pentaho Community Wiki
Child pages
  • Building Mondrian CmdRunner on Linux
Skip to end of metadata
Go to start of metadata

Download the perforce repository commandline client p4 at

Perforce commands:
  ./p4 -p help
Create p4 client:
  ./p4 -p -u guest client
Checkout source:
  ./p4 -p -u guest sync //open/mondrian/...

To delete the client:
  ./p4 -p -u guest client -d <yourclientname>

Install jdk1.5, jdk1.6  (binary install)
Install ant (yum) (1.6.5)

Copy the database driver into place so it is packaged with the cmdrunner jar.
  cp ~/mysql-connector-java-5.1.6.jar ./lib

  cd open/mondrian
Set JAVA_HOME in build script:

Set the shell environment
  export JAVA_HOME=/<yourpathtojdk>/jdk1.5.0_16
  export PATH=$JAVA_HOME/bin:$PATH

Using jdk1.6 gives the error:
mondrian.olap4j.FactoryJdbc3Impl.MondrianOlap4jPreparedStatementJdbc3 is not abstract
and does not override abstract method setNClob(int, in java.sql.PreparedStatement

Run the build:
  ant cmdrunner

build.xml fails on line 1116 "type doesn't support osfamily attribute":

remove osfamily attribute and replace with os:

   vi build.xml and modify line 1116 and 1117

   <exec os="unix" executable="${unix.script}"/>
   <exec os="windows" executable="buildJdk16.bat"/>

The build does not add  log4j.dtd or so add manually. You may wish to alter the logging settings of and log4j.xml. log4j.xml is already included in commandrunner.jar but you may have altered the logging options so update it too.

First extract the dtd file from the log4j.jar:

jar -xvf ../log4j.jar org/apache/log4j/xml/log4j.dtd
  inflated: org/apache/log4j/xml/log4j.dtd

Now update/add the files to cmdrunner.jar:

jar -uvf cmdrunner.jar org log4j.xml
  adding: org/(in = 0) (out= 0)(stored 0%)
  adding: org/apache/(in = 0) (out= 0)(stored 0%)
  adding: org/apache/log4j/(in = 0) (out= 0)(stored 0%)
  adding: org/apache/log4j/xml/(in = 0) (out= 0)(stored 0%)
  adding: org/apache/log4j/xml/log4j.dtd(in = 4913) (out= 1489)(deflated 69%)

To run:

Configure to contain settings eg:

Create the sample schema file for catalogURL.

java -jar lib/cmdrunner.jar