JRuby

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

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Duplicate
  • Affects Version/s: None
  • Fix Version/s: None
  • Component/s: Rails WAR Deployment
  • Labels:
    None
  • Number of attachments :
    0

Description

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.

Activity

Hide
Arun Gupta added a comment -

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)

Show
Arun Gupta added a comment - 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)
Hide
Nick Sieger added a comment -

Can you upload the war file that fails to deploy?

Show
Nick Sieger added a comment - Can you upload the war file that fails to deploy?
Hide
Arun Gupta added a comment -

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

Show
Arun Gupta added a comment - The WAR file > 10MB (even after zipping) and so cannot be uploaded. Sent you in email.
Hide
Arun Gupta added a comment -

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.

Show
Arun Gupta added a comment - 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.
Hide
Arun Gupta added a comment -

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 ?

Show
Arun Gupta added a comment - 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 ?
Hide
Nick Sieger added a comment -

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.

Show
Nick Sieger added a comment - 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.
Hide
Nick Sieger added a comment -

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

Show
Nick Sieger added a comment - Reported by more than one user – need to re-investigate.
Hide
Nick Sieger added a comment -

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

Show
Nick Sieger added a comment - Sample war file to try to reproduce: http://blog.nicksieger.com/JRUBY-3789-foo.war
Hide
Nick Sieger added a comment -
Show
Nick Sieger added a comment - See http://kenai.com/jira/browse/JRUBY_RACK-18

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: