Jon Aquino's Mental Garden

Engineering beautiful software jon aquino labs | personal blog

Tuesday, March 22, 2005

JRuby problems :-(

I'm writing a neat-o super-duper-enhanced Bloglines notifier in a scripting language called JRuby (which combines Ruby and Java). But I'm getting these annoying, cryptic errors.

Sigh. I guess I'll try translating my script into Groovy to see if that fares better.

Here are a couple of examples of strange exceptions that JRuby is giving me:

Exception: LocalJumpError: yield called out of block
yabn.rb:248:in `openURL'
yabn.rb:248:in `balloonChanged'
/home/enebo/release/jruby/src/builtin/javasupport.rb:227:in `__send__'
/home/enebo/release/jruby/src/builtin/javasupport.rb:227:in `new'
yabn.rb:245:in `sleep'
yabn.rb:214:in `show_popups_for_new_items'
yabn.rb:258:in `each'
yabn.rb:216:in `show_popups_for_new_items'

Exception in thread "Thread-5" org.jruby.exceptions.RaiseException: Native Excep
tion: 'class java.util.EmptyStackException'; Message: null; StackTrace: java.uti
at org.jruby.util.collections.AbstractStack.pop(
at org.jruby.runtime.ScopeStack.pop(
at org.jruby.RubyModule.call0(
at org.jruby.RubyObject.send(
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)

Update: I just remembered that the error reporting in the current version of Groovy is even more low-level and cryptic than JRuby's. So instead of rewriting my Bloglines notifier in Groovy, I'm going to go with good ol' BeanShell -- a bit old-fashioned and verbose, but at least it is reliable.

Or maybe it's time to start learning yet another Java scripting language. I hear that Nice is interesting . . .


Post a Comment

<< Home