Prepare the tomcat server and java environment

Install the correct java jdk

sudo apt-get install openjdk-6-jdk

If there are more java environments on the server choose the correct default (openjdk-6-jdk)

sudo update-alternatives --config java

Install the java application server Tomcat

sudo apt-get install tomcat7 tomcat7-docs tomcat7-examples tomcat7-admin

Add an admin user to the webbased admin of tomcat to deploy your war file

sudo vi /etc/tomcat7/tomcat-users.xml

Add the underlying xml between the <tomcat-users> </tomcat-users> of the file you opened

<role rolename="admin-gui"/>
<role rolename="manager-gui"/>
<role rolename="manager-script"/>
<role rolename="manager-jmx"/>
<role rolename="manager-status"/>
<user username="admin" password="password" roles="admin-gui,manager-gui,manager-script,manager-jmx,manager-status"/>

Restart tomcat to activate the user and roles

sudo /etc/init.d/tomcat7 restart

Check if the Tomcat server is running and if you’re able to get in the manager app

http://servername-ip:8080

Build and deploy Pentaho-reports to tomcat application server

Install Ant and Ivy

sudo apt-get install ant ivy wget unzip

Download and extract Pentaho Reports

mkdir /opt/pentaho_report
cd /opt/pentaho_report

If you have a OpenERP 6.1 Server you need to use the following:

wget https://github.com/WillowIT/Pentaho-reports-for-OpenERP/archive/version61.zip
unzip version61.zip

There is also a good functioning OpenERP 7.0 version:

wget https://github.com/WillowIT/Pentaho-reports-for-OpenERP/archive/version70.zip
unzip version70.zip

Build Java Server for Pentaho Reports (I do the build for version 7, you could do the same for version 61 and even run both versions on 1 server)

cd Pentaho-reports-for-OpenERP-version70
cd java_server
ant -lib /usr/share/java war

If the build is succesfull then a war file “pentaho-reports-for-openerp.war” will be found in the /opt/openerp/pentaho_report/Pentaho-reports-for-OpenERP-version70/java_server/build/jar folder.

You need to deploy this “pentaho-reports-for-openerp.war” on Tomcat.

You can do this in two ways: (I added the route of autodeployement for easy install)

  1. By going to the Tomcat Manager (http://servernameorip:8080/manager)
    Follow the Tomcat instructions for deploying/installing war files. You could use the deploy a war file to upload the war file and create an instance. If you create the war file on a different machine then where you deploy the war file. Check that you use the same java environment.
  2. By copying the war file to the webapps folder of your tomcat installation for autodeployment:
    cp /opt/pentaho_report/Pentaho-reports-for-OpenERP-version70/java_server/build/jar/pentaho-reports-for-openerp.war /var/lib/tomcat7/webapps

Finally the Pentaho Reports Java Application should be available at http://servernameorip:8080/pentaho-reports-for-openerp