Description

There is an edge case in our implementation of JRuby on Rails where Tomcat allows processing requests to the application framework before environment.rb is done parsing. I cannot verify for sure this is the case, however in our environment.rb where this bug is reproduced consistently, we explicitly require active_support. If Tomcat is stopped and restarted, we can call a service that invokes ActiveSupport::TimeZone.all and that will come back nil. We noticed this as an exception was being thrown and we collected the following backtrace in our logs:

If you make subsequent requests, the invocation to the web service works fine, because one can assume at that point ActiveSupport was loaded into memory and can be accessed. The exception never gets thrown again, only reproduced when we restart Tomcat.