Debugging jrubyc

Hey all,

I am exploring using jruby with Apache Jackrabbit. I have been able to
convert and run the examples from this page in jruby:

http://jackrabbit.apache.org/doc/firststeps.html

~/workspace/jr $ jruby first_hop.rb
Logged in as anonymous to a Jackrabbit repository.

My next step was to try to use the jruby compiler (using jruby from the
trunk) to see if that would give a performance increase, but upon
executing
I get an exception:

~/workspace/jr $ jrubyc first_hop.rb
Compiling file “first_hop.rb” as class “first_hop”
~/workspace/jr $ java first_hop
Exception in thread “main” java.lang.ArrayIndexOutOfBoundsException: 0
at first_hop.file(first_hop.rb:24)
at first_hop.run(first_hop.rb)
at first_hop.main(first_hop.rb)

I’m not sure how to debug this…line 24 in the first_hop.rb is when I
create a new ‘TransientRepository’…full code of the first_hop.rb is
below…any suggestions / comments?

Thanks,

Dylan

first_hop.rb

require ‘java’
require ‘derby-10.1.3.1.jar’
require ‘jackrabbit-api-1.3.1.jar’
require ‘jackrabbit-classloader-1.3.1.jar’
require ‘jackrabbit-jcr-commons-1.3.1.jar’
require ‘jackrabbit-core-1.3.1.jar’
require ‘jackrabbit-jcr-rmi-1.3.1.jar’
require ‘jackrabbit-jcr-server-1.3.1.jar’
require ‘jackrabbit-jcr-tests-1.3.1.jar’
require ‘jackrabbit-text-extractors-1.3.1.jar’
require ‘jackrabbit-webdav-1.3.1.jar’
require ‘jcr-1.0.jar’
require ‘log4j-1.2.8.jar’
require ‘lucene-core-2.0.0.jar’
require ‘slf4j-log4j12-1.0.jar’
require ‘xmlParserAPIs-2.0.2.jar’
require ‘concurrent-1.3.4.jar’
require ‘commons-collections-3.1.jar’

include_class ‘javax.jcr.Repository’
include_class ‘javax.jcr.Session’
include_class ‘org.apache.jackrabbit.core.TransientRepository’

repository = TransientRepository.new
session = repository.login
begin
user = session.get_user_id
name =
repository.get_descriptor(Repository.const_get(“REP_NAME_DESC”))
puts “Logged in as #{user} to a #{name} repository.”
ensure
session.logout
end