JRuby-Rack Exception


#1

Hi folks,

In the logs of my “warblerized” rails application I found some
exceptions that occur occasionally during large file uploads, other
than this the app works properly. Any idea what’s going on?

I’m using warbler 0.9.11, rails 2.0.2, jruby 1.1.4 and glassfish v2.

The file that is mentioned in the exception doesn’t exist and I
believe that it should be part of the jruby-rack jar.

thanks!

/i

[#|2008-10-15T11:00:17.370-0700|SEVERE|sun-appserver9.1|
javax.enterprise.system.container.web|
_ThreadID=42;_ThreadName=httpSSLWorkerThread-8080-
19;_RequestID=320a6962-5b05-45b8-9929-4d79911b7043;|
WebModule[]Exception caught
org.jruby.rack.RackInitializationException: /app/foo/sjsas-9_1_02/
domains/domain1/generated/jsp/j2ee-modules/foo/loader/rack/handler/
servlet.rb (No such file or directory)
from :1

     at

org
.jruby
.rack
.DefaultRackApplicationFactory
.newRuntime(DefaultRackApplicationFactory.java:85)
at
org
.jruby
.rack
.DefaultRackApplicationFactory
.createApplication(DefaultRackApplicationFactory.java:147)
at
org
.jruby
.rack
.DefaultRackApplicationFactory
.newApplication(DefaultRackApplicationFactory.java:44)
at
org
.jruby
.rack
.DefaultRackApplicationFactory
.getApplication(DefaultRackApplicationFactory.java:52)
at
org
.jruby
.rack
.PoolingRackApplicationFactory
.getApplication(PoolingRackApplicationFactory.java:92)
at
org
.jruby.rack.DefaultRackDispatcher.process(DefaultRackDispatcher.java:31)
at org.jruby.rack.RackFilter.doFilter(RackFilter.java:51)
at
org
.apache
.catalina
.core
.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:
230)
at
org
.apache
.catalina
.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:198)
at
org
.apache
.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:
288)
at
org
.apache
.catalina
.core.StandardContextValve.invokeInternal(StandardContextValve.java:271)
at
org
.apache
.catalina.core.StandardContextValve.invoke(StandardContextValve.java:
202)
at
org
.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:
632)
at
org
.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:
577)
at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:
94)
at
org
.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:
206)
at
org
.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:
632)
at
org
.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:
577)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:
571)
at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1080)
at
org
.apache
.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:150)
at
org
.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:
632)
at
org
.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:
577)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:
571)
at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1080)
at
org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:272)
at
com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.invokeAdapter
(DefaultProcessorTask.java:637)
at
com
.igorminar.grizzlysendfile.SendfileFilter.doFilter(SendfileFilter.java:
101)
at
com.sun.enterprise.web.connector.grizzly.async.DefaultAsyncExecutor.invokeFilters
(DefaultAsyncExecutor.java:175)
at
com.sun.enterprise.web.connector.grizzly.async.DefaultAsyncExecutor.interrupt
(DefaultAsyncExecutor.java:153)
at
com.sun.enterprise.web.connector.grizzly.async.AsyncProcessorTask.doTask
(AsyncProcessorTask.java:92)
at
com.sun.enterprise.web.connector.grizzly.TaskBase.run(TaskBase.java:265)
at
com.sun.enterprise.web.connector.grizzly.ssl.SSLWorkerThread.run
(SSLWorkerThread.java:106)
Caused by: org.jruby.exceptions.RaiseException: /app/foo/sjsas-9_1_02/
domains/domain1/generated/jsp/j2ee-modules/foo/loader/rack/handler/
servlet.rb (No such file or directory)
at (unknown).initialize(:1)
at Kernel.require(:1)
at (unknown).(unknown)(:1)
|#]

