trinidad/trinidad — Issue #49: NilClass error when starting Trinidad in production mode
Author: jingweno
Created: 2012-01-30 21:20:51+00:00
State: open

Hi,

I started trinidad in production mode with

```bash
rackup -s trinidad -p 8008 -E productio
```
and got the following exceptions:

```bash
org.jruby.exceptions.RaiseException: (NoMethodError) undefined method `log' for nil:NilClass
at JRuby::Rack::ServletLog.write(file:/Users/oou/.rvm/gems/jruby-1.6.5.1/gems/jruby-rack-1.1.3/lib/jruby-rack-1.1.3.jar!/jruby/rack/servlet_log.rb:18)
at JRuby::Rack::ServletLog.puts(file:/Users/oou/.rvm/gems/jruby-1.6.5.1/gems/jruby-rack-1.1.3/lib/jruby-rack-1.1.3.jar!/jruby/rack/servlet_log.rb:14)
at Sinatra::Base.dump_errors!(/Users/oou/.rvm/gems/jruby-1.6.5.1/gems/sinatra-1.3.2/lib/sinatra/base.rb:928)
at Sinatra::Base.handle_exception!(/Users/oou/.rvm/gems/jruby-1.6.5.1/gems/sinatra-1.3.2/lib/sinatra/base.rb:899)
at Sinatra::Base.dispatch!(/Users/oou/.rvm/gems/jruby-1.6.5.1/gems/sinatra-1.3.2/lib/sinatra/base.rb:888)
at Application.call!(/Users/oou/.rvm/gems/jruby-1.6.5.1/gems/sinatra-1.3.2/lib/sinatra/base.rb:719)
at Application.invoke(/Users/oou/.rvm/gems/jruby-1.6.5.1/gems/sinatra-1.3.2/lib/sinatra/base.rb:871)
at org.jruby.RubyKernel.catch(org/jruby/RubyKernel.java:1206)
at Sinatra::Base.invoke(/Users/oou/.rvm/gems/jruby-1.6.5.1/gems/sinatra-1.3.2/lib/sinatra/base.rb:871)
at Sinatra::Base.call!(/Users/oou/.rvm/gems/jruby-1.6.5.1/gems/sinatra-1.3.2/lib/sinatra/base.rb:719)
at Sinatra::Base.call(/Users/oou/.rvm/gems/jruby-1.6.5.1/gems/sinatra-1.3.2/lib/sinatra/base.rb:705)
at Rack::Protection::XSSHeader.call(/Users/oou/.rvm/gems/jruby-1.6.5.1/gems/rack-protection-1.2.0/lib/rack/protection/xss_header.rb:22)
at Rack::Protection::PathTraversal.call(/Users/oou/.rvm/gems/jruby-1.6.5.1/gems/rack-protection-1.2.0/lib/rack/protection/path_traversal.rb:16)
at Rack::Protection::JsonCsrf.call(/Users/oou/.rvm/gems/jruby-1.6.5.1/gems/rack-protection-1.2.0/lib/rack/protection/json_csrf.rb:17)
at Rack::Protection::Base.call(/Users/oou/.rvm/gems/jruby-1.6.5.1/gems/rack-protection-1.2.0/lib/rack/protection/base.rb:47)
at Rack::Protection::XSSHeader.call(/Users/oou/.rvm/gems/jruby-1.6.5.1/gems/rack-protection-1.2.0/lib/rack/protection/xss_header.rb:22)
at Rack::Logger.call(/Users/oou/.rvm/gems/jruby-1.6.5.1/gems/rack-1.4.1/lib/rack/logger.rb:15)
at Rack::CommonLogger.call(/Users/oou/.rvm/gems/jruby-1.6.5.1/gems/rack-1.4.1/lib/rack/commonlogger.rb:20)
at Rack::Head.call(/Users/oou/.rvm/gems/jruby-1.6.5.1/gems/rack-1.4.1/lib/rack/head.rb:9)
at #.call(/Users/oou/.rvm/gems/jruby-1.6.5.1/gems/sinatra-1.3.2/lib/sinatra/base.rb:1334)
at #.synchronize(/Users/oou/.rvm/gems/jruby-1.6.5.1/gems/sinatra-1.3.2/lib/sinatra/base.rb:1416)
at #.call(/Users/oou/.rvm/gems/jruby-1.6.5.1/gems/sinatra-1.3.2/lib/sinatra/base.rb:1334)
at Rack::Handler::Servlet.call(file:/Users/oou/.rvm/gems/jruby-1.6.5.1/gems/jruby-rack-1.1.3/lib/jruby-rack-1.1.3.jar!/rack/handler/servlet.rb:20)
```