What could cause spec_directories_from_classpath / org.jruby.rack.RackInitializationException ?

View: New views
3 Messages — Rating Filter:   Alert me  

What could cause spec_directories_from_classpath / org.jruby.rack.RackInitializationException ?

by Chris Collins-10 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi All,

Could anyone throw out a wild unsubstantiated guess as to what might cause this exception when I try to start an AppEngine/Rails app.

It seems to be related to my spec directories/classpath but I have no idea what kinds of issues would trigger this or where to look for more info.

The full trace is here: http://pastie.org/519044

(jruby 1.30RC)

SEVERE: [1245557854522000] javax.servlet.ServletContext log: Exception caught
org.jruby.rack.RackInitializationException: undefined local variable or method `has_more_elements' for #<Java::SunMisc::CompoundEnumeration:0xb6a5fb>
    from file:/C:/landing/buk/war/WEB-INF/lib/jruby-stdlib.jar!/META-INF/jruby.home/lib/ruby/site_ruby/1.8/rubygems/defaults/jruby.rb:86:in `spec_directories_from_classpath'
    from file:/C:/landing/buk/war/WEB-INF/lib/jruby-stdlib.jar!/META-INF/jruby.home/lib/ruby/site_ruby/1.8/rubygems/defaults/jruby.rb:75:in `installed_spec_directories'
    from file:/C:/landing/buk/war/WEB-INF/lib/jruby-stdlib.jar!/META-INF/jruby.home/lib/ruby/site_ruby/1.8/rubygems/source_index.rb:59:in `from_installed_gems'
    from file:/C:/landing/buk/war/WEB-INF/lib/jruby-stdlib.jar!/META-INF/jruby.home/lib/ruby/site_ruby/1.8/rubygems.rb:916:in `source_index'
    from file:/C:/landing/buk/war/WEB-INF/lib/jruby-stdlib.jar!/META-INF/jruby.home/lib/ruby/site_ruby/1.8/rubygems/gem_path_searcher.rb:86:in `init_gemspecs'
    from file:/C:/landing/buk/war/WEB-INF/lib/jruby-stdlib.jar!/META-INF/jruby.home/lib/ruby/site_ruby/1.8/rubygems/gem_path_searcher.rb:21:in `initialize'
    from file:/C:/landing/buk/war/WEB-INF/lib/jruby-stdlib.jar!/META-INF/jruby.home/lib/ruby/site_ruby/1.8/rubygems.rb:861:in `searcher'
    from file:/C:/landing/buk/war/WEB-INF/lib/jruby-stdlib.jar!/META-INF/jruby.home/lib/ruby/site_ruby/1.8/rubygems.rb:860:in `searcher'
     ... 20 levels...
    from file:/C:/landing/buk/war/WEB-INF/lib/jruby-rack-0.9.4.jar!/rack/builder.rb:29:in `instance_eval'
    from file:/C:/landing/buk/war/WEB-INF/lib/jruby-rack-0.9.4.jar!/rack/builder.rb:29:in `initialize'
    from <script>:2


Re: What could cause spec_directories_from_classpath / org.jruby.rack.RackInitializationException ?

by Charles Oliver Nutter-4 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Sat, Jun 20, 2009 at 11:53 PM, Chris Collins<xoptop@...> wrote:
> Hi All,
>
> Could anyone throw out a wild unsubstantiated guess as to what might cause
> this exception when I try to start an AppEngine/Rails app.
>
> It seems to be related to my spec directories/classpath but I have no idea
> what kinds of issues would trigger this or where to look for more info.

Wow that's an interesting one. It looks like some logic for walking
paths in CLASSPATH expects that the object returned will always be a
Java Enumerable, which has a hasMoreElements method. In this case, it
seems like the result is *not* an Enumerable.

You'd probably be able to look into that file
(lib/ruby/site_ruby/1.8/rubygems/defaults/jruby.rb:86) and see how
it's doing the CLASSPATH walking. My guess is that on whatever JVM/JDK
version you have, what it's walking isn't guaranteed to be an
Enumerable, and we'll have to clean up the code a bit for that
potential.

- Charlie

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email



Re: What could cause spec_directories_from_classpath / org.jruby.rack.RackInitializationException ?

by Charles Oliver Nutter-4 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Oh, and toss it into a bug :)

On Wed, Jul 1, 2009 at 12:47 AM, Charles Oliver
Nutter<headius@...> wrote:

> On Sat, Jun 20, 2009 at 11:53 PM, Chris Collins<xoptop@...> wrote:
>> Hi All,
>>
>> Could anyone throw out a wild unsubstantiated guess as to what might cause
>> this exception when I try to start an AppEngine/Rails app.
>>
>> It seems to be related to my spec directories/classpath but I have no idea
>> what kinds of issues would trigger this or where to look for more info.
>
> Wow that's an interesting one. It looks like some logic for walking
> paths in CLASSPATH expects that the object returned will always be a
> Java Enumerable, which has a hasMoreElements method. In this case, it
> seems like the result is *not* an Enumerable.
>
> You'd probably be able to look into that file
> (lib/ruby/site_ruby/1.8/rubygems/defaults/jruby.rb:86) and see how
> it's doing the CLASSPATH walking. My guess is that on whatever JVM/JDK
> version you have, what it's walking isn't guaranteed to be an
> Enumerable, and we'll have to clean up the code a bit for that
> potential.
>
> - Charlie
>

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email