[#|2008-10-15T11:00:17.591-0700|SEVERE|sun-appserver9.1|
javax.enterprise.system.container.web|
_ThreadID

35
;_ThreadName

httpSSLWorkerThread
-8080-5;_RequestID=1e6caa44-3e76-4cab-9c03-70fa2f7a562f;|
WebModule[]Exception caught
org.jruby.rack.RackInitializationException: /app/foo/sjsas-9_1_02/
domains/domain1/generated/jsp/j2ee-modules/foo/loader/rack/handler/
servlet.rb (No such file or directory)
from :1

     at

org
.jruby
.rack
.DefaultRackApplicationFactory
.newRuntime(DefaultRackApplicationFactory.java:85)
at
org
.jruby
.rack
.DefaultRackApplicationFactory
.createApplication(DefaultRackApplicationFactory.java:147)
at
org
.jruby
.rack
.DefaultRackApplicationFactory
.newApplication(DefaultRackApplicationFactory.java:44)
at
org
.jruby
.rack
.DefaultRackApplicationFactory
.getApplication(DefaultRackApplicationFactory.java:52)
at
org
.jruby
.rack
.PoolingRackApplicationFactory
.getApplication(PoolingRackApplicationFactory.java:92)
at
org
.jruby.rack.DefaultRackDispatcher.process(DefaultRackDispatcher.java:31)
at org.jruby.rack.RackFilter.doFilter(RackFilter.java:51)
at
org
.apache
.catalina
.core
.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:
230)
at
org
.apache
.catalina
.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:198)
at
org
.apache
.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:
288)
at
org
.apache
.catalina
.core.StandardContextValve.invokeInternal(StandardContextValve.java:271)
at
org
.apache
.catalina.core.StandardContextValve.invoke(StandardContextValve.java:
202)
at
org
.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:
632)
at
org
.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:
577)
at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:
94)
at
org
.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:
206)
at
org
.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:
632)
at
org
.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:
577)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:
571)
at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1080)
at
org
.apache
.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:150)
at
org
.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:
632)
at
org
.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:
577)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:
571)
at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1080)
at
org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:272)
at
com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.invokeAdapter
(DefaultProcessorTask.java:637)
at
com
.igorminar.grizzlysendfile.SendfileFilter.doFilter(SendfileFilter.java:
101)
at
com.sun.enterprise.web.connector.grizzly.async.DefaultAsyncExecutor.invokeFilters
(DefaultAsyncExecutor.java:175)
at
com.sun.enterprise.web.connector.grizzly.async.DefaultAsyncExecutor.interrupt
(DefaultAsyncExecutor.java:153)
at
com.sun.enterprise.web.connector.grizzly.async.AsyncProcessorTask.doTask
(AsyncProcessorTask.java:92)
at
com.sun.enterprise.web.connector.grizzly.TaskBase.run(TaskBase.java:265)
at
com.sun.enterprise.web.connector.grizzly.ssl.SSLWorkerThread.run
(SSLWorkerThread.java:106)
Caused by: org.jruby.exceptions.RaiseException: /app/foo/sjsas-9_1_02/
domains/domain1/generated/jsp/j2ee-modules/foo/loader/rack/handler/
servlet.rb (No such file or directory)
at (unknown).initialize(:1)
at Kernel.require(:1)
at (unknown).(unknown)(:1)
|#]

[#|2008-10-15T11:00:19.391-0700|SEVERE|sun-appserver9.1|
javax.enterprise.system.container.web|
_ThreadID

44
;_ThreadName
=httpSSLWorkerThread-8080-14;_RequestID=c9c14b04-88a5-48be-971f-
ea03b09e249f;|WebModule[]Exception caught
org.jruby.rack.RackInitializationException: /app/foo/sjsas-9_1_02/
domains/domain1/generated/jsp/j2ee-modules/foo/loader/rack/handler/
servlet.rb (No such file or directory)
from :1

     at

org
.jruby
.rack
.DefaultRackApplicationFactory
.newRuntime(DefaultRackApplicationFactory.java:85)
at
org
.jruby
.rack
.DefaultRackApplicationFactory
.createApplication(DefaultRackApplicationFactory.java:147)
at
org
.jruby
.rack
.DefaultRackApplicationFactory
.newApplication(DefaultRackApplicationFactory.java:44)
at
org
.jruby
.rack
.DefaultRackApplicationFactory
.getApplication(DefaultRackApplicationFactory.java:52)
at
org
.jruby
.rack
.PoolingRackApplicationFactory
.getApplication(PoolingRackApplicationFactory.java:92)
at
org
.jruby.rack.DefaultRackDispatcher.process(DefaultRackDispatcher.java:31)
at org.jruby.rack.RackFilter.doFilter(RackFilter.java:51)
at
org
.apache
.catalina
.core
.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:
230)
at
org
.apache
.catalina
.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:198)
at
org
.apache
.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:
288)
at
org
.apache
.catalina
.core.StandardContextValve.invokeInternal(StandardContextValve.java:271)
at
org
.apache
.catalina.core.StandardContextValve.invoke(StandardContextValve.java:
202)
at
org
.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:
632)
at
org
.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:
577)
at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:
94)
at
org
.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:
206)
at
org
.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:
632)
at
org
.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:
577)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:
571)
at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1080)
at
org
.apache
.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:150)
at
org
.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:
632)
at
org
.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:
577)
at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:
571)
at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1080)
at
org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:272)
at
com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.invokeAdapter
(DefaultProcessorTask.java:637)
at
com
.igorminar.grizzlysendfile.SendfileFilter.doFilter(SendfileFilter.java:
101)
at
com.sun.enterprise.web.connector.grizzly.async.DefaultAsyncExecutor.invokeFilters
(DefaultAsyncExecutor.java:175)
at
com.sun.enterprise.web.connector.grizzly.async.DefaultAsyncExecutor.interrupt
(DefaultAsyncExecutor.java:153)
at
com.sun.enterprise.web.connector.grizzly.async.AsyncProcessorTask.doTask
(AsyncProcessorTask.java:92)
at
com.sun.enterprise.web.connector.grizzly.TaskBase.run(TaskBase.java:265)
at
com.sun.enterprise.web.connector.grizzly.ssl.SSLWorkerThread.run
(SSLWorkerThread.java:106)
Caused by: org.jruby.exceptions.RaiseException: /app/foo/sjsas-9_1_02/
domains/domain1/generated/jsp/j2ee-modules/foo/loader/rack/handler/
servlet.rb (No such file or directory)
at (unknown).initialize(:1)
at Kernel.require(:1)
at (unknown).(unknown)(:1)
|#]


To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email

#2

Hi Igor,

On Wed, Oct 15, 2008 at 1:25 PM, Igor M. removed_email_address@domain.invalid wrote:

(No such file or directory)
at
org.jruby.rack.PoolingRackApplicationFactory.getApplication(PoolingRackApplicationFactory.java:92)
at
org.jruby.rack.DefaultRackDispatcher.process(DefaultRackDispatcher.java:31)
at org.jruby.rack.RackFilter.doFilter(RackFilter.java:51)

That’s an odd one. The only thing I notice is that the error always
happens as a new runtime is being spawned. There’s a bug/race
condition in JRuby-Rack included with 0.9.11 where the maximum
runtimes is not fully heeded, causing you to get in a situation where
new requests above the maximum will create a new runtime rather than
waiting for an existing one to become available. I wonder if that has
anything to do with your problem. The bug is fixed on trunk if you
want to try it and/or if the bug is easy to reproduce.

/Nick


To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email

#3

On Oct 15, 2008, at 2:44 PM, Nick S. wrote:

  from <script>:1

.rack
.jruby
org
anything to do with your problem. The bug is fixed on trunk if you
want to try it and/or if the bug is easy to reproduce.

/Nick

I can give it a shot. We can’t reliably reproduce the problem at the
moment, but as I mentioned we were able to narrow it down
to large file uploads.

I’ll play with the trunk and let you know.

thanks,
Igor


To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email