Just wanted to add that I've had this problem in the past when I was trying to run on Java 5. Since some of the derby class files were built with a higher version number, they wouldn't be loaded, so loading the derby driver would fail.
This doesn't really answer the question, though, because I see this being run on the hudson console: /home/hudson/tools/java/latest1.6/bin/java
