Monday, August 4, 2014

Installing Pentaho Data Integration in Ubuntu 14

Background

This blog post will record my efforts to install Pentaho Data Integration in Ubuntu Trusty Tahr (14.04). I worked mostly remote, using vnc desktop, so this should be installed too. Because OpenJDK is not quite compatible with Pentaho Kettle (see this forum post), we need to install Oracle Java 7 as a prerequisite, and we also need to ensure SWT browser dependencies & configuration are installed as well.

Oracle Java 7 installation

Referring to http://www.webupd8.org/2012/01/install-oracle-java-jdk-7-in-ubuntu-via.html, the steps is as follows :

sudo add-apt-repository ppa:webupd8team/java
sudo apt-get update
sudo apt-get install oracle-java7-installer

The author said that the installer is alpha software, but I like it better than manually installing from oracle website. From governance point of view, linux software should be installed in native packagers such as using dpkg or rpm, so this is one minus point that the oracle's java license prevented the creation of native JDK debian package or rpm package.

Check the result by executing these commands :
java -version
javac -version
Vnc server installation

sudo apt-get install vnc4server

After installing vnc4server, lets try it :

vncserver

Give it a password. Then, try to connect to it with vnc client, tailing the log file :

tail -f .vnc/:1.log

In my system, ubuntu 14 server, we got these lines of error :

error opening security policy file /etc/X11/xserver/SecurityPolicy
Could not init font path element /usr/X11R6/lib/X11/fonts/Type1/, removing from list!
Could not init font path element /usr/X11R6/lib/X11/fonts/Speedo/, removing from list!
Could not init font path element /usr/X11R6/lib/X11/fonts/misc/, removing from list!
Could not init font path element /usr/X11R6/lib/X11/fonts/75dpi/, removing from list!
Could not init font path element /usr/X11R6/lib/X11/fonts/100dpi/, removing from list!
Could not init font path element /usr/share/fonts/X11/75dpi/, removing from list!
Could not init font path element /usr/share/fonts/X11/100dpi/, removing from list!
/home/billingadm/.vnc/xstartup: 12: /home/billingadm/.vnc/xstartup: x-window-manager: not found
Warning: locale not supported by Xlib, locale set to C

Lets deal with this.
The first several lines of error is not so important. But the missing x-window-manager is.

Try to install one, fluxbox :
sudo apt-get install fluxbox

And restart the vnc :
vncserver -kill :1
vncserver

Installing Pentaho Data Integration CE


Download the pentaho data integration community package from http://community.pentaho.com/ 
Extract the zip and move it to /opt/data-integration

From the VNC console window, do this:
cd /opt/data-integration
./spoon.sh

Try to create a transformation with a formula inside. In my system, there is a No more handles error..

org.eclipse.swt.SWTError: No more handles [MOZILLA_FIVE_HOME=''] (java.lang.UnsatisfiedLinkError: Could not load SWT library.

If we follow the README_LINUX.txt and install libwebkitgtk-1.0-0 first :

sudo apt-get install libwebkitgtk-1.0-0

The error running spoon.sh would be libsoup one :

#
# A fatal error has been detected by the Java Runtime Environment:
#
#  SIGSEGV (0xb) at pc=0x00007fa9d888a2a1, pid=28736, tid=140368464623360
#
# JRE version: Java(TM) SE Runtime Environment (7.0_65-b17) (build 1.7.0_65-b17)
# Java VM: Java HotSpot(TM) 64-Bit Server VM (24.65-b04 mixed mode linux-amd64 compressed oops)
# Problematic frame:
# C  [libsoup-2.4.so.1+0x6c2a1]  soup_session_feature_detach+0x11

Anyway its not looking good. A stackoverflow.com comment points me to swt.jar update in eclipse archives, which I download :

wget "http://mirrors.ustc.edu.cn/eclipse/eclipse/downloads/drops4/R-4.3.2-201402211700/swt-4.3.2-gtk-linux-x86_64.zip"
unzip swt-4.3.2-gtk-linux-x86_64.zip
mv /opt/data-integration/libswt/linux/x86_64/swt.jar swt.jar.from_pentaho
cp swt.jar /opt/data-integration/libswt/linux/x86_64/

Summary

We installed these ubuntu packages :  oracle-java7-installer, libwebkitgtk-1.0-0
(for monitorless Ubuntu server) : vnc4server, fluxbox
updated this library : swt.jar
Another alternative is to install xulrunner and editing spoon.sh to use the installed xulrunner. But the xulrunner version should be matched with the swt version as well.

No comments: