JRuby

Rails 3.0 on Windows2K8/Tomcat 6 will not run as a service.

Details

  • Type: Bug Bug
  • Status: Open Open
  • Priority: Major Major
  • Resolution: Unresolved
  • Affects Version/s: JRuby 1.5.2
  • Fix Version/s: None
  • Component/s: None
  • Labels:
    None
  • Environment:
    Windows 2008, Tomcat 6.0.29, Java 1.6.0_21, Rails 3.0.0, Bundler 1.0.0, jruby-jars-1.5.5, jruby-rack-1.0.3, rack-1.2.1, rack-mount-0.6.13
  • Number of attachments :
    0

Description

I'm at my wit's end with this issue. I've posed this issue on Stackoverflow to no avail.

To be brief, I'm deploying my application on Tomcat 6 on a Win2K8 server. When I run Tomcat as a service, I get an error. When I run Tomcat as a user process (i.e., using startup.bat), it runs fine. From what I can see in my log, it looks like Bundle slips into an endless loop when JRuby::Rack::RailsBooter::Rails3Environment.load_environment is called. Bundler keeps hopping back and forth beween resolver.rb:295 and resolver.rb:343.

Here's the code starting at Line 294 of resolver.rb

matching_versions.reverse_each do |spec_group|
  conflict = resolve_requirement(spec_group, current, reqs.dup, activated.dup)
  conflicts << conflict if conflict
end

Here's the code around resolver.rb:343. I added a puts statement to see what was going on.

puts "*** #{requirement.name}"
@stack << requirement.name
retval = catch(requirement.name) do
  resolve(req, activated)
end

Here's my full Tomcat.log.

When running Tomcat using startup.bat, I see the following in the Tomcat STDOUT window:

*** rails
*** jruby-openssl
*** activerecord-oracle_enhanced-adapter
*** warbler
*** devise
*** devise_ldap_authenticatable
*** cancan
*** net-ldap
*** haml
*** factory_girl_rails
*** forgery
*** actionmailer
*** actionpack
*** activerecord
*** activeresource
*** activesupport
*** railties
*** bouncy-castle-java
*** jruby-jars
*** jruby-rack
*** rake
*** rubyzip
*** bcrypt-ruby
*** warden
*** factory_girl
*** mail
*** activemodel
*** builder
*** erubis
*** i18n
*** rack
*** rack-mount
*** rack-test
*** tzinfo
*** arel
*** thor
*** mime-types
*** treetop
*** abstract
*** polyglot

When running Tomcat as service, I see the following in my stdout log:

*** rails
*** jruby-openssl
*** activerecord-oracle_enhanced-adapter
*** warbler
*** devise
*** devise_ldap_authenticatable
*** cancan
*** net-ldap
*** haml
*** factory_girl_rails
*** forgery
*** actionmailer
*** actionpack
*** activerecord
*** activeresource
*** activesupport
*** railties
*** bouncy-castle-java
*** jruby-jars
*** jruby-rack
*** rake
*** rubyzip
*** bcrypt-ruby
*** warden
*** factory_girl
*** mail
*** activemodel
*** builder
*** erubis
*** i18n
*** rack 
*** rack-mount

This is as far as I've gone in my investigation. If you look at the two outputs, it seems to coughing up around rack-mount.

I would greatly appreciate any help. Thanks in advance!

Issue Links

Activity

Hide
John G added a comment -

I meant JDK 1.6.0_21

Show
John G added a comment - I meant JDK 1.6.0_21
Hide
Charles Oliver Nutter added a comment -

There have been various fixes to JRuby and bundler in the past couple months (and many for JRuby for 1.6). Perhaps you could try this again with current bundler release and a snapshot of JRuby 1.6 from http://ci.jruby.org/snapshots? Tricky one for us to investigate, since it requires setting up Tomcat as a service...

Show
Charles Oliver Nutter added a comment - There have been various fixes to JRuby and bundler in the past couple months (and many for JRuby for 1.6). Perhaps you could try this again with current bundler release and a snapshot of JRuby 1.6 from http://ci.jruby.org/snapshots? Tricky one for us to investigate, since it requires setting up Tomcat as a service...
Hide
Don Morrison added a comment -

Hey John,

This is actually a problem with the version of procrun (Apache Commons Daemon) that ships with Tomcat <= 6.0.29. You need to upgrade either the entire Tomcat 6 install or the version of procrun you're using. Procrun needs to be >= 1.0.4

Tomcat 6 upgrade: http://tomcat.apache.org/download-60.cgi
procrun is here: http://commons.apache.org/daemon/

I was having this exact same problem and the upgrade solved it for me.

I've posted over at http://techblog.amphora-research.com/2011/03/tomcat-6-stack-level-too-deep-error-on-windows/ if you're interested in the details.

Good luck!

Show
Don Morrison added a comment - Hey John, This is actually a problem with the version of procrun (Apache Commons Daemon) that ships with Tomcat <= 6.0.29. You need to upgrade either the entire Tomcat 6 install or the version of procrun you're using. Procrun needs to be >= 1.0.4 Tomcat 6 upgrade: http://tomcat.apache.org/download-60.cgi procrun is here: http://commons.apache.org/daemon/ I was having this exact same problem and the upgrade solved it for me. I've posted over at http://techblog.amphora-research.com/2011/03/tomcat-6-stack-level-too-deep-error-on-windows/ if you're interested in the details. Good luck!

People

Vote (0)
Watch (1)

Dates

  • Created:
    Updated: