Monthly Archives: September 2008

org.apache.bsf.BSFException: unable to load language

I’m jazzed about creating a JRuby DSL for message manipulation in SonicMQ/Sonic ESB.  No time to go into the details right now, but I ran into a problem that I couldn’t find an answer for.  Maybe this will help the next poor soul…

I was able to run this service on my laptop without any problem, but when I tried to distribute it to others, it wouldn’t work.  So I went back and tried to deploy my XAR to a clean VM, and I kept getting org.apache.bsf.BSFException: unable to load language: ruby.  It didn’t make any sense, because it ran on one copy of Sonic, why not the other?

Well, after a lot of Googling and head-scratching, I came to the realization that I was running my laptop container on Java 5, while the clean install on the VM was, by default, using Java 1.4.2.  Once I changed the VM container to Java 5, the problem went away.