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 http://www.jacorb.org/cgi-bin/bugzilla/show_bug.cgi?id=765 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: http://forum.java.sun.com/thread.jspa?threadID=651418&tstart=0. Hack the script to force the complete path of a Java 5 compiler.

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

./ns -Djacorb.naming.ior_filename=

run grid demo:

jaco -cp 
"/export/apps/open_image/amarlow/work/JacORB/classes:$CLASSPATH:." 
demo.grid.Server
 jaco -cp 
"/export/apps/open_image/amarlow/work/JacORB/classes:$CLASSPATH:." 
demo.grid.Client

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.

No comments: