Thursday, 11 February 2010

When Two Worlds Collide - IBM WebSphere on Ubuntu

Following the shining example of one of my Hursley colleagues, Ben Fletcher, I've recently been using WebSphere Portal 6.1.5 on Ubuntu 9.10 ( Karmic Koala ) on a relatively old Thinkpad T60p.


This is almost certainly NOT NOT NOT supported by IBM, so be warned :-)

The initial installation of WebSphere Portal Express was troublesome, in that the installer kept failing, with the error: -

/opt/IBM/WebSphere/PortalExpress/AppServer/bin/ 116: Bad substitution
which baffled me, until I read Graham Buckell's excellent blog posting here: -

which documents how to change the default shell from dash to bash e.g.

cd /bin
unlink sh
ln -s /bin/bash sh

At this point, I kicked myself because I'd had a similar problem with Tivoli Directory Integrator on Karmic, which I fixed and blogged about a while back: -
Once I "cracked" this, I was off and running - only to run into a wall with WebSphere Portlet Factory Designer 6.1.5.

Again, the "Blogosphere" came to my rescue, with a pair of excellent articles from Ben: -

In essence, I downloaded and installed a nice shiny new copy of Eclipse 3.4.2 ( eclipse-jee-ganymede-SR2-linux-gtk.tar.gz ) from here: -

and expanded the TAR file ( tar xvzf ) to /usr/share ( thus creating /usr/share/eclipse ).

I then created a symbolic link to the Eclipse binary: -

cd /usr/bin
ln -s /usr/share/eclipse/eclipse .

I then ran the WebSphere Portlet Factory Designer installer, and dropped the WPF binaries into /opt/IBM/WebSphere/PortletFactory/Designer, and "told" the installer where to find Eclipse ( /usr/share/eclipse ).

However, it may have been my "faffing about" but Eclipse still didn't include the WPFD elements when I started it, so I had to perform some more "magic", by clicking Help -> Software Updates -> Add Site and add /opt/IBM/WebSphere/PortletFactory/Designer/eclipse as an installation location.

I'll add some screenshots of this later, but this allowed me to add the WPF features into Eclipse and, after a restart ( of Eclipse, not Ubuntu ! ), I was able to create a WPF project.

However, it was Ben's extra secrets that helped make this totally work: -

a) Adding the line: -


to: -


to give me: -


These effectively set run-time options, and the XULRunner "hack" avoids fatal messages such as: -

java.lang.RuntimeException: Widget disposed too early!

which is a pain.

b) Changing the way that Eclipse launches popup windows to use the older GTK method; this was achieved by "hacking" the environment via a shell script to start Eclipse: -


This allows Eclipse to launch windows of its own; without this, you'll find that certain processes will never complete, as the pop-up windows never show up.

So, that's it, we're mostly done.

One thing that did confuse me - I run WebSphere Portal as a root user ( via the sudo su command ), and was running Eclipse as my normal non-root user. This meant that, whilst I could create portlet projects, I couldn't deploy them to WebSphere Portal, and was seeing messages such as: -

creation was not successful for an unknown reason

Once I ran Eclipse as root, all was well.

Footnote: A chap called Curran ( who's based 10 minutes down the road from where I currently sit in Littleton, MA ) has blogged more about Eclipse in Ubuntu here: -

and has written a script which appears to allow me to start Eclipse as my normal non-root user, but use sudo to allow the Eclipse processes to run as root, which is far more elegant than my approach.

Will try it and report back ...

Comments: Post a Comment

<< Home

This page is powered by Blogger. Isn't yours?

Subscribe to Posts [Atom]