Saturday, August 11, 2007

Getting jacORB working

I am back in the land of CORBA once more but with an ancient buggy version of Orbix. In an attempt to escape I thought I would try using jacORB then I could argue that we either use jacORB or a more recent version of Orbix. The great thing about jacORB with it being open source is that I thought it would be easy to try it out and get some basic development. Well that was the theory. The trouble is jacORB has a few wrinkles that caused me a bit of trouble setting things up. I did get it working eventually and it is just great now. Here's what I did:

Mistake number 1: I tried to use the binary distribution. It doesn't work. There are a few essential components missing. Apparantly some other developers have also been hit by this. The ant build of jacORB proceeds quite quickly and painlessly so the lesson here is just use the source distribution and build it using a top level ant build. Problem solved. See bug 765 at for the problems with the binary distribution.

Multiple java SDKs: On machines with multiple java SDKs, where the default one may be an old one, you will need to hack jaco script to avoid this error: Hack the script to force the complete path of a Java 5 compiler.

Edit to specify filename of NS OIR (you have to pick a path).

./ns -Djacorb.naming.ior_filename=

run grid demo:

jaco -cp 
 jaco -cp 

Now it works! Just remember to run your own app using jaco or setting up your own CLASSPATH manually to include all the jacORB jars that are needed.

trouble with xemacs and other X11 apps on solaris

I recently found out the cause for some strange problems on solaris when connecting to it via ssh and then trying to use X11 applications. This was when I tried to get xemacs working on solaris. The problem was that all was well until I tried to use cut-n-paste, including deleting characters or lines in xemacs. As soon as the function was invoked an X11 error message appeared and the application froze. It was necessary to kill xemacs (or whatever the X11 app was) using kill -9. For quite a while I thought it was because somehow I built the app wrongly. Eventually, I found this link with an explanation for cygwin users: It is an FAQ where the question is: X11Forwarding does not work with OpenSSH under Cygwin. This turns out to be generally applicable for users of X11 apps when connected to machines via ssh. It is not specific to cygwin. Just remember to always ssh using the -Y option. Then all will be solved!