John
John

Reputation: 9466

JRuby on Rails does not work with Tomcat running as a service on Windows Server 2008

Problem

It seems like running Tomcat as a service doesn't play well with Rails 3 applications that are packaged up using warble. Looking at the log files, it looks like there is either a circular dependency or a dependency that is being dynamically resolved but cannot be found, so it loops. Eventually, org.jruby.exceptions.RaiseException: stack level too deep is thrown. However, when I use startup.bat to start Tomcat instead, this problem does not occur.

Any help would be appreciated! I've been desperately searching for answer to this. Thanks in advance!

Deployment Platform

Tomcat localhost.log

http://pastie.org/1308566

Upvotes: 2

Views: 689

Answers (3)

elskwid
elskwid

Reputation: 21

I just posted the following on your Jruby ticket [http://jira.codehaus.org/browse/JRUBY-5237]:

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

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!

Upvotes: 1

blueberryfields
blueberryfields

Reputation: 50588

Look through your startup.bat configuration. It may be that Tomcat is started with a higher memory setting for Java through there, allowing the recursion to finish without running out of memory.

Upvotes: 0

blueberryfields
blueberryfields

Reputation: 50588

I would guess your database connection information contains an unexpected null string, which the system is attempting to convert to uppercase somewhere. See this error message as the hint:

at ERB.result(C:/bin/apache-tomcat-6.0.29/webapps/rails3app/WEB-INF/gems/gems/railties-3.0.0/lib/rails/application/configuration.rb:86) at Rails::Application::Configuration.database_configuration(C:/bin/apache-tomcat-6.0.29/webapps/rails3app/WEB-INF/gems/gems/activerecord-3.0.0/lib/active_record/railtie.rb:58)

This may be correctable with a configuration edit.

Upvotes: 2

Related Questions