Forum: JRuby JRoR: Rails 2.2 Rack error on startup in Tomcat 6.1.

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Wes G. (Guest)
on 2009-02-27 00:12
(Received via mailing list)
Mac OS X 10.6

JDK:
java version "1.5.0_16"
Java(TM) 2 Runtime Environment, Standard Edition (build
1.5.0_16-b06-284)
Java HotSpot(TM) Client VM (build 1.5.0_16-133, mixed mode, sharing)

Rails 2.2.2
JRuby 1.1.6
rack 0.9.1
Warbler 0.9.12

Tomcat 6.0.18

When I downgraded to Rails 2.2 and redeployed my app. as a WAR file into
Tomcat, I got the RackInitializationException below.

I'm not sure which "application" file it's looking for?

Anyone have any clues?

Thanks,
Wes

SEVERE: unable to create shared application instance
org.jruby.rack.RackInitializationException: no such file to load --
application
    from
file:/Applications/apache-tomcat-6.0.18/webapps/HeatMapDemo/WEB-INF/lib/jruby-complete-1.1.6.jar!/META-INF/jruby.home/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in
`require'
    from
/Applications/apache-tomcat-6.0.18/webapps/HeatMapDemo/WEB-INF/gems/gems/activesupport-2.2.2/lib/active_support/dependencies.rb:155:in
`require'
    from
/Applications/apache-tomcat-6.0.18/webapps/HeatMapDemo/WEB-INF/gems/gems/activesupport-2.2.2/lib/active_support/dependencies.rb:262:in
`require_or_load'
    from
/Applications/apache-tomcat-6.0.18/webapps/HeatMapDemo/WEB-INF/gems/gems/activesupport-2.2.2/lib/active_support/dependencies.rb:221:in
`depend_on'
    from
/Applications/apache-tomcat-6.0.18/webapps/HeatMapDemo/WEB-INF/gems/gems/activesupport-2.2.2/lib/active_support/dependencies.rb:133:in
`require_dependency'
    from
/Applications/apache-tomcat-6.0.18/webapps/HeatMapDemo/WEB-INF/gems/gems/actionpack-2.2.2/lib/action_controller/dispatcher.rb:18:in
`define_dispatcher_callbacks'
    from
/Applications/apache-tomcat-6.0.18/webapps/HeatMapDemo/WEB-INF/gems/gems/activesupport-2.2.2/lib/active_support/callbacks.rb:182:in
`call'
    from
/Applications/apache-tomcat-6.0.18/webapps/HeatMapDemo/WEB-INF/gems/gems/activesupport-2.2.2/lib/active_support/callbacks.rb:182:in
`evaluate_method'
     ... 13 levels...
    from
file:/Applications/apache-tomcat-6.0.18/webapps/HeatMapDemo/WEB-INF/lib/jruby-rack-0.9.3.jar!/rack/builder.rb:22:in
`instance_eval'
    from
file:/Applications/apache-tomcat-6.0.18/webapps/HeatMapDemo/WEB-INF/lib/jruby-rack-0.9.3.jar!/rack/builder.rb:22:in
`initialize'
    from <script>:3

    at
org.jruby.rack.DefaultRackApplicationFactory$4.init(DefaultRackApplicationFactory.java:154)
    at
org.jruby.rack.DefaultRackApplicationFactory.getApplication(DefaultRackApplicationFactory.java:53)
    at
org.jruby.rack.SharedRackApplicationFactory.init(SharedRackApplicationFactory.java:30)
    at
org.jruby.rack.RackServletContextListener.contextInitialized(RackServletContextListener.java:38)
    at
org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3843)
    at
org.apache.catalina.core.StandardContext.start(StandardContext.java:4342)
    at
org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:791)
    at
org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:771)
    at
org.apache.catalina.core.StandardHost.addChild(StandardHost.java:525)
    at
org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:830)
    at
org.apache.catalina.startup.HostConfig.deployWARs(HostConfig.java:719)
    at
org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:490)
    at
org.apache.catalina.startup.HostConfig.start(HostConfig.java:1149)
    at
org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:311)
    at
org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:117)
    at
org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053)
    at
org.apache.catalina.core.StandardHost.start(StandardHost.java:719)
    at
org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1045)
    at
org.apache.catalina.core.StandardEngine.start(StandardEngine.java:443)
    at
org.apache.catalina.core.StandardService.start(StandardService.java:516)
    at
org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
    at org.apache.catalina.startup.Catalina.start(Catalina.java:578)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:585)
    at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)
    at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
Caused by: org.jruby.exceptions.RaiseException
    at
(unknown).new(file:/Applications/apache-tomcat-6.0.18/webapps/HeatMapDemo/WEB-INF/lib/jruby-complete-1.1.6.jar!/META-INF/jruby.home/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31)
    at
