Friday, February 28, 2014

Having problems starting Pentaho Kettle Spoon on Linux? Here are some solutions ...

End of last year I decided it was time to ditch Ubuntu for a pure Gnome experience. I didn't quite fancy installing Gnome 3.10 on top of Ubuntu due to some user having problems with this. So Fedora looked like a good candidate. And having worked with it for nearly two months now, I must admit that I quite like the new clean Gnome interface (and Fedora). Gnome gets criticized everywhere, a lot of people don't have anything good to say about, but honestly to me it seems like the Gnome development is going into the right direction. But this of course a matter of personal taste. Enough on this, let's talk about Pentaho Kettle:

Quite often, Pentaho Kettle Spoon - the GUI for designing transformations and jobs - starts up just fine on Linux OSes. Sometimes though, there might be some dependencies to install or special flags to set.

When starting Pentaho Kettle on Fedora I came across this nasty error message:
spoon.sh: line 166: 10487 Aborted (core dumped) "$_PENTAHO_JAVA"

On other systems I also got this error message:
The error was 'BadDrawable (invalid Pixmap or Window parameter)'.
 (Details: serial 13561 error_code 9 request_code 62 minor_code 0)
 (Note to programmers: normally, X errors are reported asynchronously;
  that is, you will receive the error a while after causing it.
  To debug your program, run it with the --sync command line
  option to change this behavior. You can then get a meaningful
  backtrace from your debugger if you break on the gdk_x_error() function.)

To fix this problems, just add this to the spoon.sh OPS section:
-Dorg.eclipse.swt.browser.DefaultType=mozilla



Another error message you might come across is the following:
org.eclipse.swt.SWTError: XPCOM error -2147467259

Matt Casters recommends installing libwebkitgtk instead of xulrunner.

 sudo yum install webkitgtk.x86_64
One dependency that you might have to install is xulrunner:
$ yum list xulrunner*
$ yum install xulrunner.x86_64


find the directory xulrunner is installed in:
$ which xulrunner
/usr/bin/xulrunner


To fix this open spoon.sh and add at the end of the OPS section:
-Dorg.eclipse.swt.browser.XULRunnerPath=/usr/lib64/xulrunner/

This advice was originally posted here and here and in this blog post. Also here: Source1 and Source2.

Update 2014-07-20:
It turns out on Fedora 20 you do have to install xulrunner, but not via yum. Victor Sosa provided some instructions on this Jira case which I copy here for reference:

1) download the xulrunner 1.9.2 from here: http://ftp.mozilla.org/pub/mozilla.org/xulrunner/nightly/2012/03/2012-03-02-03-32-11-mozilla-1.9.2/xulrunner-1.9.2.28pre.en-US.linux-x86_64.tar.bz2. 

[ ... and copy it to a directory of your choice. Extract it.]

2) change this line in the spoon.sh 
The only change you need is 
OPT="$OPT -Dorg.eclipse.swt.browser.DefaultType=mozilla -Dorg.eclipse.swt.browser.XULRunnerPath=/opt/xulrunner-1.9.2"


Did you get any other error messages when starting Spoon and found a solution for it? Please comment below and I'll add it to this blog post so that we have a good resource for trouble shooting.

Matt Casters:

FYI, the package to install  on Ubuntu is usually  libwebkitgtk-1.0-0 (as documented).  I'm sure it's the same on Fedora.  I would avoid all that xulrunner stuff if possible.
For those of us on Kubuntu there are bugs in theme oxygen-gtk so best switch to another theme like Ambiance of turn off a bunch of fancy-shmancy animations with oxygen-settings.

21/05/2014:
If you're having Spoon problems on Linux/OSX after an upgrade, try upgrading swt.jar from http://archive.eclipse.org/eclipse/downloads/drops4/R-4.3.2-201402211700/

5 comments:

  1. i am facing such error while launching ./spoon.sh in amazon ec2 linux 64 bit instance, so how can i resolve this? I didn't find any proper solution for linux till now.

    ReplyDelete
    Replies
    1. Why would you want to start spoon.sh on ec2? Is your server not headless?

      Delete
  2. Thank you very much!
    This solved my problem too.
    (Env: Kbuntu 13.10, PDI 5.0.1.A)

    ReplyDelete
  3. I had an issue to run PDI 5.2 on CentOS of the Cloudera 5.2 (CentOS release 6.2):

    [cloudera@quickstart data-integration]$ ./spoon.sh
    /home/cloudera/Desktop/data-integration
    #
    # A fatal error has been detected by the Java Runtime Environment:
    #
    # SIGSEGV (0xb) at pc=0x00000032b140e02c, pid=18842, tid=140385268008704
    #
    # JRE version: Java(TM) SE Runtime Environment (7.0_67-b01) (build 1.7.0_67-b01)
    # Java VM: Java HotSpot(TM) 64-Bit Server VM (24.65-b04 mixed mode linux-amd64 compressed oops)
    # Problematic frame:
    # C [ld-linux-x86-64.so.2+0xe02c]
    #
    # Failed to write core dump. Core dumps have been disabled. To enable core dumping, try "ulimit -c unlimited" before starting Java again
    #
    # An error report file with more information is saved as:
    # /home/cloudera/Desktop/data-integration/hs_err_pid18842.log
    #
    # If you would like to submit a bug report, please visit:
    # http://bugreport.sun.com/bugreport/crash.jsp
    #
    ./spoon.sh: line 202: 18842 Aborted (core dumped) "$_PENTAHO_JAVA" $OPT -jar "$STARTUP" -lib $LIBPATH "${1+$@}"


    I was able to run the spoon.sh by including -Dorg.eclipse.swt.browser.DefaultType=mozilla on the spoon.sh:

    OPT="$OPT $PENTAHO_DI_JAVA_OPTIONS -Djava.library.path=$LIBPATH -DKETTLE_HOME=$KETTLE_HOME -DKETTLE_REPOSITORY=$KETTLE_REPOSITORY -DKETTLE_USER=$KETTLE_USER -DKETTLE_PASSWORD=$KETTLE_PASSWORD -DKETTLE_PLUGIN_PACKAGES=$KETTLE_PLUGIN_PACKAGES -DKETTLE_LOG_SIZE_LIMIT=$KETTLE_LOG_SIZE_LIMIT -DKETTLE_JNDI_ROOT=$KETTLE_JNDI_ROOT -Dorg.eclipse.swt.browser.DefaultType=mozilla"

    ReplyDelete
    Replies
    1. Thank you, your solution was the only one that worked for me.

      Delete