Issue Details (XML | Word | Printable)

Key: JRUBY-3789
Type: Bug Bug
Status: Closed Closed
Resolution: Duplicate
Priority: Major Major
Assignee: Nick Sieger
Reporter: Arun Gupta
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
JRuby

undefined method `new' for "Rack::Lock":String with Warbler 1.0.0 + JRuby 1.3.0 + Rails 2.3.2

Created: 02/Jul/09 03:09 PM   Updated: 27/Oct/09 01:49 PM   Resolved: 25/Jul/09 06:35 PM
Return to search
Component/s: Rails WAR Deployment
Affects Version/s: None
Fix Version/s: None

Time Tracking:
Not Specified


 Description  « Hide

Using JRuby 1.3.0 + Warbler 1.0.0

Created a template Rails application, warbled it up and deployed the WAR file on GlassFish v2.1. Got the error:

Caused by: org.jruby.rack.RackInitializationException: undefined method `new' for "Rack::Lock":String
from /Users/arungupta/tools/glassfish/v2.1/glassfish/nodeagents/cloud-nodeagent/cabernet/app
lications/j2ee-modules/helloworld/WEB-INF/gems/gems/actionpack-2.3.2/lib/action_controller/middlewar
e_stack.rb:116:in `inject'
from /Users/arungupta/tools/glassfish/v2.1/glassfish/nodeagents/cloud-nodeagent/cabernet/app
lications/j2ee-modules/helloworld/WEB-INF/gems/gems/actionpack-2.3.2/lib/action_controller/middlewar
e_stack.rb:116:in `build'
from /Users/arungupta/tools/glassfish/v2.1/glassfish/nodeagents/cloud-nodeagent/cabernet/app
lications/j2ee-modules/helloworld/WEB-INF/gems/gems/actionpack-2.3.2/lib/action_controller/dispatche
r.rb:82:in `initialize'
from /Users/arungupta/tools/glassfish/v2.1/glassfish/nodeagents/cloud-nodeagent/cabernet/app
lications/j2ee-modules/helloworld/WEB-INF/gems/gems/actionpack-2.3.2/lib/action_controller/dispatche
r.rb:52:in `run_prepare_callbacks'
from /Users/arungupta/tools/glassfish/v2.1/glassfish/nodeagents/cloud-nodeagent/cabernet/app
lications/j2ee-modules/helloworld/WEB-INF/gems/gems/rails-2.3.2/lib/initializer.rb:609:in `prepare_d
ispatcher'
from /Users/arungupta/tools/glassfish/v2.1/glassfish/nodeagents/cloud-nodeagent/cabernet/app
lications/j2ee-modules/helloworld/WEB-INF/gems/gems/rails-2.3.2/lib/initializer.rb:183:in `process'
from /Users/arungupta/tools/glassfish/v2.1/glassfish/nodeagents/cloud-nodeagent/cabernet/app
lications/j2ee-modules/helloworld/WEB-INF/gems/gems/rails-2.3.2/lib/initializer.rb:113:in `run'
from /Users/arungupta/tools/glassfish/v2.1/glassfish/nodeagents/cloud-nodeagent/cabernet/app
lications/j2ee-modules/helloworld/WEB-INF/config/environment.rb:9
from /Users/arungupta/tools/glassfish/v2.1/glassfish/nodeagents/cloud-nodeagent/cabernet/app
lications/j2ee-modules/helloworld/WEB-INF/config/environment.rb:26:in `load'
from /Users/arungupta/tools/glassfish/v2.1/glassfish/nodeagents/cloud-nodeagent/cabernet/gen
erated/jsp/j2ee-modules/helloworld/loader/jruby/rack/rails.rb:26:in `load_environment'

This error is also reported at:

http://kenai.com/projects/jruby-rack/lists/talk/archive/2009-05/message/2

Not aware of any workaround as well.



Arun Gupta added a comment - 02/Jul/09 04:58 PM

Using JRuby-Rack 0.9.13, gives the following error:

Caused by: org.jruby.exceptions.RaiseException: no such file to load – action_mailer
at Kernel.raise(/Users/arungupta/tools/glassfish/v2.1/glassfish/nodeagents/cloud-nodeagent/c
abernet/applications/j2ee-modules/helloworld/WEB-INF/gems/gems/rails-2.3.2/lib/initializer.rb:269)
at Rails::Initializer.require_frameworks(/Users/arungupta/tools/glassfish/v2.1/glassfish/nod
eagents/cloud-nodeagent/cabernet/generated/jsp/j2ee-modules/helloworld/loader/jruby/rack/rails.rb:43
)
at Rails::Initializer.require_frameworks_with_servlet_env(/Users/arungupta/tools/glassfish/v
2.1/glassfish/nodeagents/cloud-nodeagent/cabernet/applications/j2ee-modules/helloworld/WEB-INF/gems/
gems/rails-2.3.2/lib/initializer.rb:134)
at Rails::Initializer.process(/Users/arungupta/tools/glassfish/v2.1/glassfish/nodeagents/clo
ud-nodeagent/cabernet/applications/j2ee-modules/helloworld/WEB-INF/gems/gems/rails-2.3.2/lib/initial
izer.rb:113)


Nick Sieger added a comment - 02/Jul/09 09:56 PM

Can you upload the war file that fails to deploy?


Arun Gupta added a comment - 03/Jul/09 08:23 AM

The WAR file > 10MB (even after zipping) and so cannot be uploaded. Sent you in email.


Arun Gupta added a comment - 03/Jul/09 08:23 AM

And the WAR file deploys correctly, http://localhost:8080/helloworld shows the default Rails page correctly, but accessing http://localhost:8080/helloworld/home/index shows the default Rails 500 page.


Arun Gupta added a comment - 03/Jul/09 08:28 AM

OK, my database was not getting created because of http://jira.codehaus.org/browse/JRUBY-3502. After manually creating the database the http://localhost:8080/helloworld/home/index can be accessed correctly.

server.log showed no error messages to help debug. Where else can I look for such messages ?


Nick Sieger added a comment - 06/Jul/09 10:50 AM

Closing this. If you want to open a new ticket for the lack of logging, feel free, but we could also discuss via the mailing list.


Nick Sieger added a comment - 25/Jul/09 11:01 AM

Reported by more than one user – need to re-investigate.


Nick Sieger added a comment - 25/Jul/09 11:07 AM

Sample war file to try to reproduce: http://blog.nicksieger.com/JRUBY-3789-foo.war


Nick Sieger added a comment - 25/Jul/09 06:35 PM