SONAR-4045 fix support of Java exception in ruby code

Behavior changed in JRuby 1.7....
http://pivotallabs.com/upgrading-to-jruby-1-7-0/