Kernel.require(file:/Applications/apache-tomcat-6.0.18/webapps/HeatMapDemo/WEB-INF/lib/jruby-complete-1.1.6.jar!/META-INF/jruby.home/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31)
    at
Kernel.require(/Applications/apache-tomcat-6.0.18/webapps/HeatMapDemo/WEB-INF/gems/gems/activesupport-2.2.2/lib/active_support/dependencies.rb:155)
    at
ActiveSupport::Dependencies::Loadable.require(/Applications/apache-tomcat-6.0.18/webapps/HeatMapDemo/WEB-INF/gems/gems/activesupport-2.2.2/lib/active_support/dependencies.rb:262)
    at
ActiveSupport::Dependencies.require_or_load(/Applications/apache-tomcat-6.0.18/webapps/HeatMapDemo/WEB-INF/gems/gems/activesupport-2.2.2/lib/active_support/dependencies.rb:221)
    at
ActiveSupport::Dependencies.depend_on(/Applications/apache-tomcat-6.0.18/webapps/HeatMapDemo/WEB-INF/gems/gems/activesupport-2.2.2/lib/active_support/dependencies.rb:133)
    at
ActiveSupport::Dependencies::Loadable.require_dependency(/Applications/apache-tomcat-6.0.18/webapps/HeatMapDemo/WEB-INF/gems/gems/actionpack-2.2.2/lib/action_controller/dispatcher.rb:18)
    at
#<Class:01x3611e5>.define_dispatcher_callbacks(/Applications/apache-tomcat-6.0.18/webapps/HeatMapDemo/WEB-INF/gems/gems/activesupport-2.2.2/lib/active_support/callbacks.rb:182)
    at
Proc.call(/Applications/apache-tomcat-6.0.18/webapps/HeatMapDemo/WEB-INF/gems/gems/activesupport-2.2.2/lib/active_support/callbacks.rb:182)
    at
ActiveSupport::Callbacks::Callback.evaluate_method(/Applications/apache-tomcat-6.0.18/webapps/HeatMapDemo/WEB-INF/gems/gems/activesupport-2.2.2/lib/active_support/callbacks.rb:166)
    at
ActiveSupport::Callbacks::Callback.call(/Applications/apache-tomcat-6.0.18/webapps/HeatMapDemo/WEB-INF/gems/gems/activesupport-2.2.2/lib/active_support/callbacks.rb:90)
    at
ActiveSupport::Callbacks::CallbackChain.run(/Applications/apache-tomcat-6.0.18/webapps/HeatMapDemo/WEB-INF/gems/gems/activesupport-2.2.2/lib/active_support/callbacks.rb:90)
    at
Array.each(/Applications/apache-tomcat-6.0.18/webapps/HeatMapDemo/WEB-INF/gems/gems/activesupport-2.2.2/lib/active_support/callbacks.rb:90)
    at
ActiveSupport::Callbacks::CallbackChain.run(/Applications/apache-tomcat-6.0.18/webapps/HeatMapDemo/WEB-INF/gems/gems/activesupport-2.2.2/lib/active_support/callbacks.rb:277)
    at
ActiveSupport::Callbacks.run_callbacks(/Applications/apache-tomcat-6.0.18/webapps/HeatMapDemo/WEB-INF/gems/gems/rails-2.2.2/lib/initializer.rb:559)
    at
Rails::Initializer.prepare_dispatcher(/Applications/apache-tomcat-6.0.18/webapps/HeatMapDemo/WEB-INF/gems/gems/rails-2.2.2/lib/initializer.rb:173)
    at
Rails::Initializer.process(/Applications/apache-tomcat-6.0.18/webapps/HeatMapDemo/WEB-INF/gems/gems/rails-2.2.2/lib/initializer.rb:112)
    at
#<Class:01x2312cb>.run(/Applications/apache-tomcat-6.0.18/webapps/HeatMapDemo/WEB-INF/config/environment.rb:18)
    at
(unknown).(unknown)(/Applications/apache-tomcat-6.0.18/webapps/HeatMapDemo/WEB-INF/config/environment.rb:29)
    at
Kernel.load(file:/Applications/apache-tomcat-6.0.18/webapps/HeatMapDemo/WEB-INF/lib/jruby-rack-0.9.3.jar!/jruby/rack/rails.rb:29)
    at
JRuby::Rack::RailsServletHelper.load_environment(file:/Applications/apache-tomcat-6.0.18/webapps/HeatMapDemo/WEB-INF/lib/jruby-rack-0.9.3.jar!/jruby/rack/rails.rb:152)
    at #<Class:01x3e2405>.new(<script>:3)
    at
(unknown).(unknown)(file:/Applications/apache-tomcat-6.0.18/webapps/HeatMapDemo/WEB-INF/lib/jruby-rack-0.9.3.jar!/rack/builder.rb:22)
    at
