Jruby+Warbler dying start-up in Tomcat6

I’ve warbled up my Jruby on Rails app and jars, but when I deploy it to
my Tomcat6 env, I get this:

SEVERE: Warning: error application could not be initialized
org.jruby.rack.RackInitializationException: private method chomp' called for nil:NilClass from file:/opt/trooptube-dev/work/Catalina/localhost/_/WEB-INF/lib/jruby-rack-0.9.2.jar!/jruby/rack/servlet_helper.rb:161:ininstance’
from :2

at 

org.jruby.rack.DefaultRackApplicationFactory$4.init(DefaultRackApplicationFactory.java:154)
at
org.jruby.rack.DefaultRackApplicationFactory.newErrorApplication(DefaultRackApplicationFactory.java:105)
at
org.jruby.rack.DefaultRackApplicationFactory.init(DefaultRackApplicationFactory.java:39)
at
org.jruby.rack.PoolingRackApplicationFactory.init(PoolingRackApplicationFactory.java:53)
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:4350)
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.deployDescriptor(HostConfig.java:626)
at
org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:553)
at
org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:488)
at
org.apache.catalina.startup.HostConfig.start(HostConfig.java:1147)
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:597)
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
Kernel.method_missing(file:/opt/trooptube-dev/work/Catalina/localhost//WEB-INF/lib/jruby-rack-0.9.2.jar!/jruby/rack/servlet_helper.rb:114)
at
JRuby::Rack::ServletHelper.initialize(file:/opt/trooptube-dev/work/Catalina/localhost/
/WEB-INF/lib/jruby-rack-0.9.2.jar!/jruby/rack/servlet_helper.rb:161)
at #Class:01x152e9a8.instance(:2)
at (unknown).(unknown)(:1)

My web.xml (generated by warbler) includes the following:

public.root /

Does anyone know why this might be happening?

Chris W. wrote:

I’ve warbled up my Jruby on Rails app and jars, but when I deploy it to
my Tomcat6 env, I get this:

SEVERE: Warning: error application could not be initialized
org.jruby.rack.RackInitializationException: private method chomp' called for nil:NilClass from file:/opt/trooptube-dev/work/Catalina/localhost/_/WEB-INF/lib/jruby-rack-0.9.2.jar!/jruby/rack/servlet_helper.rb:161:ininstance’
from :2

Does anyone know why this might be happening?

And presumably this works ok outside of Warbler, yes?

  • Charlie

To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email

Yes, I can start the app on OSX with jruby -S mongrel_rails start.

On 9/10/08 3:33 PM, “Charles Oliver N.” [email protected]
wrote:

Chris W. wrote:

I’ve warbled up my Jruby on Rails app and jars, but when I deploy it to
my Tomcat6 env, I get this:

SEVERE: Warning: error application could not be initialized
org.jruby.rack.RackInitializationException: private method chomp' called for nil:NilClass from file:/opt/trooptube-dev/work/Catalina/localhost/_/WEB-INF/lib/jruby-rack-0.9.2.jar!/jruby/rack/servlet_helper.rb:161:in instance’
from :2

Does anyone know why this might be happening?

And presumably this works ok outside of Warbler, yes?

  • Charlie

To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email

Hmm, I’m not an expert in J2EE compliance, but this post seems relevant:

http://mail-archives.apache.org/mod_mbox/xmlgraphics-fop-users/200504.mbox/[email protected]>

Since it seems like this is a problem that hasn’t been encountered
before, I’m guessing there isn’t a standard work-around?

Thanks,
Chris

On 9/10/08 6:20 PM, “Nick S.” [email protected] wrote:

On Wed, Sep 10, 2008 at 5:14 PM, Chris W. [email protected]
wrote:

Does anyone know why this might be happening?

Hmm, it looks like for some reason Tomcat is returning null from
ServletContext.getRealPath. Any clue why? I’ve read in a few other
places that not all servers implement this method. Seems like it’s
about time to implement an alternative.

/Nick


To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email

On Wed, Sep 10, 2008 at 10:21 PM, Chris W.
[email protected] wrote:

Hmm, I’m not an expert in J2EE compliance, but this post seems relevant:

http://mail-archives.apache.org/mod_mbox/xmlgraphics-fop-users/200504.mbox/[email protected]>

Since it seems like this is a problem that hasn’t been encountered before,
I’m guessing there isn’t a standard work-around?

The only one would be to figure out how to force Tomcat into
“exploded” mode, until I figure out a way to detect paths without
using getRealPath.

/Nick


To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email

On Wed, Sep 10, 2008 at 5:14 PM, Chris W. [email protected]
wrote:

Does anyone know why this might be happening?

Hmm, it looks like for some reason Tomcat is returning null from
ServletContext.getRealPath. Any clue why? I’ve read in a few other
places that not all servers implement this method. Seems like it’s
about time to implement an alternative.

/Nick


To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email

That seems to have done the trick. Thanks for your help.

-chris

On 9/11/08 6:06 AM, “Nick S.” [email protected] wrote:

On Wed, Sep 10, 2008 at 10:21 PM, Chris W.
[email protected] wrote:

Hmm, I’m not an expert in J2EE compliance, but this post seems relevant:

http://mail-archives.apache.org/mod_mbox/xmlgraphics-fop-users/200504.mbox/[email protected]>

Since it seems like this is a problem that hasn’t been encountered before,
I’m guessing there isn’t a standard work-around?

The only one would be to figure out how to force Tomcat into
“exploded” mode, until I figure out a way to detect paths without
using getRealPath.

/Nick


To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email