Kernel.instance_eval(file:/Applications/apache-tomcat-6.0.18/webapps/HeatMapDemo/WEB-INF/lib/jruby-rack-0.9.3.jar!/rack/builder.rb:22)
    at
Kernel.instance_eval(file:/Applications/apache-tomcat-6.0.18/webapps/HeatMapDemo/WEB-INF/lib/jruby-rack-0.9.3.jar!/rack/builder.rb:22)
    at Rack::Builder.initialize(<script>:3)
    at (unknown).(unknown)(:1)
Feb 26, 2009 3:59:19 PM org.apache.catalin

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

    http://xircles.codehaus.org/manage_email
Ryan L. Bell (Guest)
on 2009-02-27 01:40
(Received via mailing list)
rename application_controller.rb to application.rb

/Ryan

Wes G. wrote:
> Warbler 0.9.12
> Thanks,
> `require'
> 
/Applications/apache-tomcat-6.0.18/webapps/HeatMapDemo/WEB-INF/gems/gems/actionpack-2.2.2/lib/action_controller/dispatcher.rb:18:in
> `instance_eval'
>
> org.apache.catalina.core.StandardContext.start(StandardContext.java:4342)
> org.apache.catalina.startup.HostConfig.deployWARs(HostConfig.java:719)
> org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1053)
>    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>    at
>
> 
#<Class:01x3611e5>.define_dispatcher_callbacks(/Applications/apache-tomcat-6.0.18/webapps/HeatMapDemo/WEB-INF/gems/gems/activesupport-2.2.2/lib/active_support/callbacks.rb:182)
>    at
>
> 
(unknown).(unknown)(/Applications/apache-tomcat-6.0.18/webapps/HeatMapDemo/WEB-INF/config/environment.rb:29)
>
> ---------------------------------------------------------------------
> To unsubscribe from this list, please visit:
>
>    http://xircles.codehaus.org/manage_email
>
>


--

Ryan L. Bell
http://kofno.wordpress.com
http://twitter.com/kofno
http://github.com/kofno


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

    http://xircles.codehaus.org/manage_email
Wes G. (Guest)
on 2009-02-27 02:16
(Received via mailing list)
Thanks Ryan.  Duh.  Any idea why the name changed?  They decided to make
the application controller file name consistent all of a sudden in Rails
2.3 :)?

Wes

Ryan L. Bell wrote:
>> 1.5.0_16-b06-284)
>> into Tomcat, I got the RackInitializationException below.
>> application
>> 
/Applications/apache-tomcat-6.0.18/webapps/HeatMapDemo/WEB-INF/gems/gems/activesupport-2.2.2/lib/active_support/dependencies.rb:221:in
>>    from
>>
>> 
org.jruby.rack.RackServletContextListener.contextInitialized(RackServletContextListener.java:38)
>>    at
>>    at
>>    at
>>    at
>> 
Kernel.require(file:/Applications/apache-tomcat-6.0.18/webapps/HeatMapDemo/WEB-INF/lib/jruby-complete-1.1.6.jar!/META-INF/jruby.home/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31)
>>    at
>>
>> 
Array.each(/Applications/apache-tomcat-6.0.18/webapps/HeatMapDemo/WEB-INF/gems/gems/activesupport-2.2.2/lib/active_support/callbacks.rb:90)
>>    at
>>
>>    at
>>
>>
>
>

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

    http://xircles.codehaus.org/manage_email
Ryan L. Bell (Guest)
on 2009-02-27 02:32
(Received via mailing list)
It was annoying that the application controller didn't follow the naming
convention. If you ever tried to reference a controller before require
'application' was called, it would throw an error.

/Ryan

Wes G. wrote:
>>
>>> JRuby 1.1.6
>>> Anyone have any clues?
>>>    from
>>> `require_dependency'
>>>    from
>>>    at
>>>
>>>    at
>>>    at
>>>    at
>>> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
>>>
>>> 
ActiveSupport::Dependencies.depend_on(/Applications/apache-tomcat-6.0.18/webapps/HeatMapDemo/WEB-INF/gems/gems/activesupport-2.2.2/lib/active_support/dependencies.rb:133)
>>>    at
>>>
>>> 
Rails::Initializer.process(/Applications/apache-tomcat-6.0.18/webapps/HeatMapDemo/WEB-INF/gems/gems/rails-2.2.2/lib/initializer.rb:112)
>>>    at
>>> 
Kernel.instance_eval(file:/Applications/apache-tomcat-6.0.18/webapps/HeatMapDemo/WEB-INF/lib/jruby-rack-0.9.3.jar!/rack/builder.rb:22)
>>>
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe from this list, please visit:
>
>    http://xircles.codehaus.org/manage_email
>
>


--

Ryan L. Bell
http://kofno.wordpress.com
http://twitter.com/kofno
http://github.com/kofno


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

    http://xircles.codehaus.org/manage_email
This topic is locked and can not be replied to.