Details

    • Type: Bug Bug
    • Status: Resolved Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: JRuby 1.6.7
    • Fix Version/s: JRuby 1.6.8, JRuby 1.7.0.pre1
    • Component/s: Java Integration
    • Labels:
      None
    • Environment:
      Windows Server 2008 and Windows Server 2008 R2 with JDK 7u3
    • Number of attachments :
      0

      Description

      I have a Rails 2.3.14 app, running on Trinidad. However, when starting up the web app, I am getting sporadic NoMethodError when serving initial pages.

      Application Error
      org.jruby.exceptions.RaiseException: (NoMethodError) undefined method `upcase' for #<Java::JavaLang::String:0x17a4277>
              at LazyEnv.load_headers(file:C:/java/xjruby/lib/ruby/gems/1.8/gems/jruby-rack-1.1.4/lib/jruby-rack-1.1.4.jar!/rack/handler/servlet.rb:101)
      

      Here is the section of code from jruby-rack-1.1.4:

      ...
      @servlet_env.getHeaderNames.each do |h|
        next if h =~ /^Content-(Type|Length)$/i
        puts h.inspect; puts h.class.name; k = "HTTP_#{h.upcase.gsub(/-/, '_')}" # line 101 / puts added for tracing.
        env[k] = @servlet_env.getHeader(h) unless env.has_key?(k)
      end
      ...
      
      

      It appears that on line 101 of jruby-rack-1.1.4, when loading headers, JRuby is not automatically converting Java strings into Ruby strings, leading to the NoMethodError.

      Here is a full transcript of two web app launches, with the above trace statements.

      The first one is a normal one.

      C:\work\app>web.bat
      Apr 04, 2012 12:09:48 AM org.apache.coyote.AbstractProtocol init
      INFO: Initializing ProtocolHandler ["http-bio-5000"]
      Apr 04, 2012 12:09:48 AM org.apache.catalina.core.StandardService startInternal
      INFO: Starting service Tomcat
      Apr 04, 2012 12:09:48 AM org.apache.catalina.core.StandardEngine startInternal
      INFO: Starting Servlet Engine: Apache Tomcat/7.0.23
      2012-04-04 05:09:48 INFO: No global web.xml found
      Info: received max runtimes = 1
      jruby 1.6.7 (ruby-1.8.7-p357) (2012-02-22 3e82bc8) (Java HotSpot(TM) Client VM 1.7.0_03) [Windows Server 2008-x86-java]
      Runtime start
      2012-04-04 05:10:00 INFO: Starting ProtocolHandler ["http-bio-5000"]
      "host"
      String
      "user-agent"
      String
      "accept"
      String
      "accept-language"
      String
      "accept-encoding"
      String
      "accept-charset"
      String
      "keep-alive"
      String
      "connection"
      String
      "cookie"
      String
      "if-none-match"
      String
      "cache-control"
      String
      "host"
      String
      "user-agent"
      String
      "accept"
      String
      "accept-language"
      String
      "accept-encoding"
      String
      "accept-charset"
      String
      "keep-alive"
      String
      "connection"
      String
      "referer"
      String
      "cookie"
      String
      "if-modified-since"
      String
      "cache-control"
      String
      "host"
      String
      "user-agent"
      String
      "accept"
      String
      "accept-language"
      String
      "accept-encoding"
      String
      "accept-charset"
      String
      "keep-alive"
      String
      "connection"
      String
      "referer"
      String
      "cookie"
      String
      "if-modified-since"
      String
      "cache-control"
      String
      "host"
      String
      "user-agent"
      String
      "accept"
      String
      "accept-language"
      String
      "accept-encoding"
      String
      "accept-charset"
      String
      "keep-alive"
      String
      "connection"
      String
      "referer"
      String
      "cookie"
      String
      "if-modified-since"
      String
      "cache-control"
      String
      2012-04-04 05:10:05 INFO: Pausing ProtocolHandler ["http-bio-5000"]
      2012-04-04 05:10:05 INFO: Stopping service Tomcat
      Runtime exit
      2012-04-04 05:10:05 INFO: Stopping ProtocolHandler ["http-bio-5000"]
      2012-04-04 05:10:06 INFO: Destroying ProtocolHandler ["http-bio-5000"]
      Terminate batch job (Y/N)? ^C
      

      The second one is the one where JRuby failed to convert Java string to Ruby string:

      
      C:\work\app>web.bat
      Apr 04, 2012 12:10:12 AM org.apache.coyote.AbstractProtocol init
      INFO: Initializing ProtocolHandler ["http-bio-5000"]
      Apr 04, 2012 12:10:12 AM org.apache.catalina.core.StandardService startInternal
      INFO: Starting service Tomcat
      Apr 04, 2012 12:10:12 AM org.apache.catalina.core.StandardEngine startInternal
      INFO: Starting Servlet Engine: Apache Tomcat/7.0.23
      2012-04-04 05:10:13 INFO: No global web.xml found
      Info: received max runtimes = 1
      jruby 1.6.7 (ruby-1.8.7-p357) (2012-02-22 3e82bc8) (Java HotSpot(TM) Client VM 1.7.0_03) [Windows Server 2008-x86-java]
      Runtime start
      2012-04-04 05:10:24 INFO: Starting ProtocolHandler ["http-bio-5000"]
      #<Java::JavaLang::String:0x17a4277>
      Java::JavaLang::String
      Application Error
      org.jruby.exceptions.RaiseException: (NoMethodError) undefined method `upcase' for #<Java::JavaLang::String:0x17a4277>
              at LazyEnv.load_headers(file:C:/java/xjruby/lib/ruby/gems/1.8/gems/jruby-rack-1.1.4/lib/jrub
      y-rack-1.1.4.jar!/rack/handler/servlet.rb:101)
              at Enumeration.each(C:/java/xjruby/lib/ruby/site_ruby/shared/builtin/java/java.util.rb:39)
              at LazyEnv.load_headers(file:C:/java/xjruby/lib/ruby/gems/1.8/gems/jruby-rack-1.1.4/lib/jrub
      y-rack-1.1.4.jar!/rack/handler/servlet.rb:99)
              at LazyEnv.load_env_key(file:C:/java/xjruby/lib/ruby/gems/1.8/gems/jruby-rack-1.1.4/lib/jrub
      y-rack-1.1.4.jar!/rack/handler/servlet.rb:74)
              at LazyEnv.initialize(file:C:/java/xjruby/lib/ruby/gems/1.8/gems/jruby-rack-1.1.4/lib/jruby-
      rack-1.1.4.jar!/rack/handler/servlet.rb:59)
              at org.jruby.RubyProc.call(org/jruby/RubyProc.java:270)
              at org.jruby.RubyProc.call(org/jruby/RubyProc.java:220)
              at org.jruby.RubyHash.default(org/jruby/RubyHash.java:647)
              at org.jruby.RubyHash.[](org/jruby/RubyHash.java:1007)
              at Env.populate(file:C:/java/xjruby/lib/ruby/gems/1.8/gems/jruby-rack-1.1.4/lib/jruby-rack-1
      .1.4.jar!/rack/handler/servlet.rb:47)
              at Env.initialize(file:C:/java/xjruby/lib/ruby/gems/1.8/gems/jruby-rack-1.1.4/lib/jruby-rack
      -1.1.4.jar!/rack/handler/servlet.rb:41)
              at Servlet.create_env(file:C:/java/xjruby/lib/ruby/gems/1.8/gems/jruby-rack-1.1.4/lib/jruby-
      rack-1.1.4.jar!/rack/handler/servlet.rb:24)
              at Servlet.call(file:C:/java/xjruby/lib/ruby/gems/1.8/gems/jruby-rack-1.1.4/lib/jruby-rack-1
      .1.4.jar!/rack/handler/servlet.rb:20)
      #<Java::JavaLang::String:0x17a4277>
      Java::JavaLang::String
      Error: Couldn't handle error
      org.jruby.exceptions.RaiseException: (NoMethodError) undefined method `upcase' for #<Java::JavaLang:
      :String:0x17a4277>
              at LazyEnv.load_headers(file:C:/java/xjruby/lib/ruby/gems/1.8/gems/jruby-rack-1.1.4/lib/jrub
      y-rack-1.1.4.jar!/rack/handler/servlet.rb:101)
              at Enumeration.each(C:/java/xjruby/lib/ruby/site_ruby/shared/builtin/java/java.util.rb:39)
              at LazyEnv.load_headers(file:C:/java/xjruby/lib/ruby/gems/1.8/gems/jruby-rack-1.1.4/lib/jrub
      y-rack-1.1.4.jar!/rack/handler/servlet.rb:99)
              at LazyEnv.load_env_key(file:C:/java/xjruby/lib/ruby/gems/1.8/gems/jruby-rack-1.1.4/lib/jrub
      y-rack-1.1.4.jar!/rack/handler/servlet.rb:74)
              at LazyEnv.initialize(file:C:/java/xjruby/lib/ruby/gems/1.8/gems/jruby-rack-1.1.4/lib/jruby-
      rack-1.1.4.jar!/rack/handler/servlet.rb:59)
              at org.jruby.RubyProc.call(org/jruby/RubyProc.java:270)
              at org.jruby.RubyProc.call(org/jruby/RubyProc.java:220)
              at org.jruby.RubyHash.default(org/jruby/RubyHash.java:647)
              at org.jruby.RubyHash.[](org/jruby/RubyHash.java:1007)
              at Env.populate(file:C:/java/xjruby/lib/ruby/gems/1.8/gems/jruby-rack-1.1.4/lib/jruby-rack-1
      .1.4.jar!/rack/handler/servlet.rb:47)
              at Env.initialize(file:C:/java/xjruby/lib/ruby/gems/1.8/gems/jruby-rack-1.1.4/lib/jruby-rack
      -1.1.4.jar!/rack/handler/servlet.rb:41)
              at Servlet.create_env(file:C:/java/xjruby/lib/ruby/gems/1.8/gems/jruby-rack-1.1.4/lib/jruby-
      rack-1.1.4.jar!/rack/handler/servlet.rb:24)
              at Servlet.call(file:C:/java/xjruby/lib/ruby/gems/1.8/gems/jruby-rack-1.1.4/lib/jruby-rack-1
      .1.4.jar!/rack/handler/servlet.rb:20)
      

      I can reproduce this about 40% of the time. Generally, if this happens, my webapp will not work and I need to restart it a few times until it works. I am at a loss as to how to debug this further. Any suggestions appreciated.

        Activity

        Hide
        Per Lundberg added a comment -

        I get this all the time when trying to start up the Mizuno web server. (The server starts, but throws exceptions on any request with similar fail indications)

        Also with JDK 7u3, so I suspect there's something with this specific JVM update that causes the problem.

        Show
        Per Lundberg added a comment - I get this all the time when trying to start up the Mizuno web server. (The server starts, but throws exceptions on any request with similar fail indications) Also with JDK 7u3, so I suspect there's something with this specific JVM update that causes the problem.
        Hide
        Per Lundberg added a comment -

        Just for the sake of it, I tested my use case with JDK (actually JRE) 7u2. It seems to work absolutely flawlessly. I conclude that this is clearly a 7u3-related issue, which is slightly painful since this is the current version of the JRE...

        Show
        Per Lundberg added a comment - Just for the sake of it, I tested my use case with JDK (actually JRE) 7u2. It seems to work absolutely flawlessly. I conclude that this is clearly a 7u3-related issue, which is slightly painful since this is the current version of the JRE...
        Hide
        Per Lundberg added a comment -

        This is slightly weird. I seem to be able to reproduce the problem with JRE 7u2 also, but one other test case I'm using (which bootstraps mizuno using Rack::Server directly) works with JRE 7u2 but fails with JRE 7u3.

        There's something fishy going on here, definitely...

        C:\Work\mizuno-test>mizuno test_app.ru
        Mizuno 0.6.1 (Jetty 8.1.2.v20120308) listening on 0.0.0.0:9292
        Exception: undefined method `upcase' for #<Java::JavaLang::String:0xe944077>
        c:/jruby-1.6.7/lib/ruby/gems/1.8/gems/mizuno-0.6.1/lib/mizuno/rack_servlet.rb:142:in `servlet_to_rack'
        c:/jruby-1.6.7/lib/ruby/site_ruby/shared/builtin/java/java.util.rb:39:in `each'
        c:/jruby-1.6.7/lib/ruby/gems/1.8/gems/mizuno-0.6.1/lib/mizuno/rack_servlet.rb:141:in `servlet_to_rack'
        c:/jruby-1.6.7/lib/ruby/gems/1.8/gems/mizuno-0.6.1/lib/mizuno/rack_servlet.rb:50:in `service'
        c:/jruby-1.6.7/lib/ruby/gems/1.8/gems/mizuno-0.6.1/lib/mizuno/rack_servlet.rb:242:in `handle_exceptions'
        c:/jruby-1.6.7/lib/ruby/gems/1.8/gems/mizuno-0.6.1/lib/mizuno/rack_servlet.rb:48:in `service'2012-04-26 17:11:13,499 ERROR Exception
        : undefined method `upcase' for #<Java::JavaLang::String:0xe944077>
        c:/jruby-1.6.7/lib/ruby/gems/1.8/gems/mizuno-0.6.1/lib/mizuno/rack_servlet.rb:142:in `servlet_to_rack'
        c:/jruby-1.6.7/lib/ruby/site_ruby/shared/builtin/java/java.util.rb:39:in `each'
        c:/jruby-1.6.7/lib/ruby/gems/1.8/gems/mizuno-0.6.1/lib/mizuno/rack_servlet.rb:141:in `servlet_to_rack'
        c:/jruby-1.6.7/lib/ruby/gems/1.8/gems/mizuno-0.6.1/lib/mizuno/rack_servlet.rb:50:in `service'
        c:/jruby-1.6.7/lib/ruby/gems/1.8/gems/mizuno-0.6.1/lib/mizuno/rack_servlet.rb:242:in `handle_exceptions'
        c:/jruby-1.6.7/lib/ruby/gems/1.8/gems/mizuno-0.6.1/lib/mizuno/rack_servlet.rb:48:in `service'Exception: undefined method `upcase' fo
        r #<Java::JavaLang::String:0xe944077>
        c:/jruby-1.6.7/lib/ruby/gems/1.8/gems/mizuno-0.6.1/lib/mizuno/rack_servlet.rb:142:in `servlet_to_rack'
        c:/jruby-1.6.7/lib/ruby/site_ruby/shared/builtin/java/java.util.rb:39:in `each'
        c:/jruby-1.6.7/lib/ruby/gems/1.8/gems/mizuno-0.6.1/lib/mizuno/rack_servlet.rb:141:in `servlet_to_rack'
        c:/jruby-1.6.7/lib/ruby/gems/1.8/gems/mizuno-0.6.1/lib/mizuno/rack_servlet.rb:50:in `service'
        c:/jruby-1.6.7/lib/ruby/gems/1.8/gems/mizuno-0.6.1/lib/mizuno/rack_servlet.rb:242:in `handle_exceptions'
        c:/jruby-1.6.7/lib/ruby/gems/1.8/gems/mizuno-0.6.1/lib/mizuno/rack_servlet.rb:48:in `service'2012-04-26 17:11:13,612 ERROR Exception
        : undefined method `upcase' for #<Java::JavaLang::String:0xe944077>
        c:/jruby-1.6.7/lib/ruby/gems/1.8/gems/mizuno-0.6.1/lib/mizuno/rack_servlet.rb:142:in `servlet_to_rack'
        c:/jruby-1.6.7/lib/ruby/site_ruby/shared/builtin/java/java.util.rb:39:in `each'
        c:/jruby-1.6.7/lib/ruby/gems/1.8/gems/mizuno-0.6.1/lib/mizuno/rack_servlet.rb:141:in `servlet_to_rack'
        c:/jruby-1.6.7/lib/ruby/gems/1.8/gems/mizuno-0.6.1/lib/mizuno/rack_servlet.rb:50:in `service'
        c:/jruby-1.6.7/lib/ruby/gems/1.8/gems/mizuno-0.6.1/lib/mizuno/rack_servlet.rb:242:in `handle_exceptions'
        c:/jruby-1.6.7/lib/ruby/gems/1.8/gems/mizuno-0.6.1/lib/mizuno/rack_servlet.rb:48:in `service'Exception: undefined method `upcase' fo
        r #<Java::JavaLang::String:0xe944077>
        c:/jruby-1.6.7/lib/ruby/gems/1.8/gems/mizuno-0.6.1/lib/mizuno/rack_servlet.rb:142:in `servlet_to_rack'
        c:/jruby-1.6.7/lib/ruby/site_ruby/shared/builtin/java/java.util.rb:39:in `each'
        c:/jruby-1.6.7/lib/ruby/gems/1.8/gems/mizuno-0.6.1/lib/mizuno/rack_servlet.rb:141:in `servlet_to_rack'
        c:/jruby-1.6.7/lib/ruby/gems/1.8/gems/mizuno-0.6.1/lib/mizuno/rack_servlet.rb:50:in `service'
        c:/jruby-1.6.7/lib/ruby/gems/1.8/gems/mizuno-0.6.1/lib/mizuno/rack_servlet.rb:242:in `handle_exceptions'
        c:/jruby-1.6.7/lib/ruby/gems/1.8/gems/mizuno-0.6.1/lib/mizuno/rack_servlet.rb:48:in `service'2012-04-26 17:11:13,669 ERROR Exception
        : undefined method `upcase' for #<Java::JavaLang::String:0xe944077>
        c:/jruby-1.6.7/lib/ruby/gems/1.8/gems/mizuno-0.6.1/lib/mizuno/rack_servlet.rb:142:in `servlet_to_rack'
        c:/jruby-1.6.7/lib/ruby/site_ruby/shared/builtin/java/java.util.rb:39:in `each'
        c:/jruby-1.6.7/lib/ruby/gems/1.8/gems/mizuno-0.6.1/lib/mizuno/rack_servlet.rb:141:in `servlet_to_rack'
        c:/jruby-1.6.7/lib/ruby/gems/1.8/gems/mizuno-0.6.1/lib/mizuno/rack_servlet.rb:50:in `service'
        c:/jruby-1.6.7/lib/ruby/gems/1.8/gems/mizuno-0.6.1/lib/mizuno/rack_servlet.rb:242:in `handle_exceptions'
        c:/jruby-1.6.7/lib/ruby/gems/1.8/gems/mizuno-0.6.1/lib/mizuno/rack_servlet.rb:48:in `service'Exception: undefined method `upcase' fo
        r #<Java::JavaLang::String:0xe944077>
        c:/jruby-1.6.7/lib/ruby/gems/1.8/gems/mizuno-0.6.1/lib/mizuno/rack_servlet.rb:142:in `servlet_to_rack'
        c:/jruby-1.6.7/lib/ruby/site_ruby/shared/builtin/java/java.util.rb:39:in `each'
        c:/jruby-1.6.7/lib/ruby/gems/1.8/gems/mizuno-0.6.1/lib/mizuno/rack_servlet.rb:141:in `servlet_to_rack'
        c:/jruby-1.6.7/lib/ruby/gems/1.8/gems/mizuno-0.6.1/lib/mizuno/rack_servlet.rb:50:in `service'
        c:/jruby-1.6.7/lib/ruby/gems/1.8/gems/mizuno-0.6.1/lib/mizuno/rack_servlet.rb:242:in `handle_exceptions'
        c:/jruby-1.6.7/lib/ruby/gems/1.8/gems/mizuno-0.6.1/lib/mizuno/rack_servlet.rb:48:in `service'2012-04-26 17:11:13,679 ERROR Exception
        : undefined method `upcase' for #<Java::JavaLang::String:0xe944077>
        c:/jruby-1.6.7/lib/ruby/gems/1.8/gems/mizuno-0.6.1/lib/mizuno/rack_servlet.rb:142:in `servlet_to_rack'
        c:/jruby-1.6.7/lib/ruby/site_ruby/shared/builtin/java/java.util.rb:39:in `each'
        c:/jruby-1.6.7/lib/ruby/gems/1.8/gems/mizuno-0.6.1/lib/mizuno/rack_servlet.rb:141:in `servlet_to_rack'
        c:/jruby-1.6.7/lib/ruby/gems/1.8/gems/mizuno-0.6.1/lib/mizuno/rack_servlet.rb:50:in `service'
        c:/jruby-1.6.7/lib/ruby/gems/1.8/gems/mizuno-0.6.1/lib/mizuno/rack_servlet.rb:242:in `handle_exceptions'
        c:/jruby-1.6.7/lib/ruby/gems/1.8/gems/mizuno-0.6.1/lib/mizuno/rack_servlet.rb:48:in `service'^CTerminate batch job (Y/N)? Stopping J
        etty...done.

        ^C
        C:\Work\mizuno-test>jruby -v
        jruby 1.6.7 (ruby-1.9.2-p312) (2012-02-22 3e82bc8) (Java HotSpot(TM) 64-Bit Server VM 1.7.0_02) [Windows 7-amd64-java]

        Show
        Per Lundberg added a comment - This is slightly weird. I seem to be able to reproduce the problem with JRE 7u2 also, but one other test case I'm using (which bootstraps mizuno using Rack::Server directly) works with JRE 7u2 but fails with JRE 7u3. There's something fishy going on here, definitely... C:\Work\mizuno-test>mizuno test_app.ru Mizuno 0.6.1 (Jetty 8.1.2.v20120308) listening on 0.0.0.0:9292 Exception: undefined method `upcase' for #<Java::JavaLang::String:0xe944077> c:/jruby-1.6.7/lib/ruby/gems/1.8/gems/mizuno-0.6.1/lib/mizuno/rack_servlet.rb:142:in `servlet_to_rack' c:/jruby-1.6.7/lib/ruby/site_ruby/shared/builtin/java/java.util.rb:39:in `each' c:/jruby-1.6.7/lib/ruby/gems/1.8/gems/mizuno-0.6.1/lib/mizuno/rack_servlet.rb:141:in `servlet_to_rack' c:/jruby-1.6.7/lib/ruby/gems/1.8/gems/mizuno-0.6.1/lib/mizuno/rack_servlet.rb:50:in `service' c:/jruby-1.6.7/lib/ruby/gems/1.8/gems/mizuno-0.6.1/lib/mizuno/rack_servlet.rb:242:in `handle_exceptions' c:/jruby-1.6.7/lib/ruby/gems/1.8/gems/mizuno-0.6.1/lib/mizuno/rack_servlet.rb:48:in `service'2012-04-26 17:11:13,499 ERROR Exception : undefined method `upcase' for #<Java::JavaLang::String:0xe944077> c:/jruby-1.6.7/lib/ruby/gems/1.8/gems/mizuno-0.6.1/lib/mizuno/rack_servlet.rb:142:in `servlet_to_rack' c:/jruby-1.6.7/lib/ruby/site_ruby/shared/builtin/java/java.util.rb:39:in `each' c:/jruby-1.6.7/lib/ruby/gems/1.8/gems/mizuno-0.6.1/lib/mizuno/rack_servlet.rb:141:in `servlet_to_rack' c:/jruby-1.6.7/lib/ruby/gems/1.8/gems/mizuno-0.6.1/lib/mizuno/rack_servlet.rb:50:in `service' c:/jruby-1.6.7/lib/ruby/gems/1.8/gems/mizuno-0.6.1/lib/mizuno/rack_servlet.rb:242:in `handle_exceptions' c:/jruby-1.6.7/lib/ruby/gems/1.8/gems/mizuno-0.6.1/lib/mizuno/rack_servlet.rb:48:in `service'Exception: undefined method `upcase' fo r #<Java::JavaLang::String:0xe944077> c:/jruby-1.6.7/lib/ruby/gems/1.8/gems/mizuno-0.6.1/lib/mizuno/rack_servlet.rb:142:in `servlet_to_rack' c:/jruby-1.6.7/lib/ruby/site_ruby/shared/builtin/java/java.util.rb:39:in `each' c:/jruby-1.6.7/lib/ruby/gems/1.8/gems/mizuno-0.6.1/lib/mizuno/rack_servlet.rb:141:in `servlet_to_rack' c:/jruby-1.6.7/lib/ruby/gems/1.8/gems/mizuno-0.6.1/lib/mizuno/rack_servlet.rb:50:in `service' c:/jruby-1.6.7/lib/ruby/gems/1.8/gems/mizuno-0.6.1/lib/mizuno/rack_servlet.rb:242:in `handle_exceptions' c:/jruby-1.6.7/lib/ruby/gems/1.8/gems/mizuno-0.6.1/lib/mizuno/rack_servlet.rb:48:in `service'2012-04-26 17:11:13,612 ERROR Exception : undefined method `upcase' for #<Java::JavaLang::String:0xe944077> c:/jruby-1.6.7/lib/ruby/gems/1.8/gems/mizuno-0.6.1/lib/mizuno/rack_servlet.rb:142:in `servlet_to_rack' c:/jruby-1.6.7/lib/ruby/site_ruby/shared/builtin/java/java.util.rb:39:in `each' c:/jruby-1.6.7/lib/ruby/gems/1.8/gems/mizuno-0.6.1/lib/mizuno/rack_servlet.rb:141:in `servlet_to_rack' c:/jruby-1.6.7/lib/ruby/gems/1.8/gems/mizuno-0.6.1/lib/mizuno/rack_servlet.rb:50:in `service' c:/jruby-1.6.7/lib/ruby/gems/1.8/gems/mizuno-0.6.1/lib/mizuno/rack_servlet.rb:242:in `handle_exceptions' c:/jruby-1.6.7/lib/ruby/gems/1.8/gems/mizuno-0.6.1/lib/mizuno/rack_servlet.rb:48:in `service'Exception: undefined method `upcase' fo r #<Java::JavaLang::String:0xe944077> c:/jruby-1.6.7/lib/ruby/gems/1.8/gems/mizuno-0.6.1/lib/mizuno/rack_servlet.rb:142:in `servlet_to_rack' c:/jruby-1.6.7/lib/ruby/site_ruby/shared/builtin/java/java.util.rb:39:in `each' c:/jruby-1.6.7/lib/ruby/gems/1.8/gems/mizuno-0.6.1/lib/mizuno/rack_servlet.rb:141:in `servlet_to_rack' c:/jruby-1.6.7/lib/ruby/gems/1.8/gems/mizuno-0.6.1/lib/mizuno/rack_servlet.rb:50:in `service' c:/jruby-1.6.7/lib/ruby/gems/1.8/gems/mizuno-0.6.1/lib/mizuno/rack_servlet.rb:242:in `handle_exceptions' c:/jruby-1.6.7/lib/ruby/gems/1.8/gems/mizuno-0.6.1/lib/mizuno/rack_servlet.rb:48:in `service'2012-04-26 17:11:13,669 ERROR Exception : undefined method `upcase' for #<Java::JavaLang::String:0xe944077> c:/jruby-1.6.7/lib/ruby/gems/1.8/gems/mizuno-0.6.1/lib/mizuno/rack_servlet.rb:142:in `servlet_to_rack' c:/jruby-1.6.7/lib/ruby/site_ruby/shared/builtin/java/java.util.rb:39:in `each' c:/jruby-1.6.7/lib/ruby/gems/1.8/gems/mizuno-0.6.1/lib/mizuno/rack_servlet.rb:141:in `servlet_to_rack' c:/jruby-1.6.7/lib/ruby/gems/1.8/gems/mizuno-0.6.1/lib/mizuno/rack_servlet.rb:50:in `service' c:/jruby-1.6.7/lib/ruby/gems/1.8/gems/mizuno-0.6.1/lib/mizuno/rack_servlet.rb:242:in `handle_exceptions' c:/jruby-1.6.7/lib/ruby/gems/1.8/gems/mizuno-0.6.1/lib/mizuno/rack_servlet.rb:48:in `service'Exception: undefined method `upcase' fo r #<Java::JavaLang::String:0xe944077> c:/jruby-1.6.7/lib/ruby/gems/1.8/gems/mizuno-0.6.1/lib/mizuno/rack_servlet.rb:142:in `servlet_to_rack' c:/jruby-1.6.7/lib/ruby/site_ruby/shared/builtin/java/java.util.rb:39:in `each' c:/jruby-1.6.7/lib/ruby/gems/1.8/gems/mizuno-0.6.1/lib/mizuno/rack_servlet.rb:141:in `servlet_to_rack' c:/jruby-1.6.7/lib/ruby/gems/1.8/gems/mizuno-0.6.1/lib/mizuno/rack_servlet.rb:50:in `service' c:/jruby-1.6.7/lib/ruby/gems/1.8/gems/mizuno-0.6.1/lib/mizuno/rack_servlet.rb:242:in `handle_exceptions' c:/jruby-1.6.7/lib/ruby/gems/1.8/gems/mizuno-0.6.1/lib/mizuno/rack_servlet.rb:48:in `service'2012-04-26 17:11:13,679 ERROR Exception : undefined method `upcase' for #<Java::JavaLang::String:0xe944077> c:/jruby-1.6.7/lib/ruby/gems/1.8/gems/mizuno-0.6.1/lib/mizuno/rack_servlet.rb:142:in `servlet_to_rack' c:/jruby-1.6.7/lib/ruby/site_ruby/shared/builtin/java/java.util.rb:39:in `each' c:/jruby-1.6.7/lib/ruby/gems/1.8/gems/mizuno-0.6.1/lib/mizuno/rack_servlet.rb:141:in `servlet_to_rack' c:/jruby-1.6.7/lib/ruby/gems/1.8/gems/mizuno-0.6.1/lib/mizuno/rack_servlet.rb:50:in `service' c:/jruby-1.6.7/lib/ruby/gems/1.8/gems/mizuno-0.6.1/lib/mizuno/rack_servlet.rb:242:in `handle_exceptions' c:/jruby-1.6.7/lib/ruby/gems/1.8/gems/mizuno-0.6.1/lib/mizuno/rack_servlet.rb:48:in `service'^CTerminate batch job (Y/N)? Stopping J etty...done. ^C C:\Work\mizuno-test>jruby -v jruby 1.6.7 (ruby-1.9.2-p312) (2012-02-22 3e82bc8) (Java HotSpot(TM) 64-Bit Server VM 1.7.0_02) [Windows 7-amd64-java]
        Hide
        Peter K Chan added a comment -

        Thanks for the information, Per.

        I am not sure of the JFK 7 u3 connection. I have been able to reproduce this issue on two Windows Server 2008. However, my desktop, which is running Windows XP and JDK 7.0u3, has not exhibited the same problem. It may be interesting to test out JFK 6 and see if the same problem occurs there.

        This issue only happens on startup. It seems like it is happening per JVM-startup. That is, if it start up fine on a JVM, the app can run for days without issue.

        Show
        Peter K Chan added a comment - Thanks for the information, Per. I am not sure of the JFK 7 u3 connection. I have been able to reproduce this issue on two Windows Server 2008. However, my desktop, which is running Windows XP and JDK 7.0u3, has not exhibited the same problem. It may be interesting to test out JFK 6 and see if the same problem occurs there. This issue only happens on startup. It seems like it is happening per JVM-startup. That is, if it start up fine on a JVM, the app can run for days without issue.
        Hide
        Per Lundberg added a comment -

        We've researched this a bit further in my organization, and (unfortunately) it seems to be reproducible with 7u2 also. So it could very well be that all Java7 versions are affected.

        With the specific Mizuno case, it seems very easy to reproduce. Mizuno 0.6.1 (downloaded using "gem install") throws an exception on every single request with JRE 7u3. With JRE 7u2, it seems to be possible to get it working under certain circumstances (Windows 7 x64 on my local machine), but on a platform similar to what you're saying (Windows Server 2008) it seems to throw exceptions all the time.

        My "workaround" which works for Mizuno is to add an extra "to_s" on line 142 of rack_servlet.rb. This seems to work perfectly. However, this should not be needed as you're suggesting, since JRuby should convert all java.lang.String occurences to Ruby strings automagically. So, I'd say it's clearly (AFAICT) a bug in JRuby, possibly caused by some semantic weirdness in the JRE.

        Show
        Per Lundberg added a comment - We've researched this a bit further in my organization, and (unfortunately) it seems to be reproducible with 7u2 also. So it could very well be that all Java7 versions are affected. With the specific Mizuno case, it seems very easy to reproduce. Mizuno 0.6.1 (downloaded using "gem install") throws an exception on every single request with JRE 7u3. With JRE 7u2, it seems to be possible to get it working under certain circumstances (Windows 7 x64 on my local machine), but on a platform similar to what you're saying (Windows Server 2008) it seems to throw exceptions all the time. My "workaround" which works for Mizuno is to add an extra "to_s" on line 142 of rack_servlet.rb. This seems to work perfectly. However, this should not be needed as you're suggesting, since JRuby should convert all java.lang.String occurences to Ruby strings automagically. So, I'd say it's clearly (AFAICT) a bug in JRuby, possibly caused by some semantic weirdness in the JRE.
        Hide
        Adam Zell added a comment -

        A little more information for a related problem: The first 50 servlet requests to a small Sinatra app under Mizuno show that request.getRequestURL is a java.lang.StringBuffer. Subsequent requests after #50 have request.getRequestURL as a Ruby String. Not sure who is doing the conversion, but this explains why request.getRequestURL.toString raises an exception.

        Mizuno 0.6.1
        jruby-1.7.0.dev
        jre1.7.0_03

        Show
        Adam Zell added a comment - A little more information for a related problem: The first 50 servlet requests to a small Sinatra app under Mizuno show that request.getRequestURL is a java.lang.StringBuffer. Subsequent requests after #50 have request.getRequestURL as a Ruby String. Not sure who is doing the conversion, but this explains why request.getRequestURL.toString raises an exception. Mizuno 0.6.1 jruby-1.7.0.dev jre1.7.0_03
        Hide
        Peter K Chan added a comment -

        I have just tested my app against JDK 6u31 and I have not been able to reproduce it.

        So it looks like this is likely an interaction between JRuby and JDK 7.

        Show
        Peter K Chan added a comment - I have just tested my app against JDK 6u31 and I have not been able to reproduce it. So it looks like this is likely an interaction between JRuby and JDK 7.
        Hide
        Uwe Kubosch added a comment -

        If there is a threshold of 50, that may be when code is (JRuby) JIT compiled to Java byte code, possibly involving invokedynamic.

        Have you tried running without invokedynamic?

        -Djruby.compile.invokedynamic=false
        
        Show
        Uwe Kubosch added a comment - If there is a threshold of 50, that may be when code is (JRuby) JIT compiled to Java byte code, possibly involving invokedynamic. Have you tried running without invokedynamic? -Djruby.compile.invokedynamic=false
        Hide
        Per Lundberg added a comment -

        Good hint! I tested running Mizuno with JRUBY_OPTS including -J-Djruby.compile.invokedynamic=false

        When I do this, things work as they should.

        So, we have a workaround but what could be the real cause of this as far as you see?

        Show
        Per Lundberg added a comment - Good hint! I tested running Mizuno with JRUBY_OPTS including -J-Djruby.compile.invokedynamic=false When I do this, things work as they should. So, we have a workaround but what could be the real cause of this as far as you see?
        Hide
        Uwe Kubosch added a comment -

        Couldn't say, but our project is bitten by JRUBY-6297.

        Show
        Uwe Kubosch added a comment - Couldn't say, but our project is bitten by JRUBY-6297 .
        Hide
        Peter K Chan added a comment -

        Unfortunately, turning off invokeddynamic does not resolve the issue for me.

        Using command line of:

        jruby --1.8 --client -J-Xms200m -J-Xmx768m -J-XX:MaxPermSize=80m -J-Djruby.rack.logging=stdout -J-Djruby.compile.invokedynamic=false -S trinidad
        

        I still get the same error (I also tried --1.9 and got the same issue):

        
        c:\work\app>web.bat
        Apr 28, 2012 11:12:00 AM org.apache.coyote.AbstractProtocol init
        INFO: Initializing ProtocolHandler ["http-bio-3000"]
        Apr 28, 2012 11:12:00 AM org.apache.catalina.core.StandardService startInternal
        INFO: Starting service Tomcat
        Apr 28, 2012 11:12:01 AM org.apache.catalina.core.StandardEngine startInternal
        INFO: Starting Servlet Engine: Apache Tomcat/7.0.23
        2012-04-28 16:12:01 INFO: No global web.xml found
        Info: received max runtimes = 6
        jruby 1.6.7 (ruby-1.8.7-p357) (2012-02-22 3e82bc8) (Java HotSpot(TM) Client VM 1.7.0_03) [Windows Server 2008-x86-java]
        Info: using runtime pool timeout of 30 seconds
        Info: received min runtimes = 2
        Info: received max runtimes = 6
        (...app-specific log snipped...)
        Info: add application to the pool. size now = 1
        (...app-specific log snipped...)
        2012-04-28 16:12:24 INFO: Starting ProtocolHandler ["http-bio-3000"]
        (...app-specific log snipped...)
        Info: add application to the pool. size now = 2
        Application Error
        org.jruby.exceptions.RaiseException: (NoMethodError) undefined method `upcase' for #<Java::JavaLang::String:0x5cc2f9>
                at LazyEnv.load_headers(file:c:/java/jruby/lib/ruby/gems/1.8/gems/jruby-rack-1.1.4/lib/jruby-rack-1.1.4.jar!/rack/handler/servlet.rb:101)
                at Enumeration.each(c:/java/jruby/lib/ruby/site_ruby/shared/builtin/java/java.util.rb:39)
                at LazyEnv.load_headers(file:c:/java/jruby/lib/ruby/gems/1.8/gems/jruby-rack-1.1.4/lib/jruby-rack-1.1.4.jar!/rack/handler/servlet.rb:99)
                at LazyEnv.load_env_key(file:c:/java/jruby/lib/ruby/gems/1.8/gems/jruby-rack-1.1.4/lib/jruby-rack-1.1.4.jar!/rack/handler/servlet.rb:74)
                at LazyEnv.initialize(file:c:/java/jruby/lib/ruby/gems/1.8/gems/jruby-rack-1.1.4/lib/jruby-rack-1.1.4.jar!/rack/handler/servlet.rb:59)
                at org.jruby.RubyProc.call(org/jruby/RubyProc.java:270)
                at org.jruby.RubyProc.call(org/jruby/RubyProc.java:220)
                at org.jruby.RubyHash.default(org/jruby/RubyHash.java:647)
                at org.jruby.RubyHash.[](org/jruby/RubyHash.java:1007)
                at Env.populate(file:c:/java/jruby/lib/ruby/gems/1.8/gems/jruby-rack-1.1.4/lib/jruby-rack-1.1.4.jar!/rack/handler/servlet.rb:47)
                at Env.initialize(file:c:/java/jruby/lib/ruby/gems/1.8/gems/jruby-rack-1.1.4/lib/jruby-rack-1.1.4.jar!/rack/handler/servlet.rb:41)
                at Servlet.create_env(file:c:/java/jruby/lib/ruby/gems/1.8/gems/jruby-rack-1.1.4/lib/jruby-rack-1.1.4.jar!/rack/handler/servlet.rb:24)
                at Servlet.call(file:c:/java/jruby/lib/ruby/gems/1.8/gems/jruby-rack-1.1.4/lib/jruby-rack-1.1.4.jar!/rack/handler/servlet.rb:20)
        Error: Couldn't handle error
        org.jruby.exceptions.RaiseException: (NoMethodError) undefined method `upcase' for #<Java::JavaLang::String:0x5cc2f9>
                at LazyEnv.load_headers(file:c:/java/jruby/lib/ruby/gems/1.8/gems/jruby-rack-1.1.4/lib/jruby-rack-1.1.4.jar!/rack/handler/servlet.rb:101)
                at Enumeration.each(c:/java/jruby/lib/ruby/site_ruby/shared/builtin/java/java.util.rb:39)
                at LazyEnv.load_headers(file:c:/java/jruby/lib/ruby/gems/1.8/gems/jruby-rack-1.1.4/lib/jruby-rack-1.1.4.jar!/rack/handler/servlet.rb:99)
                at LazyEnv.load_env_key(file:c:/java/jruby/lib/ruby/gems/1.8/gems/jruby-rack-1.1.4/lib/jruby-rack-1.1.4.jar!/rack/handler/servlet.rb:74)
                at LazyEnv.initialize(file:c:/java/jruby/lib/ruby/gems/1.8/gems/jruby-rack-1.1.4/lib/jruby-rack-1.1.4.jar!/rack/handler/servlet.rb:59)
                at org.jruby.RubyProc.call(org/jruby/RubyProc.java:270)
                at org.jruby.RubyProc.call(org/jruby/RubyProc.java:220)
                at org.jruby.RubyHash.default(org/jruby/RubyHash.java:647)
                at org.jruby.RubyHash.[](org/jruby/RubyHash.java:1007)
                at Env.populate(file:c:/java/jruby/lib/ruby/gems/1.8/gems/jruby-rack-1.1.4/lib/jruby-rack-1.1.4.jar!/rack/handler/servlet.rb:47)
                at Env.initialize(file:c:/java/jruby/lib/ruby/gems/1.8/gems/jruby-rack-1.1.4/lib/jruby-rack-1.1.4.jar!/rack/handler/servlet.rb:41)
                at Servlet.create_env(file:c:/java/jruby/lib/ruby/gems/1.8/gems/jruby-rack-1.1.4/lib/jruby-rack-1.1.4.jar!/rack/handler/servlet.rb:24)
                at Servlet.call(file:c:/java/jruby/lib/ruby/gems/1.8/gems/jruby-rack-1.1.4/lib/jruby-rack-1.1.4.jar!/rack/handler/servlet.rb:20)
        Application Error
        org.jruby.exceptions.RaiseException: (NoMethodError) undefined method `upcase' for #<Java::JavaLang::String:0x71fa2c>
                at LazyEnv.load_headers(file:c:/java/jruby/lib/ruby/gems/1.8/gems/jruby-rack-1.1.4/lib/jruby-rack-1.1.4.jar!/rack/handler/servlet.rb:101)
                at Enumeration.each(c:/java/jruby/lib/ruby/site_ruby/shared/builtin/java/java.util.rb:39)
                at LazyEnv.load_headers(file:c:/java/jruby/lib/ruby/gems/1.8/gems/jruby-rack-1.1.4/lib/jruby-rack-1.1.4.jar!/rack/handler/servlet.rb:99)
                at LazyEnv.load_env_key(file:c:/java/jruby/lib/ruby/gems/1.8/gems/jruby-rack-1.1.4/lib/jruby-rack-1.1.4.jar!/rack/handler/servlet.rb:74)
                at LazyEnv.initialize(file:c:/java/jruby/lib/ruby/gems/1.8/gems/jruby-rack-1.1.4/lib/jruby-rack-1.1.4.jar!/rack/handler/servlet.rb:59)
                at org.jruby.RubyProc.call(org/jruby/RubyProc.java:270)
                at org.jruby.RubyProc.call(org/jruby/RubyProc.java:220)
                at org.jruby.RubyHash.default(org/jruby/RubyHash.java:647)
                at org.jruby.RubyHash.[](org/jruby/RubyHash.java:1007)
                at Env.populate(file:c:/java/jruby/lib/ruby/gems/1.8/gems/jruby-rack-1.1.4/lib/jruby-rack-1.1.4.jar!/rack/handler/servlet.rb:47)
                at Env.initialize(file:c:/java/jruby/lib/ruby/gems/1.8/gems/jruby-rack-1.1.4/lib/jruby-rack-1.1.4.jar!/rack/handler/servlet.rb:41)
                at Servlet.create_env(file:c:/java/jruby/lib/ruby/gems/1.8/gems/jruby-rack-1.1.4/lib/jruby-rack-1.1.4.jar!/rack/handler/servlet.rb:24)
                at Servlet.call(file:c:/java/jruby/lib/ruby/gems/1.8/gems/jruby-rack-1.1.4/lib/jruby-rack-1.1.4.jar!/rack/handler/servlet.rb:20)
        Error: Couldn't handle error
        org.jruby.exceptions.RaiseException: (NoMethodError) undefined method `upcase' for #<Java::JavaLang::String:0x71fa2c>
                at LazyEnv.load_headers(file:c:/java/jruby/lib/ruby/gems/1.8/gems/jruby-rack-1.1.4/lib/jruby-rack-1.1.4.jar!/rack/handler/servlet.rb:101)
                at Enumeration.each(c:/java/jruby/lib/ruby/site_ruby/shared/builtin/java/java.util.rb:39)
                at LazyEnv.load_headers(file:c:/java/jruby/lib/ruby/gems/1.8/gems/jruby-rack-1.1.4/lib/jruby-rack-1.1.4.jar!/rack/handler/servlet.rb:99)
                at Rack::Handler::LazyEnv.load_env_key(file:c:/java/jruby/lib/ruby/gems/1.8/gems/jruby-rack-1.1.4/lib/jruby-rack-1.1.4.jar!/rack/handler/servlet.rb:74)
                at LazyEnv.initialize(file:c:/java/jruby/lib/ruby/gems/1.8/gems/jruby-rack-1.1.4/lib/jruby-rack-1.1.4.jar!/rack/handler/servlet.rb:59)
                at org.jruby.RubyProc.call(org/jruby/RubyProc.java:270)
                at org.jruby.RubyProc.call(org/jruby/RubyProc.java:220)
                at org.jruby.RubyHash.default(org/jruby/RubyHash.java:647)
                at org.jruby.RubyHash.[](org/jruby/RubyHash.java:1007)
                at Env.populate(file:c:/java/jruby/lib/ruby/gems/1.8/gems/jruby-rack-1.1.4/lib/jruby-rack-1.1.4.jar!/rack/handler/servlet.rb:47)
                at Env.initialize(file:c:/java/jruby/lib/ruby/gems/1.8/gems/jruby-rack-1.1.4/lib/jruby-rack-1.1.4.jar!/rack/handler/servlet.rb:41)
                at Servlet.create_env(file:c:/java/jruby/lib/ruby/gems/1.8/gems/jruby-rack-1.1.4/lib/jruby-rack-1.1.4.jar!/rack/handler/servlet.rb:24)
                at Servlet.call(file:c:/java/jruby/lib/ruby/gems/1.8/gems/jruby-rack-1.1.4/lib/jruby-rack-1.1.4.jar!/rack/handler/servlet.rb:20)
        
        Show
        Peter K Chan added a comment - Unfortunately, turning off invokeddynamic does not resolve the issue for me. Using command line of: jruby --1.8 --client -J-Xms200m -J-Xmx768m -J-XX:MaxPermSize=80m -J-Djruby.rack.logging=stdout -J-Djruby.compile.invokedynamic= false -S trinidad I still get the same error (I also tried --1.9 and got the same issue): c:\work\app>web.bat Apr 28, 2012 11:12:00 AM org.apache.coyote.AbstractProtocol init INFO: Initializing ProtocolHandler [ "http-bio-3000" ] Apr 28, 2012 11:12:00 AM org.apache.catalina.core.StandardService startInternal INFO: Starting service Tomcat Apr 28, 2012 11:12:01 AM org.apache.catalina.core.StandardEngine startInternal INFO: Starting Servlet Engine: Apache Tomcat/7.0.23 2012-04-28 16:12:01 INFO: No global web.xml found Info: received max runtimes = 6 jruby 1.6.7 (ruby-1.8.7-p357) (2012-02-22 3e82bc8) (Java HotSpot(TM) Client VM 1.7.0_03) [Windows Server 2008-x86-java] Info: using runtime pool timeout of 30 seconds Info: received min runtimes = 2 Info: received max runtimes = 6 (...app-specific log snipped...) Info: add application to the pool. size now = 1 (...app-specific log snipped...) 2012-04-28 16:12:24 INFO: Starting ProtocolHandler [ "http-bio-3000" ] (...app-specific log snipped...) Info: add application to the pool. size now = 2 Application Error org.jruby.exceptions.RaiseException: (NoMethodError) undefined method `upcase' for #<Java::JavaLang:: String :0x5cc2f9> at LazyEnv.load_headers(file:c:/java/jruby/lib/ruby/gems/1.8/gems/jruby-rack-1.1.4/lib/jruby-rack-1.1.4.jar!/rack/handler/servlet.rb:101) at Enumeration.each(c:/java/jruby/lib/ruby/site_ruby/shared/builtin/java/java.util.rb:39) at LazyEnv.load_headers(file:c:/java/jruby/lib/ruby/gems/1.8/gems/jruby-rack-1.1.4/lib/jruby-rack-1.1.4.jar!/rack/handler/servlet.rb:99) at LazyEnv.load_env_key(file:c:/java/jruby/lib/ruby/gems/1.8/gems/jruby-rack-1.1.4/lib/jruby-rack-1.1.4.jar!/rack/handler/servlet.rb:74) at LazyEnv.initialize(file:c:/java/jruby/lib/ruby/gems/1.8/gems/jruby-rack-1.1.4/lib/jruby-rack-1.1.4.jar!/rack/handler/servlet.rb:59) at org.jruby.RubyProc.call(org/jruby/RubyProc.java:270) at org.jruby.RubyProc.call(org/jruby/RubyProc.java:220) at org.jruby.RubyHash. default (org/jruby/RubyHash.java:647) at org.jruby.RubyHash.[](org/jruby/RubyHash.java:1007) at Env.populate(file:c:/java/jruby/lib/ruby/gems/1.8/gems/jruby-rack-1.1.4/lib/jruby-rack-1.1.4.jar!/rack/handler/servlet.rb:47) at Env.initialize(file:c:/java/jruby/lib/ruby/gems/1.8/gems/jruby-rack-1.1.4/lib/jruby-rack-1.1.4.jar!/rack/handler/servlet.rb:41) at Servlet.create_env(file:c:/java/jruby/lib/ruby/gems/1.8/gems/jruby-rack-1.1.4/lib/jruby-rack-1.1.4.jar!/rack/handler/servlet.rb:24) at Servlet.call(file:c:/java/jruby/lib/ruby/gems/1.8/gems/jruby-rack-1.1.4/lib/jruby-rack-1.1.4.jar!/rack/handler/servlet.rb:20) Error: Couldn't handle error org.jruby.exceptions.RaiseException: (NoMethodError) undefined method `upcase' for #<Java::JavaLang:: String :0x5cc2f9> at LazyEnv.load_headers(file:c:/java/jruby/lib/ruby/gems/1.8/gems/jruby-rack-1.1.4/lib/jruby-rack-1.1.4.jar!/rack/handler/servlet.rb:101) at Enumeration.each(c:/java/jruby/lib/ruby/site_ruby/shared/builtin/java/java.util.rb:39) at LazyEnv.load_headers(file:c:/java/jruby/lib/ruby/gems/1.8/gems/jruby-rack-1.1.4/lib/jruby-rack-1.1.4.jar!/rack/handler/servlet.rb:99) at LazyEnv.load_env_key(file:c:/java/jruby/lib/ruby/gems/1.8/gems/jruby-rack-1.1.4/lib/jruby-rack-1.1.4.jar!/rack/handler/servlet.rb:74) at LazyEnv.initialize(file:c:/java/jruby/lib/ruby/gems/1.8/gems/jruby-rack-1.1.4/lib/jruby-rack-1.1.4.jar!/rack/handler/servlet.rb:59) at org.jruby.RubyProc.call(org/jruby/RubyProc.java:270) at org.jruby.RubyProc.call(org/jruby/RubyProc.java:220) at org.jruby.RubyHash. default (org/jruby/RubyHash.java:647) at org.jruby.RubyHash.[](org/jruby/RubyHash.java:1007) at Env.populate(file:c:/java/jruby/lib/ruby/gems/1.8/gems/jruby-rack-1.1.4/lib/jruby-rack-1.1.4.jar!/rack/handler/servlet.rb:47) at Env.initialize(file:c:/java/jruby/lib/ruby/gems/1.8/gems/jruby-rack-1.1.4/lib/jruby-rack-1.1.4.jar!/rack/handler/servlet.rb:41) at Servlet.create_env(file:c:/java/jruby/lib/ruby/gems/1.8/gems/jruby-rack-1.1.4/lib/jruby-rack-1.1.4.jar!/rack/handler/servlet.rb:24) at Servlet.call(file:c:/java/jruby/lib/ruby/gems/1.8/gems/jruby-rack-1.1.4/lib/jruby-rack-1.1.4.jar!/rack/handler/servlet.rb:20) Application Error org.jruby.exceptions.RaiseException: (NoMethodError) undefined method `upcase' for #<Java::JavaLang:: String :0x71fa2c> at LazyEnv.load_headers(file:c:/java/jruby/lib/ruby/gems/1.8/gems/jruby-rack-1.1.4/lib/jruby-rack-1.1.4.jar!/rack/handler/servlet.rb:101) at Enumeration.each(c:/java/jruby/lib/ruby/site_ruby/shared/builtin/java/java.util.rb:39) at LazyEnv.load_headers(file:c:/java/jruby/lib/ruby/gems/1.8/gems/jruby-rack-1.1.4/lib/jruby-rack-1.1.4.jar!/rack/handler/servlet.rb:99) at LazyEnv.load_env_key(file:c:/java/jruby/lib/ruby/gems/1.8/gems/jruby-rack-1.1.4/lib/jruby-rack-1.1.4.jar!/rack/handler/servlet.rb:74) at LazyEnv.initialize(file:c:/java/jruby/lib/ruby/gems/1.8/gems/jruby-rack-1.1.4/lib/jruby-rack-1.1.4.jar!/rack/handler/servlet.rb:59) at org.jruby.RubyProc.call(org/jruby/RubyProc.java:270) at org.jruby.RubyProc.call(org/jruby/RubyProc.java:220) at org.jruby.RubyHash. default (org/jruby/RubyHash.java:647) at org.jruby.RubyHash.[](org/jruby/RubyHash.java:1007) at Env.populate(file:c:/java/jruby/lib/ruby/gems/1.8/gems/jruby-rack-1.1.4/lib/jruby-rack-1.1.4.jar!/rack/handler/servlet.rb:47) at Env.initialize(file:c:/java/jruby/lib/ruby/gems/1.8/gems/jruby-rack-1.1.4/lib/jruby-rack-1.1.4.jar!/rack/handler/servlet.rb:41) at Servlet.create_env(file:c:/java/jruby/lib/ruby/gems/1.8/gems/jruby-rack-1.1.4/lib/jruby-rack-1.1.4.jar!/rack/handler/servlet.rb:24) at Servlet.call(file:c:/java/jruby/lib/ruby/gems/1.8/gems/jruby-rack-1.1.4/lib/jruby-rack-1.1.4.jar!/rack/handler/servlet.rb:20) Error: Couldn't handle error org.jruby.exceptions.RaiseException: (NoMethodError) undefined method `upcase' for #<Java::JavaLang:: String :0x71fa2c> at LazyEnv.load_headers(file:c:/java/jruby/lib/ruby/gems/1.8/gems/jruby-rack-1.1.4/lib/jruby-rack-1.1.4.jar!/rack/handler/servlet.rb:101) at Enumeration.each(c:/java/jruby/lib/ruby/site_ruby/shared/builtin/java/java.util.rb:39) at LazyEnv.load_headers(file:c:/java/jruby/lib/ruby/gems/1.8/gems/jruby-rack-1.1.4/lib/jruby-rack-1.1.4.jar!/rack/handler/servlet.rb:99) at Rack::Handler::LazyEnv.load_env_key(file:c:/java/jruby/lib/ruby/gems/1.8/gems/jruby-rack-1.1.4/lib/jruby-rack-1.1.4.jar!/rack/handler/servlet.rb:74) at LazyEnv.initialize(file:c:/java/jruby/lib/ruby/gems/1.8/gems/jruby-rack-1.1.4/lib/jruby-rack-1.1.4.jar!/rack/handler/servlet.rb:59) at org.jruby.RubyProc.call(org/jruby/RubyProc.java:270) at org.jruby.RubyProc.call(org/jruby/RubyProc.java:220) at org.jruby.RubyHash. default (org/jruby/RubyHash.java:647) at org.jruby.RubyHash.[](org/jruby/RubyHash.java:1007) at Env.populate(file:c:/java/jruby/lib/ruby/gems/1.8/gems/jruby-rack-1.1.4/lib/jruby-rack-1.1.4.jar!/rack/handler/servlet.rb:47) at Env.initialize(file:c:/java/jruby/lib/ruby/gems/1.8/gems/jruby-rack-1.1.4/lib/jruby-rack-1.1.4.jar!/rack/handler/servlet.rb:41) at Servlet.create_env(file:c:/java/jruby/lib/ruby/gems/1.8/gems/jruby-rack-1.1.4/lib/jruby-rack-1.1.4.jar!/rack/handler/servlet.rb:24) at Servlet.call(file:c:/java/jruby/lib/ruby/gems/1.8/gems/jruby-rack-1.1.4/lib/jruby-rack-1.1.4.jar!/rack/handler/servlet.rb:20)
        Hide
        Charles Oliver Nutter added a comment -

        Looking into this one today.

        A Java String should normally never get into Ruby without being coerced. What we're seeing here probably indicates that the Ruby-to-Java logic in my invokedynamic stuff is flawed somehow. I'll try to find the problem.

        Show
        Charles Oliver Nutter added a comment - Looking into this one today. A Java String should normally never get into Ruby without being coerced. What we're seeing here probably indicates that the Ruby-to-Java logic in my invokedynamic stuff is flawed somehow. I'll try to find the problem.
        Hide
        Charles Oliver Nutter added a comment -

        Can someone that can reproduce this run with -X+C -Xbacktrace.style=raw for me? It would give more complete "raw" backtraces.

        Show
        Charles Oliver Nutter added a comment - Can someone that can reproduce this run with -X+C -Xbacktrace.style=raw for me? It would give more complete "raw" backtraces.
        Hide
        Charles Oliver Nutter added a comment -

        The logic involved lives in src/jruby/java/java_ext/java.util.rb, in this code:

        module java::util::Collection
          include Enumerable
          def each(&block)
            iter = iterator
            while iter.hasNext
              yield(iter.next)
            end
          end
        ...
        

        These are normal Java integration calls to Collection#iterator, Iterator#hasNext, and Iterator#next. The "h" value yielded in the troublesome block would be the result of the yield(iter.next) code here, which should coerce its String contents to a Ruby String.

        So far I can't reproduce it in a simple case:

        $ jruby -X+C -rjava -e "al = java.util.ArrayList.new; al << 'foo'; al << 'bar'; al.each {|s| p s.upcase}"
        "FOO"
        "BAR"
        

        This should use invokedynamic for all dispatch and produce the same result as in the bug report, but it doesn't. This is on JRuby master (as of right now) with OpenJDK 7u3.

        Show
        Charles Oliver Nutter added a comment - The logic involved lives in src/jruby/java/java_ext/java.util.rb, in this code: module java::util::Collection include Enumerable def each(&block) iter = iterator while iter.hasNext yield(iter.next) end end ... These are normal Java integration calls to Collection#iterator, Iterator#hasNext, and Iterator#next. The "h" value yielded in the troublesome block would be the result of the yield(iter.next) code here, which should coerce its String contents to a Ruby String. So far I can't reproduce it in a simple case: $ jruby -X+C -rjava -e "al = java.util.ArrayList.new; al << 'foo'; al << 'bar'; al.each {|s| p s.upcase}" "FOO" "BAR" This should use invokedynamic for all dispatch and produce the same result as in the bug report, but it doesn't. This is on JRuby master (as of right now) with OpenJDK 7u3.
        Hide
        Peter K Chan added a comment -

        Charlie, I ran my test case using the command line:

        jruby --1.8 --client -J-Xms200m -J-Xmx768m -J-XX:MaxPermSize=80m -J-Djruby.rack.logging=stdout -J-Djruby.compile.invokedynamic=false -X+C -Xbacktrace.style=raw -S trinidad
        
        Apr 30, 2012 11:48:52 AM org.apache.coyote.AbstractProtocol init
        INFO: Initializing ProtocolHandler ["http-bio-3000"]
        Apr 30, 2012 11:48:52 AM org.apache.catalina.core.StandardService startInternal
        INFO: Starting service Tomcat
        Apr 30, 2012 11:48:52 AM org.apache.catalina.core.StandardEngine startInternal
        INFO: Starting Servlet Engine: Apache Tomcat/7.0.26
        2012-04-30 16:48:52 INFO: No global web.xml found
        Info: received max runtimes = 6
        jruby 1.6.7 (ruby-1.8.7-p357) (2012-02-22 3e82bc8) (Java HotSpot(TM) Client VM 1.7.0_03) [Windows Server 2008 R2-x86-java]
        Info: using runtime pool timeout of 30 seconds
        Info: received min runtimes = 2
        Info: received max runtimes = 6
        Info: add application to the pool. size now = 1
        Info: add application to the pool. size now = 2
        2012-04-30 16:48:58 INFO: Starting ProtocolHandler ["http-bio-3000"]
        Application Error
        org.jruby.exceptions.RaiseException: (NoMethodError) undefined method `upcase' for #<Java::JavaLang::String:0x1ddd76c>
                at java.lang.Thread.getStackTrace(java/lang/Thread.java:1567)
                at org.jruby.runtime.backtrace.TraceType$Gather$1.getBacktraceData(org/jruby/runtime/backtrace/TraceType.java:59)
                at org.jruby.runtime.backtrace.TraceType$Gather.getBacktraceData(org/jruby/runtime/backtrace/TraceType.java:111)
        
                at org.jruby.runtime.backtrace.TraceType.getBacktrace(org/jruby/runtime/backtrace/TraceType.java:25)
                at org.jruby.RubyException.prepareBacktrace(org/jruby/RubyException.java:160)
                at org.jruby.exceptions.RaiseException.preRaise(org/jruby/exceptions/RaiseException.java:205)
                at org.jruby.exceptions.RaiseException.preRaise(org/jruby/exceptions/RaiseException.java:195)
                at org.jruby.exceptions.RaiseException.<init>(org/jruby/exceptions/RaiseException.java:141)
                at org.jruby.exceptions.RaiseException.<init>(org/jruby/exceptions/RaiseException.java:74)
                at org.jruby.RubyKernel.methodMissing(org/jruby/RubyKernel.java:273)
                at org.jruby.RubyKernel.access$000(org/jruby/RubyKernel.java:83)
                at org.jruby.RubyKernel$5.methodMissing(org/jruby/RubyKernel.java:145)
                at org.jruby.RubyKernel$MethodMissingMethod.call(org/jruby/RubyKernel.java:95)
                at org.jruby.internal.runtime.methods.DynamicMethod.call(org/jruby/internal/runtime/methods/DynamicMethod.java:2
        03)
                at org.jruby.runtime.callsite.CachingCallSite.callMethodMissing(org/jruby/runtime/callsite/CachingCallSite.java:
        379)
                at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(org/jruby/runtime/callsite/CachingCallSite.java:289)
                at org.jruby.runtime.callsite.CachingCallSite.call(org/jruby/runtime/callsite/CachingCallSite.java:135)
                at org.jruby.ast.CallNoArgNode.interpret(org/jruby/ast/CallNoArgNode.java:63)
                at org.jruby.ast.CallTwoArgNode.interpret(org/jruby/ast/CallTwoArgNode.java:59)
                at org.jruby.ast.NewlineNode.interpret(org/jruby/ast/NewlineNode.java:104)
                at org.jruby.ast.EvStrNode.interpret(org/jruby/ast/EvStrNode.java:86)
                at org.jruby.ast.DNode.appendToString(org/jruby/ast/DNode.java:61)
                at org.jruby.ast.DNode.buildDynamicString(org/jruby/ast/DNode.java:70)
                at org.jruby.ast.DNode.interpret(org/jruby/ast/DNode.java:35)
                at org.jruby.ast.DAsgnNode.interpret(org/jruby/ast/DAsgnNode.java:110)
                at org.jruby.ast.NewlineNode.interpret(org/jruby/ast/NewlineNode.java:104)
                at org.jruby.ast.BlockNode.interpret(org/jruby/ast/BlockNode.java:71)
                at org.jruby.evaluator.ASTInterpreter.INTERPRET_BLOCK(org/jruby/evaluator/ASTInterpreter.java:111)
                at org.jruby.runtime.InterpretedBlock.evalBlockBody(org/jruby/runtime/InterpretedBlock.java:374)
                at org.jruby.runtime.InterpretedBlock.yield(org/jruby/runtime/InterpretedBlock.java:347)
                at org.jruby.runtime.InterpretedBlock.yield(org/jruby/runtime/InterpretedBlock.java:304)
                at org.jruby.runtime.Block.yield(org/jruby/runtime/Block.java:130)
                at org.jruby.ast.YieldNode.interpret(org/jruby/ast/YieldNode.java:119)
                at org.jruby.ast.NewlineNode.interpret(org/jruby/ast/NewlineNode.java:104)
                at org.jruby.ast.WhileNode.interpret(org/jruby/ast/WhileNode.java:131)
                at org.jruby.ast.NewlineNode.interpret(org/jruby/ast/NewlineNode.java:104)
                at org.jruby.evaluator.ASTInterpreter.INTERPRET_METHOD(org/jruby/evaluator/ASTInterpreter.java:74)
                at org.jruby.internal.runtime.methods.InterpretedMethod.call(org/jruby/internal/runtime/methods/InterpretedMetho
        d.java:169)
                at org.jruby.internal.runtime.methods.DefaultMethod.call(org/jruby/internal/runtime/methods/DefaultMethod.java:1
        91)
                at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(org/jruby/runtime/callsite/CachingCallSite.java:302)
                at org.jruby.runtime.callsite.CachingCallSite.callBlock(org/jruby/runtime/callsite/CachingCallSite.java:144)
                at org.jruby.runtime.callsite.CachingCallSite.callIter(org/jruby/runtime/callsite/CachingCallSite.java:153)
                at org.jruby.ast.CallNoArgBlockNode.interpret(org/jruby/ast/CallNoArgBlockNode.java:64)
                at org.jruby.ast.NewlineNode.interpret(org/jruby/ast/NewlineNode.java:104)
                at org.jruby.ast.BlockNode.interpret(org/jruby/ast/BlockNode.java:71)
                at org.jruby.ast.IfNode.interpret(org/jruby/ast/IfNode.java:119)
                at org.jruby.ast.NewlineNode.interpret(org/jruby/ast/NewlineNode.java:104)
                at org.jruby.ast.BlockNode.interpret(org/jruby/ast/BlockNode.java:71)
                at org.jruby.evaluator.ASTInterpreter.INTERPRET_METHOD(org/jruby/evaluator/ASTInterpreter.java:74)
                at org.jruby.internal.runtime.methods.InterpretedMethod.call(org/jruby/internal/runtime/methods/InterpretedMetho
        d.java:233)
                at org.jruby.internal.runtime.methods.DefaultMethod.call(org/jruby/internal/runtime/methods/DefaultMethod.java:2
        15)
                at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(org/jruby/runtime/callsite/CachingCallSite.java:332)
                at org.jruby.runtime.callsite.CachingCallSite.call(org/jruby/runtime/callsite/CachingCallSite.java:203)
                at org.jruby.ast.FCallTwoArgNode.interpret(org/jruby/ast/FCallTwoArgNode.java:38)
                at org.jruby.ast.NewlineNode.interpret(org/jruby/ast/NewlineNode.java:104)
                at org.jruby.ast.IfNode.interpret(org/jruby/ast/IfNode.java:117)
                at org.jruby.ast.IfNode.interpret(org/jruby/ast/IfNode.java:119)
                at org.jruby.ast.IfNode.interpret(org/jruby/ast/IfNode.java:119)
                at org.jruby.ast.NewlineNode.interpret(org/jruby/ast/NewlineNode.java:104)
                at org.jruby.evaluator.ASTInterpreter.INTERPRET_METHOD(org/jruby/evaluator/ASTInterpreter.java:74)
                at org.jruby.internal.runtime.methods.InterpretedMethod.call(org/jruby/internal/runtime/methods/InterpretedMetho
        d.java:233)
                at org.jruby.internal.runtime.methods.DefaultMethod.call(org/jruby/internal/runtime/methods/DefaultMethod.java:2
        15)
                at org.jruby.runtime.callsite.CachingCallSite.call(org/jruby/runtime/callsite/CachingCallSite.java:201)
                at org.jruby.ast.FCallTwoArgNode.interpret(org/jruby/ast/FCallTwoArgNode.java:38)
                at org.jruby.ast.NewlineNode.interpret(org/jruby/ast/NewlineNode.java:104)
                at org.jruby.evaluator.ASTInterpreter.INTERPRET_BLOCK(org/jruby/evaluator/ASTInterpreter.java:111)
                at org.jruby.runtime.InterpretedBlock.evalBlockBody(org/jruby/runtime/InterpretedBlock.java:374)
                at org.jruby.runtime.InterpretedBlock.yield(org/jruby/runtime/InterpretedBlock.java:328)
                at org.jruby.runtime.BlockBody.call(org/jruby/runtime/BlockBody.java:73)
                at org.jruby.runtime.Block.call(org/jruby/runtime/Block.java:89)
                at org.jruby.RubyProc.call(org/jruby/RubyProc.java:270)
                at org.jruby.RubyProc.call(org/jruby/RubyProc.java:220)
                at org.jruby.RubyProc$i$0$0$call.call(org/jruby/RubyProc$i$0$0$call.gen:65535)
                at org.jruby.internal.runtime.methods.DynamicMethod.call(org/jruby/internal/runtime/methods/DynamicMethod.java:2
        19)
                at org.jruby.internal.runtime.methods.DynamicMethod.call(org/jruby/internal/runtime/methods/DynamicMethod.java:2
        15)
                at org.jruby.RubyClass.finvoke(org/jruby/RubyClass.java:734)
                at org.jruby.javasupport.util.RuntimeHelpers.invoke(org/jruby/javasupport/util/RuntimeHelpers.java:551)
                at org.jruby.RubyHash.default_value_get(org/jruby/RubyHash.java:647)
                at org.jruby.RubyHash$i$default_value_get.call(org/jruby/RubyHash$i$default_value_get.gen:65535)
                at org.jruby.RubyClass.finvoke(org/jruby/RubyClass.java:715)
                at org.jruby.javasupport.util.RuntimeHelpers.invoke(org/jruby/javasupport/util/RuntimeHelpers.java:548)
                at org.jruby.RubyBasicObject.callMethod(org/jruby/RubyBasicObject.java:361)
                at org.jruby.RubyHash.op_aref(org/jruby/RubyHash.java:1007)
                at org.jruby.RubyHash$i$1$0$op_aref.call(org/jruby/RubyHash$i$1$0$op_aref.gen:65535)
                at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(org/jruby/runtime/callsite/CachingCallSite.java:312)
                at org.jruby.runtime.callsite.CachingCallSite.call(org/jruby/runtime/callsite/CachingCallSite.java:169)
                at org.jruby.ast.CallOneArgNode.interpret(org/jruby/ast/CallOneArgNode.java:57)
                at org.jruby.ast.NewlineNode.interpret(org/jruby/ast/NewlineNode.java:104)
                at org.jruby.ast.BlockNode.interpret(org/jruby/ast/BlockNode.java:71)
                at org.jruby.evaluator.ASTInterpreter.INTERPRET_METHOD(org/jruby/evaluator/ASTInterpreter.java:74)
                at org.jruby.internal.runtime.methods.InterpretedMethod.call(org/jruby/internal/runtime/methods/InterpretedMetho
        d.java:190)
                at org.jruby.internal.runtime.methods.DefaultMethod.call(org/jruby/internal/runtime/methods/DefaultMethod.java:1
        99)
                at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(org/jruby/runtime/callsite/CachingCallSite.java:312)
                at org.jruby.runtime.callsite.CachingCallSite.call(org/jruby/runtime/callsite/CachingCallSite.java:169)
                at org.jruby.ast.FCallOneArgNode.interpret(org/jruby/ast/FCallOneArgNode.java:36)
                at org.jruby.ast.InstAsgnNode.interpret(org/jruby/ast/InstAsgnNode.java:95)
                at org.jruby.ast.NewlineNode.interpret(org/jruby/ast/NewlineNode.java:104)
                at org.jruby.evaluator.ASTInterpreter.INTERPRET_METHOD(org/jruby/evaluator/ASTInterpreter.java:74)
                at org.jruby.internal.runtime.methods.InterpretedMethod.call(org/jruby/internal/runtime/methods/InterpretedMetho
        d.java:212)
                at org.jruby.internal.runtime.methods.DefaultMethod.call(org/jruby/internal/runtime/methods/DefaultMethod.java:2
        07)
                at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(org/jruby/runtime/callsite/CachingCallSite.java:322)
                at org.jruby.runtime.callsite.CachingCallSite.callBlock(org/jruby/runtime/callsite/CachingCallSite.java:178)
                at org.jruby.runtime.callsite.CachingCallSite.call(org/jruby/runtime/callsite/CachingCallSite.java:182)
                at org.jruby.RubyClass.newInstance(org/jruby/RubyClass.java:829)
                at org.jruby.RubyClass$i$newInstance.call(org/jruby/RubyClass$i$newInstance.gen:65535)
                at org.jruby.internal.runtime.methods.JavaMethod$JavaMethodZeroOrOneOrNBlock.call(org/jruby/internal/runtime/met
        hods/JavaMethod.java:266)
                at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(org/jruby/runtime/callsite/CachingCallSite.java:312)
                at org.jruby.runtime.callsite.CachingCallSite.call(org/jruby/runtime/callsite/CachingCallSite.java:169)
                at org.jruby.ast.CallOneArgNode.interpret(org/jruby/ast/CallOneArgNode.java:57)
                at org.jruby.ast.CallNoArgNode.interpret(org/jruby/ast/CallNoArgNode.java:63)
                at org.jruby.ast.NewlineNode.interpret(org/jruby/ast/NewlineNode.java:104)
                at org.jruby.evaluator.ASTInterpreter.INTERPRET_METHOD(org/jruby/evaluator/ASTInterpreter.java:74)
                at org.jruby.internal.runtime.methods.InterpretedMethod.call(org/jruby/internal/runtime/methods/InterpretedMetho
        d.java:190)
                at org.jruby.internal.runtime.methods.DefaultMethod.call(org/jruby/internal/runtime/methods/DefaultMethod.java:1
        99)
                at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(org/jruby/runtime/callsite/CachingCallSite.java:312)
                at org.jruby.runtime.callsite.CachingCallSite.call(org/jruby/runtime/callsite/CachingCallSite.java:169)
                at org.jruby.ast.FCallOneArgNode.interpret(org/jruby/ast/FCallOneArgNode.java:36)
                at org.jruby.ast.CallOneArgNode.interpret(org/jruby/ast/CallOneArgNode.java:57)
                at org.jruby.ast.CallOneArgNode.interpret(org/jruby/ast/CallOneArgNode.java:57)
                at org.jruby.ast.NewlineNode.interpret(org/jruby/ast/NewlineNode.java:104)
                at org.jruby.evaluator.ASTInterpreter.INTERPRET_METHOD(org/jruby/evaluator/ASTInterpreter.java:74)
                at org.jruby.internal.runtime.methods.InterpretedMethod.call(org/jruby/internal/runtime/methods/InterpretedMetho
        d.java:190)
                at org.jruby.internal.runtime.methods.DefaultMethod.call(org/jruby/internal/runtime/methods/DefaultMethod.java:1
        99)
                at org.jruby.RubyClass.finvoke(org/jruby/RubyClass.java:715)
                at org.jruby.javasupport.util.RuntimeHelpers.invoke(org/jruby/javasupport/util/RuntimeHelpers.java:548)
                at org.jruby.RubyBasicObject.callMethod(org/jruby/RubyBasicObject.java:361)
                at org.jruby.javasupport.JavaEmbedUtils$1.callMethod(org/jruby/javasupport/JavaEmbedUtils.java:143)
                at org.jruby.rack.DefaultRackApplication.__call(org/jruby/rack/DefaultRackApplication.java:72)
                at org.jruby.rack.DefaultRackApplication.call(org/jruby/rack/DefaultRackApplication.java:40)
                at org.jruby.rack.AbstractRackDispatcher.process(org/jruby/rack/AbstractRackDispatcher.java:33)
                at org.jruby.rack.AbstractServlet.service(org/jruby/rack/AbstractServlet.java:37)
                at org.jruby.rack.AbstractServlet.service(org/jruby/rack/AbstractServlet.java:43)
                at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(org/apache/catalina/core/ApplicationFilterCh
        ain.java:305)
                at org.apache.catalina.core.ApplicationFilterChain.doFilter(org/apache/catalina/core/ApplicationFilterChain.java
        :210)
                at org.apache.catalina.core.StandardWrapperValve.invoke(org/apache/catalina/core/StandardWrapperValve.java:224)
                at org.apache.catalina.core.StandardContextValve.invoke(org/apache/catalina/core/StandardContextValve.java:169)
                at org.apache.catalina.authenticator.AuthenticatorBase.invoke(org/apache/catalina/authenticator/AuthenticatorBas
        e.java:472)
                at org.apache.catalina.core.StandardHostValve.invoke(org/apache/catalina/core/StandardHostValve.java:168)
                at org.apache.catalina.valves.ErrorReportValve.invoke(org/apache/catalina/valves/ErrorReportValve.java:98)
                at org.apache.catalina.core.StandardEngineValve.invoke(org/apache/catalina/core/StandardEngineValve.java:118)
                at org.apache.catalina.connector.CoyoteAdapter.service(org/apache/catalina/connector/CoyoteAdapter.java:407)
                at org.apache.coyote.http11.AbstractHttp11Processor.process(org/apache/coyote/http11/AbstractHttp11Processor.jav
        a:987)
                at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(org/apache/coyote/AbstractProtocol.java:
        579)
                at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(org/apache/tomcat/util/net/JIoEndpoint.java:307)
                at java.util.concurrent.ThreadPoolExecutor.runWorker(java/util/concurrent/ThreadPoolExecutor.java:1110)
                at java.util.concurrent.ThreadPoolExecutor$Worker.run(java/util/concurrent/ThreadPoolExecutor.java:603)
                at java.lang.Thread.run(java/lang/Thread.java:722)
        Error: Couldn't handle error
        org.jruby.exceptions.RaiseException: (NoMethodError) undefined method `upcase' for #<Java::JavaLang::String:0x1ddd76c>
                at java.lang.Thread.getStackTrace(java/lang/Thread.java:1567)
                at org.jruby.runtime.backtrace.TraceType$Gather$1.getBacktraceData(org/jruby/runtime/backtrace/TraceType.java:59
        )
                at org.jruby.runtime.backtrace.TraceType$Gather.getBacktraceData(org/jruby/runtime/backtrace/TraceType.java:111)
        
                at org.jruby.runtime.backtrace.TraceType.getBacktrace(org/jruby/runtime/backtrace/TraceType.java:25)
                at org.jruby.RubyException.prepareBacktrace(org/jruby/RubyException.java:160)
                at org.jruby.exceptions.RaiseException.preRaise(org/jruby/exceptions/RaiseException.java:205)
                at org.jruby.exceptions.RaiseException.preRaise(org/jruby/exceptions/RaiseException.java:195)
                at org.jruby.exceptions.RaiseException.<init>(org/jruby/exceptions/RaiseException.java:141)
                at org.jruby.exceptions.RaiseException.<init>(org/jruby/exceptions/RaiseException.java:74)
                at org.jruby.RubyKernel.methodMissing(org/jruby/RubyKernel.java:273)
                at org.jruby.RubyKernel.access$000(org/jruby/RubyKernel.java:83)
                at org.jruby.RubyKernel$5.methodMissing(org/jruby/RubyKernel.java:145)
                at org.jruby.RubyKernel$MethodMissingMethod.call(org/jruby/RubyKernel.java:95)
                at org.jruby.internal.runtime.methods.DynamicMethod.call(org/jruby/internal/runtime/methods/DynamicMethod.java:2
        03)
                at org.jruby.runtime.callsite.CachingCallSite.callMethodMissing(org/jruby/runtime/callsite/CachingCallSite.java:
        379)
                at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(org/jruby/runtime/callsite/CachingCallSite.java:289)
                at org.jruby.runtime.callsite.CachingCallSite.call(org/jruby/runtime/callsite/CachingCallSite.java:135)
                at org.jruby.ast.CallNoArgNode.interpret(org/jruby/ast/CallNoArgNode.java:63)
                at org.jruby.ast.CallTwoArgNode.interpret(org/jruby/ast/CallTwoArgNode.java:59)
                at org.jruby.ast.NewlineNode.interpret(org/jruby/ast/NewlineNode.java:104)
                at org.jruby.ast.EvStrNode.interpret(org/jruby/ast/EvStrNode.java:86)
                at org.jruby.ast.DNode.appendToString(org/jruby/ast/DNode.java:61)
                at org.jruby.ast.DNode.buildDynamicString(org/jruby/ast/DNode.java:70)
                at org.jruby.ast.DNode.interpret(org/jruby/ast/DNode.java:35)
                at org.jruby.ast.DAsgnNode.interpret(org/jruby/ast/DAsgnNode.java:110)
                at org.jruby.ast.NewlineNode.interpret(org/jruby/ast/NewlineNode.java:104)
                at org.jruby.ast.BlockNode.interpret(org/jruby/ast/BlockNode.java:71)
                at org.jruby.evaluator.ASTInterpreter.INTERPRET_BLOCK(org/jruby/evaluator/ASTInterpreter.java:111)
                at org.jruby.runtime.InterpretedBlock.evalBlockBody(org/jruby/runtime/InterpretedBlock.java:374)
                at org.jruby.runtime.InterpretedBlock.yield(org/jruby/runtime/InterpretedBlock.java:347)
                at org.jruby.runtime.InterpretedBlock.yield(org/jruby/runtime/InterpretedBlock.java:304)
                at org.jruby.runtime.Block.yield(org/jruby/runtime/Block.java:130)
                at org.jruby.ast.YieldNode.interpret(org/jruby/ast/YieldNode.java:119)
                at org.jruby.ast.NewlineNode.interpret(org/jruby/ast/NewlineNode.java:104)
                at org.jruby.ast.WhileNode.interpret(org/jruby/ast/WhileNode.java:131)
                at org.jruby.ast.NewlineNode.interpret(org/jruby/ast/NewlineNode.java:104)
                at org.jruby.evaluator.ASTInterpreter.INTERPRET_METHOD(org/jruby/evaluator/ASTInterpreter.java:74)
                at org.jruby.internal.runtime.methods.InterpretedMethod.call(org/jruby/internal/runtime/methods/InterpretedMethod.java:169)
                at org.jruby.internal.runtime.methods.DefaultMethod.call(org/jruby/internal/runtime/methods/DefaultMethod.java:191)
                at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(org/jruby/runtime/callsite/CachingCallSite.java:302)
                at org.jruby.runtime.callsite.CachingCallSite.callBlock(org/jruby/runtime/callsite/CachingCallSite.java:144)
                at org.jruby.runtime.callsite.CachingCallSite.callIter(org/jruby/runtime/callsite/CachingCallSite.java:153)
                at org.jruby.ast.CallNoArgBlockNode.interpret(org/jruby/ast/CallNoArgBlockNode.java:64)
                at org.jruby.ast.NewlineNode.interpret(org/jruby/ast/NewlineNode.java:104)
                at org.jruby.ast.BlockNode.interpret(org/jruby/ast/BlockNode.java:71)
                at org.jruby.ast.IfNode.interpret(org/jruby/ast/IfNode.java:119)
                at org.jruby.ast.NewlineNode.interpret(org/jruby/ast/NewlineNode.java:104)
                at org.jruby.ast.BlockNode.interpret(org/jruby/ast/BlockNode.java:71)
                at org.jruby.evaluator.ASTInterpreter.INTERPRET_METHOD(org/jruby/evaluator/ASTInterpreter.java:74)
                at org.jruby.internal.runtime.methods.InterpretedMethod.call(org/jruby/internal/runtime/methods/InterpretedMethod.java:233)
                at org.jruby.internal.runtime.methods.DefaultMethod.call(org/jruby/internal/runtime/methods/DefaultMethod.java:215)
                at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(org/jruby/runtime/callsite/CachingCallSite.java:332)
                at org.jruby.runtime.callsite.CachingCallSite.call(org/jruby/runtime/callsite/CachingCallSite.java:203)
                at org.jruby.ast.FCallTwoArgNode.interpret(org/jruby/ast/FCallTwoArgNode.java:38)
                at org.jruby.ast.NewlineNode.interpret(org/jruby/ast/NewlineNode.java:104)
                at org.jruby.ast.IfNode.interpret(org/jruby/ast/IfNode.java:117)
                at org.jruby.ast.IfNode.interpret(org/jruby/ast/IfNode.java:119)
                at org.jruby.ast.IfNode.interpret(org/jruby/ast/IfNode.java:119)
                at org.jruby.ast.NewlineNode.interpret(org/jruby/ast/NewlineNode.java:104)
                at org.jruby.evaluator.ASTInterpreter.INTERPRET_METHOD(org/jruby/evaluator/ASTInterpreter.java:74)
                at org.jruby.internal.runtime.methods.InterpretedMethod.call(org/jruby/internal/runtime/methods/InterpretedMethod.java:233)
                at org.jruby.internal.runtime.methods.DefaultMethod.call(org/jruby/internal/runtime/methods/DefaultMethod.java:215)
                at org.jruby.runtime.callsite.CachingCallSite.call(org/jruby/runtime/callsite/CachingCallSite.java:201)
                at org.jruby.ast.FCallTwoArgNode.interpret(org/jruby/ast/FCallTwoArgNode.java:38)
                at org.jruby.ast.NewlineNode.interpret(org/jruby/ast/NewlineNode.java:104)
                at org.jruby.evaluator.ASTInterpreter.INTERPRET_BLOCK(org/jruby/evaluator/ASTInterpreter.java:111)
                at org.jruby.runtime.InterpretedBlock.evalBlockBody(org/jruby/runtime/InterpretedBlock.java:374)
                at org.jruby.runtime.InterpretedBlock.yield(org/jruby/runtime/InterpretedBlock.java:328)
                at org.jruby.runtime.BlockBody.call(org/jruby/runtime/BlockBody.java:73)
                at org.jruby.runtime.Block.call(org/jruby/runtime/Block.java:89)
                at org.jruby.RubyProc.call(org/jruby/RubyProc.java:270)
                at org.jruby.RubyProc.call(org/jruby/RubyProc.java:220)
                at org.jruby.RubyProc$i$0$0$call.call(org/jruby/RubyProc$i$0$0$call.gen:65535)
                at org.jruby.internal.runtime.methods.DynamicMethod.call(org/jruby/internal/runtime/methods/DynamicMethod.java:219)
                at org.jruby.internal.runtime.methods.DynamicMethod.call(org/jruby/internal/runtime/methods/DynamicMethod.java:215)
                at org.jruby.RubyClass.finvoke(org/jruby/RubyClass.java:734)
                at org.jruby.javasupport.util.RuntimeHelpers.invoke(org/jruby/javasupport/util/RuntimeHelpers.java:551)
                at org.jruby.RubyHash.default_value_get(org/jruby/RubyHash.java:647)
                at org.jruby.RubyHash$i$default_value_get.call(org/jruby/RubyHash$i$default_value_get.gen:65535)
                at org.jruby.RubyClass.finvoke(org/jruby/RubyClass.java:715)
                at org.jruby.javasupport.util.RuntimeHelpers.invoke(org/jruby/javasupport/util/RuntimeHelpers.java:548)
                at org.jruby.RubyBasicObject.callMethod(org/jruby/RubyBasicObject.java:361)
                at org.jruby.RubyHash.op_aref(org/jruby/RubyHash.java:1007)
                at org.jruby.RubyHash$i$1$0$op_aref.call(org/jruby/RubyHash$i$1$0$op_aref.gen:65535)
                at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(org/jruby/runtime/callsite/CachingCallSite.java:312)
                at org.jruby.runtime.callsite.CachingCallSite.call(org/jruby/runtime/callsite/CachingCallSite.java:169)
                at org.jruby.ast.CallOneArgNode.interpret(org/jruby/ast/CallOneArgNode.java:57)
                at org.jruby.ast.NewlineNode.interpret(org/jruby/ast/NewlineNode.java:104)
                at org.jruby.ast.BlockNode.interpret(org/jruby/ast/BlockNode.java:71)
                at org.jruby.evaluator.ASTInterpreter.INTERPRET_METHOD(org/jruby/evaluator/ASTInterpreter.java:74)
                at org.jruby.internal.runtime.methods.InterpretedMethod.call(org/jruby/internal/runtime/methods/InterpretedMethod.java:190)
                at org.jruby.internal.runtime.methods.DefaultMethod.call(org/jruby/internal/runtime/methods/DefaultMethod.java:199)
                at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(org/jruby/runtime/callsite/CachingCallSite.java:312)
                at org.jruby.runtime.callsite.CachingCallSite.call(org/jruby/runtime/callsite/CachingCallSite.java:169)
                at org.jruby.ast.FCallOneArgNode.interpret(org/jruby/ast/FCallOneArgNode.java:36)
                at org.jruby.ast.InstAsgnNode.interpret(org/jruby/ast/InstAsgnNode.java:95)
                at org.jruby.ast.NewlineNode.interpret(org/jruby/ast/NewlineNode.java:104)
                at org.jruby.evaluator.ASTInterpreter.INTERPRET_METHOD(org/jruby/evaluator/ASTInterpreter.java:74)
                at org.jruby.internal.runtime.methods.InterpretedMethod.call(org/jruby/internal/runtime/methods/InterpretedMethod.java:212)
                at org.jruby.internal.runtime.methods.DefaultMethod.call(org/jruby/internal/runtime/methods/DefaultMethod.java:207)
                at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(org/jruby/runtime/callsite/CachingCallSite.java:322)
                at org.jruby.runtime.callsite.CachingCallSite.callBlock(org/jruby/runtime/callsite/CachingCallSite.java:178)
                at org.jruby.runtime.callsite.CachingCallSite.call(org/jruby/runtime/callsite/CachingCallSite.java:182)
                at org.jruby.RubyClass.newInstance(org/jruby/RubyClass.java:829)
                at org.jruby.RubyClass$i$newInstance.call(org/jruby/RubyClass$i$newInstance.gen:65535)
                at org.jruby.internal.runtime.methods.JavaMethod$JavaMethodZeroOrOneOrNBlock.call(org/jruby/internal/runtime/met
        hods/JavaMethod.java:266)
                at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(org/jruby/runtime/callsite/CachingCallSite.java:312)
                at org.jruby.runtime.callsite.CachingCallSite.call(org/jruby/runtime/callsite/CachingCallSite.java:169)
                at org.jruby.ast.CallOneArgNode.interpret(org/jruby/ast/CallOneArgNode.java:57)
                at org.jruby.ast.CallNoArgNode.interpret(org/jruby/ast/CallNoArgNode.java:63)
                at org.jruby.ast.NewlineNode.interpret(org/jruby/ast/NewlineNode.java:104)
                at org.jruby.evaluator.ASTInterpreter.INTERPRET_METHOD(org/jruby/evaluator/ASTInterpreter.java:74)
                at org.jruby.internal.runtime.methods.InterpretedMethod.call(org/jruby/internal/runtime/methods/InterpretedMetho
        d.java:190)
                at org.jruby.internal.runtime.methods.DefaultMethod.call(org/jruby/internal/runtime/methods/DefaultMethod.java:199)
                at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(org/jruby/runtime/callsite/CachingCallSite.java:312)
                at org.jruby.runtime.callsite.CachingCallSite.call(org/jruby/runtime/callsite/CachingCallSite.java:169)
                at org.jruby.ast.FCallOneArgNode.interpret(org/jruby/ast/FCallOneArgNode.java:36)
                at org.jruby.ast.CallOneArgNode.interpret(org/jruby/ast/CallOneArgNode.java:57)
                at org.jruby.ast.CallOneArgNode.interpret(org/jruby/ast/CallOneArgNode.java:57)
                at org.jruby.ast.NewlineNode.interpret(org/jruby/ast/NewlineNode.java:104)
                at org.jruby.evaluator.ASTInterpreter.INTERPRET_METHOD(org/jruby/evaluator/ASTInterpreter.java:74)
                at org.jruby.internal.runtime.methods.InterpretedMethod.call(org/jruby/internal/runtime/methods/InterpretedMethod.java:190)
                at org.jruby.internal.runtime.methods.DefaultMethod.call(org/jruby/internal/runtime/methods/DefaultMethod.java:199)
                at org.jruby.RubyClass.finvoke(org/jruby/RubyClass.java:715)
                at org.jruby.javasupport.util.RuntimeHelpers.invoke(org/jruby/javasupport/util/RuntimeHelpers.java:548)
                at org.jruby.RubyBasicObject.callMethod(org/jruby/RubyBasicObject.java:361)
                at org.jruby.javasupport.JavaEmbedUtils$1.callMethod(org/jruby/javasupport/JavaEmbedUtils.java:143)
                at org.jruby.rack.DefaultRackApplication.__call(org/jruby/rack/DefaultRackApplication.java:72)
                at org.jruby.rack.DefaultRackApplication.call(org/jruby/rack/DefaultRackApplication.java:40)
                at org.jruby.rack.DefaultRackDispatcher.afterException(org/jruby/rack/DefaultRackDispatcher.java:36)
                at org.jruby.rack.AbstractRackDispatcher.handleException(org/jruby/rack/AbstractRackDispatcher.java:55)
                at org.jruby.rack.AbstractRackDispatcher.process(org/jruby/rack/AbstractRackDispatcher.java:36)
                at org.jruby.rack.AbstractServlet.service(org/jruby/rack/AbstractServlet.java:37)
                at org.jruby.rack.AbstractServlet.service(org/jruby/rack/AbstractServlet.java:43)
                at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(org/apache/catalina/core/ApplicationFilterChain.java:305)
                at org.apache.catalina.core.ApplicationFilterChain.doFilter(org/apache/catalina/core/ApplicationFilterChain.java:210)
                at org.apache.catalina.core.StandardWrapperValve.invoke(org/apache/catalina/core/StandardWrapperValve.java:224)
                at org.apache.catalina.core.StandardContextValve.invoke(org/apache/catalina/core/StandardContextValve.java:169)
                at org.apache.catalina.authenticator.AuthenticatorBase.invoke(org/apache/catalina/authenticator/AuthenticatorBase.java:472)
                at org.apache.catalina.core.StandardHostValve.invoke(org/apache/catalina/core/StandardHostValve.java:168)
                at org.apache.catalina.valves.ErrorReportValve.invoke(org/apache/catalina/valves/ErrorReportValve.java:98)
                at org.apache.catalina.core.StandardEngineValve.invoke(org/apache/catalina/core/StandardEngineValve.java:118)
                at org.apache.catalina.connector.CoyoteAdapter.service(org/apache/catalina/connector/CoyoteAdapter.java:407)
                at org.apache.coyote.http11.AbstractHttp11Processor.process(org/apache/coyote/http11/AbstractHttp11Processor.java:987)
                at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(org/apache/coyote/AbstractProtocol.java:579)
                at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(org/apache/tomcat/util/net/JIoEndpoint.java:307)
                at java.util.concurrent.ThreadPoolExecutor.runWorker(java/util/concurrent/ThreadPoolExecutor.java:1110)
                at java.util.concurrent.ThreadPoolExecutor$Worker.run(java/util/concurrent/ThreadPoolExecutor.java:603)
                at java.lang.Thread.run(java/lang/Thread.java:722)
        

        Please note that I turned off invokedynamic on the command line. Also, the bug is somewhat in-deterministic and I usually need to start the web app once or twice before I get the exception.

        Show
        Peter K Chan added a comment - Charlie, I ran my test case using the command line: jruby --1.8 --client -J-Xms200m -J-Xmx768m -J-XX:MaxPermSize=80m -J-Djruby.rack.logging=stdout -J-Djruby.compile.invokedynamic= false -X+C -Xbacktrace.style=raw -S trinidad Apr 30, 2012 11:48:52 AM org.apache.coyote.AbstractProtocol init INFO: Initializing ProtocolHandler [ "http-bio-3000" ] Apr 30, 2012 11:48:52 AM org.apache.catalina.core.StandardService startInternal INFO: Starting service Tomcat Apr 30, 2012 11:48:52 AM org.apache.catalina.core.StandardEngine startInternal INFO: Starting Servlet Engine: Apache Tomcat/7.0.26 2012-04-30 16:48:52 INFO: No global web.xml found Info: received max runtimes = 6 jruby 1.6.7 (ruby-1.8.7-p357) (2012-02-22 3e82bc8) (Java HotSpot(TM) Client VM 1.7.0_03) [Windows Server 2008 R2-x86-java] Info: using runtime pool timeout of 30 seconds Info: received min runtimes = 2 Info: received max runtimes = 6 Info: add application to the pool. size now = 1 Info: add application to the pool. size now = 2 2012-04-30 16:48:58 INFO: Starting ProtocolHandler [ "http-bio-3000" ] Application Error org.jruby.exceptions.RaiseException: (NoMethodError) undefined method `upcase' for #<Java::JavaLang:: String :0x1ddd76c> at java.lang. Thread .getStackTrace(java/lang/ Thread .java:1567) at org.jruby.runtime.backtrace.TraceType$Gather$1.getBacktraceData(org/jruby/runtime/backtrace/TraceType.java:59) at org.jruby.runtime.backtrace.TraceType$Gather.getBacktraceData(org/jruby/runtime/backtrace/TraceType.java:111) at org.jruby.runtime.backtrace.TraceType.getBacktrace(org/jruby/runtime/backtrace/TraceType.java:25) at org.jruby.RubyException.prepareBacktrace(org/jruby/RubyException.java:160) at org.jruby.exceptions.RaiseException.preRaise(org/jruby/exceptions/RaiseException.java:205) at org.jruby.exceptions.RaiseException.preRaise(org/jruby/exceptions/RaiseException.java:195) at org.jruby.exceptions.RaiseException.<init>(org/jruby/exceptions/RaiseException.java:141) at org.jruby.exceptions.RaiseException.<init>(org/jruby/exceptions/RaiseException.java:74) at org.jruby.RubyKernel.methodMissing(org/jruby/RubyKernel.java:273) at org.jruby.RubyKernel.access$000(org/jruby/RubyKernel.java:83) at org.jruby.RubyKernel$5.methodMissing(org/jruby/RubyKernel.java:145) at org.jruby.RubyKernel$MethodMissingMethod.call(org/jruby/RubyKernel.java:95) at org.jruby.internal.runtime.methods.DynamicMethod.call(org/jruby/internal/runtime/methods/DynamicMethod.java:2 03) at org.jruby.runtime.callsite.CachingCallSite.callMethodMissing(org/jruby/runtime/callsite/CachingCallSite.java: 379) at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(org/jruby/runtime/callsite/CachingCallSite.java:289) at org.jruby.runtime.callsite.CachingCallSite.call(org/jruby/runtime/callsite/CachingCallSite.java:135) at org.jruby.ast.CallNoArgNode.interpret(org/jruby/ast/CallNoArgNode.java:63) at org.jruby.ast.CallTwoArgNode.interpret(org/jruby/ast/CallTwoArgNode.java:59) at org.jruby.ast.NewlineNode.interpret(org/jruby/ast/NewlineNode.java:104) at org.jruby.ast.EvStrNode.interpret(org/jruby/ast/EvStrNode.java:86) at org.jruby.ast.DNode.appendToString(org/jruby/ast/DNode.java:61) at org.jruby.ast.DNode.buildDynamicString(org/jruby/ast/DNode.java:70) at org.jruby.ast.DNode.interpret(org/jruby/ast/DNode.java:35) at org.jruby.ast.DAsgnNode.interpret(org/jruby/ast/DAsgnNode.java:110) at org.jruby.ast.NewlineNode.interpret(org/jruby/ast/NewlineNode.java:104) at org.jruby.ast.BlockNode.interpret(org/jruby/ast/BlockNode.java:71) at org.jruby.evaluator.ASTInterpreter.INTERPRET_BLOCK(org/jruby/evaluator/ASTInterpreter.java:111) at org.jruby.runtime.InterpretedBlock.evalBlockBody(org/jruby/runtime/InterpretedBlock.java:374) at org.jruby.runtime.InterpretedBlock.yield(org/jruby/runtime/InterpretedBlock.java:347) at org.jruby.runtime.InterpretedBlock.yield(org/jruby/runtime/InterpretedBlock.java:304) at org.jruby.runtime.Block.yield(org/jruby/runtime/Block.java:130) at org.jruby.ast.YieldNode.interpret(org/jruby/ast/YieldNode.java:119) at org.jruby.ast.NewlineNode.interpret(org/jruby/ast/NewlineNode.java:104) at org.jruby.ast.WhileNode.interpret(org/jruby/ast/WhileNode.java:131) at org.jruby.ast.NewlineNode.interpret(org/jruby/ast/NewlineNode.java:104) at org.jruby.evaluator.ASTInterpreter.INTERPRET_METHOD(org/jruby/evaluator/ASTInterpreter.java:74) at org.jruby.internal.runtime.methods.InterpretedMethod.call(org/jruby/internal/runtime/methods/InterpretedMetho d.java:169) at org.jruby.internal.runtime.methods.DefaultMethod.call(org/jruby/internal/runtime/methods/DefaultMethod.java:1 91) at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(org/jruby/runtime/callsite/CachingCallSite.java:302) at org.jruby.runtime.callsite.CachingCallSite.callBlock(org/jruby/runtime/callsite/CachingCallSite.java:144) at org.jruby.runtime.callsite.CachingCallSite.callIter(org/jruby/runtime/callsite/CachingCallSite.java:153) at org.jruby.ast.CallNoArgBlockNode.interpret(org/jruby/ast/CallNoArgBlockNode.java:64) at org.jruby.ast.NewlineNode.interpret(org/jruby/ast/NewlineNode.java:104) at org.jruby.ast.BlockNode.interpret(org/jruby/ast/BlockNode.java:71) at org.jruby.ast.IfNode.interpret(org/jruby/ast/IfNode.java:119) at org.jruby.ast.NewlineNode.interpret(org/jruby/ast/NewlineNode.java:104) at org.jruby.ast.BlockNode.interpret(org/jruby/ast/BlockNode.java:71) at org.jruby.evaluator.ASTInterpreter.INTERPRET_METHOD(org/jruby/evaluator/ASTInterpreter.java:74) at org.jruby.internal.runtime.methods.InterpretedMethod.call(org/jruby/internal/runtime/methods/InterpretedMetho d.java:233) at org.jruby.internal.runtime.methods.DefaultMethod.call(org/jruby/internal/runtime/methods/DefaultMethod.java:2 15) at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(org/jruby/runtime/callsite/CachingCallSite.java:332) at org.jruby.runtime.callsite.CachingCallSite.call(org/jruby/runtime/callsite/CachingCallSite.java:203) at org.jruby.ast.FCallTwoArgNode.interpret(org/jruby/ast/FCallTwoArgNode.java:38) at org.jruby.ast.NewlineNode.interpret(org/jruby/ast/NewlineNode.java:104) at org.jruby.ast.IfNode.interpret(org/jruby/ast/IfNode.java:117) at org.jruby.ast.IfNode.interpret(org/jruby/ast/IfNode.java:119) at org.jruby.ast.IfNode.interpret(org/jruby/ast/IfNode.java:119) at org.jruby.ast.NewlineNode.interpret(org/jruby/ast/NewlineNode.java:104) at org.jruby.evaluator.ASTInterpreter.INTERPRET_METHOD(org/jruby/evaluator/ASTInterpreter.java:74) at org.jruby.internal.runtime.methods.InterpretedMethod.call(org/jruby/internal/runtime/methods/InterpretedMetho d.java:233) at org.jruby.internal.runtime.methods.DefaultMethod.call(org/jruby/internal/runtime/methods/DefaultMethod.java:2 15) at org.jruby.runtime.callsite.CachingCallSite.call(org/jruby/runtime/callsite/CachingCallSite.java:201) at org.jruby.ast.FCallTwoArgNode.interpret(org/jruby/ast/FCallTwoArgNode.java:38) at org.jruby.ast.NewlineNode.interpret(org/jruby/ast/NewlineNode.java:104) at org.jruby.evaluator.ASTInterpreter.INTERPRET_BLOCK(org/jruby/evaluator/ASTInterpreter.java:111) at org.jruby.runtime.InterpretedBlock.evalBlockBody(org/jruby/runtime/InterpretedBlock.java:374) at org.jruby.runtime.InterpretedBlock.yield(org/jruby/runtime/InterpretedBlock.java:328) at org.jruby.runtime.BlockBody.call(org/jruby/runtime/BlockBody.java:73) at org.jruby.runtime.Block.call(org/jruby/runtime/Block.java:89) at org.jruby.RubyProc.call(org/jruby/RubyProc.java:270) at org.jruby.RubyProc.call(org/jruby/RubyProc.java:220) at org.jruby.RubyProc$i$0$0$call.call(org/jruby/RubyProc$i$0$0$call.gen:65535) at org.jruby.internal.runtime.methods.DynamicMethod.call(org/jruby/internal/runtime/methods/DynamicMethod.java:2 19) at org.jruby.internal.runtime.methods.DynamicMethod.call(org/jruby/internal/runtime/methods/DynamicMethod.java:2 15) at org.jruby.RubyClass.finvoke(org/jruby/RubyClass.java:734) at org.jruby.javasupport.util.RuntimeHelpers.invoke(org/jruby/javasupport/util/RuntimeHelpers.java:551) at org.jruby.RubyHash.default_value_get(org/jruby/RubyHash.java:647) at org.jruby.RubyHash$i$default_value_get.call(org/jruby/RubyHash$i$default_value_get.gen:65535) at org.jruby.RubyClass.finvoke(org/jruby/RubyClass.java:715) at org.jruby.javasupport.util.RuntimeHelpers.invoke(org/jruby/javasupport/util/RuntimeHelpers.java:548) at org.jruby.RubyBasicObject.callMethod(org/jruby/RubyBasicObject.java:361) at org.jruby.RubyHash.op_aref(org/jruby/RubyHash.java:1007) at org.jruby.RubyHash$i$1$0$op_aref.call(org/jruby/RubyHash$i$1$0$op_aref.gen:65535) at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(org/jruby/runtime/callsite/CachingCallSite.java:312) at org.jruby.runtime.callsite.CachingCallSite.call(org/jruby/runtime/callsite/CachingCallSite.java:169) at org.jruby.ast.CallOneArgNode.interpret(org/jruby/ast/CallOneArgNode.java:57) at org.jruby.ast.NewlineNode.interpret(org/jruby/ast/NewlineNode.java:104) at org.jruby.ast.BlockNode.interpret(org/jruby/ast/BlockNode.java:71) at org.jruby.evaluator.ASTInterpreter.INTERPRET_METHOD(org/jruby/evaluator/ASTInterpreter.java:74) at org.jruby.internal.runtime.methods.InterpretedMethod.call(org/jruby/internal/runtime/methods/InterpretedMetho d.java:190) at org.jruby.internal.runtime.methods.DefaultMethod.call(org/jruby/internal/runtime/methods/DefaultMethod.java:1 99) at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(org/jruby/runtime/callsite/CachingCallSite.java:312) at org.jruby.runtime.callsite.CachingCallSite.call(org/jruby/runtime/callsite/CachingCallSite.java:169) at org.jruby.ast.FCallOneArgNode.interpret(org/jruby/ast/FCallOneArgNode.java:36) at org.jruby.ast.InstAsgnNode.interpret(org/jruby/ast/InstAsgnNode.java:95) at org.jruby.ast.NewlineNode.interpret(org/jruby/ast/NewlineNode.java:104) at org.jruby.evaluator.ASTInterpreter.INTERPRET_METHOD(org/jruby/evaluator/ASTInterpreter.java:74) at org.jruby.internal.runtime.methods.InterpretedMethod.call(org/jruby/internal/runtime/methods/InterpretedMetho d.java:212) at org.jruby.internal.runtime.methods.DefaultMethod.call(org/jruby/internal/runtime/methods/DefaultMethod.java:2 07) at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(org/jruby/runtime/callsite/CachingCallSite.java:322) at org.jruby.runtime.callsite.CachingCallSite.callBlock(org/jruby/runtime/callsite/CachingCallSite.java:178) at org.jruby.runtime.callsite.CachingCallSite.call(org/jruby/runtime/callsite/CachingCallSite.java:182) at org.jruby.RubyClass.newInstance(org/jruby/RubyClass.java:829) at org.jruby.RubyClass$i$newInstance.call(org/jruby/RubyClass$i$newInstance.gen:65535) at org.jruby.internal.runtime.methods.JavaMethod$JavaMethodZeroOrOneOrNBlock.call(org/jruby/internal/runtime/met hods/JavaMethod.java:266) at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(org/jruby/runtime/callsite/CachingCallSite.java:312) at org.jruby.runtime.callsite.CachingCallSite.call(org/jruby/runtime/callsite/CachingCallSite.java:169) at org.jruby.ast.CallOneArgNode.interpret(org/jruby/ast/CallOneArgNode.java:57) at org.jruby.ast.CallNoArgNode.interpret(org/jruby/ast/CallNoArgNode.java:63) at org.jruby.ast.NewlineNode.interpret(org/jruby/ast/NewlineNode.java:104) at org.jruby.evaluator.ASTInterpreter.INTERPRET_METHOD(org/jruby/evaluator/ASTInterpreter.java:74) at org.jruby.internal.runtime.methods.InterpretedMethod.call(org/jruby/internal/runtime/methods/InterpretedMetho d.java:190) at org.jruby.internal.runtime.methods.DefaultMethod.call(org/jruby/internal/runtime/methods/DefaultMethod.java:1 99) at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(org/jruby/runtime/callsite/CachingCallSite.java:312) at org.jruby.runtime.callsite.CachingCallSite.call(org/jruby/runtime/callsite/CachingCallSite.java:169) at org.jruby.ast.FCallOneArgNode.interpret(org/jruby/ast/FCallOneArgNode.java:36) at org.jruby.ast.CallOneArgNode.interpret(org/jruby/ast/CallOneArgNode.java:57) at org.jruby.ast.CallOneArgNode.interpret(org/jruby/ast/CallOneArgNode.java:57) at org.jruby.ast.NewlineNode.interpret(org/jruby/ast/NewlineNode.java:104) at org.jruby.evaluator.ASTInterpreter.INTERPRET_METHOD(org/jruby/evaluator/ASTInterpreter.java:74) at org.jruby.internal.runtime.methods.InterpretedMethod.call(org/jruby/internal/runtime/methods/InterpretedMetho d.java:190) at org.jruby.internal.runtime.methods.DefaultMethod.call(org/jruby/internal/runtime/methods/DefaultMethod.java:1 99) at org.jruby.RubyClass.finvoke(org/jruby/RubyClass.java:715) at org.jruby.javasupport.util.RuntimeHelpers.invoke(org/jruby/javasupport/util/RuntimeHelpers.java:548) at org.jruby.RubyBasicObject.callMethod(org/jruby/RubyBasicObject.java:361) at org.jruby.javasupport.JavaEmbedUtils$1.callMethod(org/jruby/javasupport/JavaEmbedUtils.java:143) at org.jruby.rack.DefaultRackApplication.__call(org/jruby/rack/DefaultRackApplication.java:72) at org.jruby.rack.DefaultRackApplication.call(org/jruby/rack/DefaultRackApplication.java:40) at org.jruby.rack.AbstractRackDispatcher.process(org/jruby/rack/AbstractRackDispatcher.java:33) at org.jruby.rack.AbstractServlet.service(org/jruby/rack/AbstractServlet.java:37) at org.jruby.rack.AbstractServlet.service(org/jruby/rack/AbstractServlet.java:43) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(org/apache/catalina/core/ApplicationFilterCh ain.java:305) at org.apache.catalina.core.ApplicationFilterChain.doFilter(org/apache/catalina/core/ApplicationFilterChain.java :210) at org.apache.catalina.core.StandardWrapperValve.invoke(org/apache/catalina/core/StandardWrapperValve.java:224) at org.apache.catalina.core.StandardContextValve.invoke(org/apache/catalina/core/StandardContextValve.java:169) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(org/apache/catalina/authenticator/AuthenticatorBas e.java:472) at org.apache.catalina.core.StandardHostValve.invoke(org/apache/catalina/core/StandardHostValve.java:168) at org.apache.catalina.valves.ErrorReportValve.invoke(org/apache/catalina/valves/ErrorReportValve.java:98) at org.apache.catalina.core.StandardEngineValve.invoke(org/apache/catalina/core/StandardEngineValve.java:118) at org.apache.catalina.connector.CoyoteAdapter.service(org/apache/catalina/connector/CoyoteAdapter.java:407) at org.apache.coyote.http11.AbstractHttp11Processor.process(org/apache/coyote/http11/AbstractHttp11Processor.jav a:987) at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(org/apache/coyote/AbstractProtocol.java: 579) at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(org/apache/tomcat/util/net/JIoEndpoint.java:307) at java.util.concurrent.ThreadPoolExecutor.runWorker(java/util/concurrent/ThreadPoolExecutor.java:1110) at java.util.concurrent.ThreadPoolExecutor$Worker.run(java/util/concurrent/ThreadPoolExecutor.java:603) at java.lang. Thread .run(java/lang/ Thread .java:722) Error: Couldn't handle error org.jruby.exceptions.RaiseException: (NoMethodError) undefined method `upcase' for #<Java::JavaLang:: String :0x1ddd76c> at java.lang. Thread .getStackTrace(java/lang/ Thread .java:1567) at org.jruby.runtime.backtrace.TraceType$Gather$1.getBacktraceData(org/jruby/runtime/backtrace/TraceType.java:59 ) at org.jruby.runtime.backtrace.TraceType$Gather.getBacktraceData(org/jruby/runtime/backtrace/TraceType.java:111) at org.jruby.runtime.backtrace.TraceType.getBacktrace(org/jruby/runtime/backtrace/TraceType.java:25) at org.jruby.RubyException.prepareBacktrace(org/jruby/RubyException.java:160) at org.jruby.exceptions.RaiseException.preRaise(org/jruby/exceptions/RaiseException.java:205) at org.jruby.exceptions.RaiseException.preRaise(org/jruby/exceptions/RaiseException.java:195) at org.jruby.exceptions.RaiseException.<init>(org/jruby/exceptions/RaiseException.java:141) at org.jruby.exceptions.RaiseException.<init>(org/jruby/exceptions/RaiseException.java:74) at org.jruby.RubyKernel.methodMissing(org/jruby/RubyKernel.java:273) at org.jruby.RubyKernel.access$000(org/jruby/RubyKernel.java:83) at org.jruby.RubyKernel$5.methodMissing(org/jruby/RubyKernel.java:145) at org.jruby.RubyKernel$MethodMissingMethod.call(org/jruby/RubyKernel.java:95) at org.jruby.internal.runtime.methods.DynamicMethod.call(org/jruby/internal/runtime/methods/DynamicMethod.java:2 03) at org.jruby.runtime.callsite.CachingCallSite.callMethodMissing(org/jruby/runtime/callsite/CachingCallSite.java: 379) at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(org/jruby/runtime/callsite/CachingCallSite.java:289) at org.jruby.runtime.callsite.CachingCallSite.call(org/jruby/runtime/callsite/CachingCallSite.java:135) at org.jruby.ast.CallNoArgNode.interpret(org/jruby/ast/CallNoArgNode.java:63) at org.jruby.ast.CallTwoArgNode.interpret(org/jruby/ast/CallTwoArgNode.java:59) at org.jruby.ast.NewlineNode.interpret(org/jruby/ast/NewlineNode.java:104) at org.jruby.ast.EvStrNode.interpret(org/jruby/ast/EvStrNode.java:86) at org.jruby.ast.DNode.appendToString(org/jruby/ast/DNode.java:61) at org.jruby.ast.DNode.buildDynamicString(org/jruby/ast/DNode.java:70) at org.jruby.ast.DNode.interpret(org/jruby/ast/DNode.java:35) at org.jruby.ast.DAsgnNode.interpret(org/jruby/ast/DAsgnNode.java:110) at org.jruby.ast.NewlineNode.interpret(org/jruby/ast/NewlineNode.java:104) at org.jruby.ast.BlockNode.interpret(org/jruby/ast/BlockNode.java:71) at org.jruby.evaluator.ASTInterpreter.INTERPRET_BLOCK(org/jruby/evaluator/ASTInterpreter.java:111) at org.jruby.runtime.InterpretedBlock.evalBlockBody(org/jruby/runtime/InterpretedBlock.java:374) at org.jruby.runtime.InterpretedBlock.yield(org/jruby/runtime/InterpretedBlock.java:347) at org.jruby.runtime.InterpretedBlock.yield(org/jruby/runtime/InterpretedBlock.java:304) at org.jruby.runtime.Block.yield(org/jruby/runtime/Block.java:130) at org.jruby.ast.YieldNode.interpret(org/jruby/ast/YieldNode.java:119) at org.jruby.ast.NewlineNode.interpret(org/jruby/ast/NewlineNode.java:104) at org.jruby.ast.WhileNode.interpret(org/jruby/ast/WhileNode.java:131) at org.jruby.ast.NewlineNode.interpret(org/jruby/ast/NewlineNode.java:104) at org.jruby.evaluator.ASTInterpreter.INTERPRET_METHOD(org/jruby/evaluator/ASTInterpreter.java:74) at org.jruby.internal.runtime.methods.InterpretedMethod.call(org/jruby/internal/runtime/methods/InterpretedMethod.java:169) at org.jruby.internal.runtime.methods.DefaultMethod.call(org/jruby/internal/runtime/methods/DefaultMethod.java:191) at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(org/jruby/runtime/callsite/CachingCallSite.java:302) at org.jruby.runtime.callsite.CachingCallSite.callBlock(org/jruby/runtime/callsite/CachingCallSite.java:144) at org.jruby.runtime.callsite.CachingCallSite.callIter(org/jruby/runtime/callsite/CachingCallSite.java:153) at org.jruby.ast.CallNoArgBlockNode.interpret(org/jruby/ast/CallNoArgBlockNode.java:64) at org.jruby.ast.NewlineNode.interpret(org/jruby/ast/NewlineNode.java:104) at org.jruby.ast.BlockNode.interpret(org/jruby/ast/BlockNode.java:71) at org.jruby.ast.IfNode.interpret(org/jruby/ast/IfNode.java:119) at org.jruby.ast.NewlineNode.interpret(org/jruby/ast/NewlineNode.java:104) at org.jruby.ast.BlockNode.interpret(org/jruby/ast/BlockNode.java:71) at org.jruby.evaluator.ASTInterpreter.INTERPRET_METHOD(org/jruby/evaluator/ASTInterpreter.java:74) at org.jruby.internal.runtime.methods.InterpretedMethod.call(org/jruby/internal/runtime/methods/InterpretedMethod.java:233) at org.jruby.internal.runtime.methods.DefaultMethod.call(org/jruby/internal/runtime/methods/DefaultMethod.java:215) at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(org/jruby/runtime/callsite/CachingCallSite.java:332) at org.jruby.runtime.callsite.CachingCallSite.call(org/jruby/runtime/callsite/CachingCallSite.java:203) at org.jruby.ast.FCallTwoArgNode.interpret(org/jruby/ast/FCallTwoArgNode.java:38) at org.jruby.ast.NewlineNode.interpret(org/jruby/ast/NewlineNode.java:104) at org.jruby.ast.IfNode.interpret(org/jruby/ast/IfNode.java:117) at org.jruby.ast.IfNode.interpret(org/jruby/ast/IfNode.java:119) at org.jruby.ast.IfNode.interpret(org/jruby/ast/IfNode.java:119) at org.jruby.ast.NewlineNode.interpret(org/jruby/ast/NewlineNode.java:104) at org.jruby.evaluator.ASTInterpreter.INTERPRET_METHOD(org/jruby/evaluator/ASTInterpreter.java:74) at org.jruby.internal.runtime.methods.InterpretedMethod.call(org/jruby/internal/runtime/methods/InterpretedMethod.java:233) at org.jruby.internal.runtime.methods.DefaultMethod.call(org/jruby/internal/runtime/methods/DefaultMethod.java:215) at org.jruby.runtime.callsite.CachingCallSite.call(org/jruby/runtime/callsite/CachingCallSite.java:201) at org.jruby.ast.FCallTwoArgNode.interpret(org/jruby/ast/FCallTwoArgNode.java:38) at org.jruby.ast.NewlineNode.interpret(org/jruby/ast/NewlineNode.java:104) at org.jruby.evaluator.ASTInterpreter.INTERPRET_BLOCK(org/jruby/evaluator/ASTInterpreter.java:111) at org.jruby.runtime.InterpretedBlock.evalBlockBody(org/jruby/runtime/InterpretedBlock.java:374) at org.jruby.runtime.InterpretedBlock.yield(org/jruby/runtime/InterpretedBlock.java:328) at org.jruby.runtime.BlockBody.call(org/jruby/runtime/BlockBody.java:73) at org.jruby.runtime.Block.call(org/jruby/runtime/Block.java:89) at org.jruby.RubyProc.call(org/jruby/RubyProc.java:270) at org.jruby.RubyProc.call(org/jruby/RubyProc.java:220) at org.jruby.RubyProc$i$0$0$call.call(org/jruby/RubyProc$i$0$0$call.gen:65535) at org.jruby.internal.runtime.methods.DynamicMethod.call(org/jruby/internal/runtime/methods/DynamicMethod.java:219) at org.jruby.internal.runtime.methods.DynamicMethod.call(org/jruby/internal/runtime/methods/DynamicMethod.java:215) at org.jruby.RubyClass.finvoke(org/jruby/RubyClass.java:734) at org.jruby.javasupport.util.RuntimeHelpers.invoke(org/jruby/javasupport/util/RuntimeHelpers.java:551) at org.jruby.RubyHash.default_value_get(org/jruby/RubyHash.java:647) at org.jruby.RubyHash$i$default_value_get.call(org/jruby/RubyHash$i$default_value_get.gen:65535) at org.jruby.RubyClass.finvoke(org/jruby/RubyClass.java:715) at org.jruby.javasupport.util.RuntimeHelpers.invoke(org/jruby/javasupport/util/RuntimeHelpers.java:548) at org.jruby.RubyBasicObject.callMethod(org/jruby/RubyBasicObject.java:361) at org.jruby.RubyHash.op_aref(org/jruby/RubyHash.java:1007) at org.jruby.RubyHash$i$1$0$op_aref.call(org/jruby/RubyHash$i$1$0$op_aref.gen:65535) at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(org/jruby/runtime/callsite/CachingCallSite.java:312) at org.jruby.runtime.callsite.CachingCallSite.call(org/jruby/runtime/callsite/CachingCallSite.java:169) at org.jruby.ast.CallOneArgNode.interpret(org/jruby/ast/CallOneArgNode.java:57) at org.jruby.ast.NewlineNode.interpret(org/jruby/ast/NewlineNode.java:104) at org.jruby.ast.BlockNode.interpret(org/jruby/ast/BlockNode.java:71) at org.jruby.evaluator.ASTInterpreter.INTERPRET_METHOD(org/jruby/evaluator/ASTInterpreter.java:74) at org.jruby.internal.runtime.methods.InterpretedMethod.call(org/jruby/internal/runtime/methods/InterpretedMethod.java:190) at org.jruby.internal.runtime.methods.DefaultMethod.call(org/jruby/internal/runtime/methods/DefaultMethod.java:199) at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(org/jruby/runtime/callsite/CachingCallSite.java:312) at org.jruby.runtime.callsite.CachingCallSite.call(org/jruby/runtime/callsite/CachingCallSite.java:169) at org.jruby.ast.FCallOneArgNode.interpret(org/jruby/ast/FCallOneArgNode.java:36) at org.jruby.ast.InstAsgnNode.interpret(org/jruby/ast/InstAsgnNode.java:95) at org.jruby.ast.NewlineNode.interpret(org/jruby/ast/NewlineNode.java:104) at org.jruby.evaluator.ASTInterpreter.INTERPRET_METHOD(org/jruby/evaluator/ASTInterpreter.java:74) at org.jruby.internal.runtime.methods.InterpretedMethod.call(org/jruby/internal/runtime/methods/InterpretedMethod.java:212) at org.jruby.internal.runtime.methods.DefaultMethod.call(org/jruby/internal/runtime/methods/DefaultMethod.java:207) at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(org/jruby/runtime/callsite/CachingCallSite.java:322) at org.jruby.runtime.callsite.CachingCallSite.callBlock(org/jruby/runtime/callsite/CachingCallSite.java:178) at org.jruby.runtime.callsite.CachingCallSite.call(org/jruby/runtime/callsite/CachingCallSite.java:182) at org.jruby.RubyClass.newInstance(org/jruby/RubyClass.java:829) at org.jruby.RubyClass$i$newInstance.call(org/jruby/RubyClass$i$newInstance.gen:65535) at org.jruby.internal.runtime.methods.JavaMethod$JavaMethodZeroOrOneOrNBlock.call(org/jruby/internal/runtime/met hods/JavaMethod.java:266) at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(org/jruby/runtime/callsite/CachingCallSite.java:312) at org.jruby.runtime.callsite.CachingCallSite.call(org/jruby/runtime/callsite/CachingCallSite.java:169) at org.jruby.ast.CallOneArgNode.interpret(org/jruby/ast/CallOneArgNode.java:57) at org.jruby.ast.CallNoArgNode.interpret(org/jruby/ast/CallNoArgNode.java:63) at org.jruby.ast.NewlineNode.interpret(org/jruby/ast/NewlineNode.java:104) at org.jruby.evaluator.ASTInterpreter.INTERPRET_METHOD(org/jruby/evaluator/ASTInterpreter.java:74) at org.jruby.internal.runtime.methods.InterpretedMethod.call(org/jruby/internal/runtime/methods/InterpretedMetho d.java:190) at org.jruby.internal.runtime.methods.DefaultMethod.call(org/jruby/internal/runtime/methods/DefaultMethod.java:199) at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(org/jruby/runtime/callsite/CachingCallSite.java:312) at org.jruby.runtime.callsite.CachingCallSite.call(org/jruby/runtime/callsite/CachingCallSite.java:169) at org.jruby.ast.FCallOneArgNode.interpret(org/jruby/ast/FCallOneArgNode.java:36) at org.jruby.ast.CallOneArgNode.interpret(org/jruby/ast/CallOneArgNode.java:57) at org.jruby.ast.CallOneArgNode.interpret(org/jruby/ast/CallOneArgNode.java:57) at org.jruby.ast.NewlineNode.interpret(org/jruby/ast/NewlineNode.java:104) at org.jruby.evaluator.ASTInterpreter.INTERPRET_METHOD(org/jruby/evaluator/ASTInterpreter.java:74) at org.jruby.internal.runtime.methods.InterpretedMethod.call(org/jruby/internal/runtime/methods/InterpretedMethod.java:190) at org.jruby.internal.runtime.methods.DefaultMethod.call(org/jruby/internal/runtime/methods/DefaultMethod.java:199) at org.jruby.RubyClass.finvoke(org/jruby/RubyClass.java:715) at org.jruby.javasupport.util.RuntimeHelpers.invoke(org/jruby/javasupport/util/RuntimeHelpers.java:548) at org.jruby.RubyBasicObject.callMethod(org/jruby/RubyBasicObject.java:361) at org.jruby.javasupport.JavaEmbedUtils$1.callMethod(org/jruby/javasupport/JavaEmbedUtils.java:143) at org.jruby.rack.DefaultRackApplication.__call(org/jruby/rack/DefaultRackApplication.java:72) at org.jruby.rack.DefaultRackApplication.call(org/jruby/rack/DefaultRackApplication.java:40) at org.jruby.rack.DefaultRackDispatcher.afterException(org/jruby/rack/DefaultRackDispatcher.java:36) at org.jruby.rack.AbstractRackDispatcher.handleException(org/jruby/rack/AbstractRackDispatcher.java:55) at org.jruby.rack.AbstractRackDispatcher.process(org/jruby/rack/AbstractRackDispatcher.java:36) at org.jruby.rack.AbstractServlet.service(org/jruby/rack/AbstractServlet.java:37) at org.jruby.rack.AbstractServlet.service(org/jruby/rack/AbstractServlet.java:43) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(org/apache/catalina/core/ApplicationFilterChain.java:305) at org.apache.catalina.core.ApplicationFilterChain.doFilter(org/apache/catalina/core/ApplicationFilterChain.java:210) at org.apache.catalina.core.StandardWrapperValve.invoke(org/apache/catalina/core/StandardWrapperValve.java:224) at org.apache.catalina.core.StandardContextValve.invoke(org/apache/catalina/core/StandardContextValve.java:169) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(org/apache/catalina/authenticator/AuthenticatorBase.java:472) at org.apache.catalina.core.StandardHostValve.invoke(org/apache/catalina/core/StandardHostValve.java:168) at org.apache.catalina.valves.ErrorReportValve.invoke(org/apache/catalina/valves/ErrorReportValve.java:98) at org.apache.catalina.core.StandardEngineValve.invoke(org/apache/catalina/core/StandardEngineValve.java:118) at org.apache.catalina.connector.CoyoteAdapter.service(org/apache/catalina/connector/CoyoteAdapter.java:407) at org.apache.coyote.http11.AbstractHttp11Processor.process(org/apache/coyote/http11/AbstractHttp11Processor.java:987) at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(org/apache/coyote/AbstractProtocol.java:579) at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(org/apache/tomcat/util/net/JIoEndpoint.java:307) at java.util.concurrent.ThreadPoolExecutor.runWorker(java/util/concurrent/ThreadPoolExecutor.java:1110) at java.util.concurrent.ThreadPoolExecutor$Worker.run(java/util/concurrent/ThreadPoolExecutor.java:603) at java.lang. Thread .run(java/lang/ Thread .java:722) Please note that I turned off invokedynamic on the command line. Also, the bug is somewhat in-deterministic and I usually need to start the web app once or twice before I get the exception.
        Hide
        Charles Oliver Nutter added a comment -

        Thanks Peter. Indeed, your case is definitely not running invokedynamic, and you have the error. So this is not an invokedynamic problem.

        Unfortunately it looks like -X+C did not pass through to the runtimes that Trinidad starts up. If you can try again with JRUBY_OPTS=-X+C or pass -Xcompile.mode=FORCE it may give us better line numbers.

        In any case, I'm going to look into this again today.

        Show
        Charles Oliver Nutter added a comment - Thanks Peter. Indeed, your case is definitely not running invokedynamic, and you have the error. So this is not an invokedynamic problem. Unfortunately it looks like -X+C did not pass through to the runtimes that Trinidad starts up. If you can try again with JRUBY_OPTS=-X+C or pass -Xcompile.mode=FORCE it may give us better line numbers. In any case, I'm going to look into this again today.
        Hide
        Charles Oliver Nutter added a comment -

        Common themes for everyone:

        • Java 6 works, Java 7 (all versions) does not
        • Error is sporadic, or hard to trigger; seems like that may be JIT delay
        • Happens in various places: iterating a list, getting a string from a Java call, ...
        • Happens with or without invokedynamic enabled (based on Peter Chan's reports)
        • Happens on both Trinidad and Mizuno
        • Appears to be attempting to call #upcase on a Java String that should have coerced
        Show
        Charles Oliver Nutter added a comment - Common themes for everyone: Java 6 works, Java 7 (all versions) does not Error is sporadic, or hard to trigger; seems like that may be JIT delay Happens in various places: iterating a list, getting a string from a Java call, ... Happens with or without invokedynamic enabled (based on Peter Chan's reports) Happens on both Trinidad and Mizuno Appears to be attempting to call #upcase on a Java String that should have coerced
        Hide
        Peter K Chan added a comment -

        Charlie, I re-ran the app using this command line:

        set JRUBY_OPTS=-X+C
        jruby --1.8 --client -J-Xms200m -J-Xmx768m -J-XX:MaxPermSize=80m -J-Djruby.rack.logging=stdout -J-Djruby.compile.invokedynamic=false -X+C -Xcompile.mode=FORCE -Xbacktrace.style=raw -S trinidad
        

        and this is what I got:

        2012-05-15 14:23:57 INFO: No global web.xml found
        Info: received max runtimes = 6
        jruby 1.6.7 (ruby-1.8.7-p357) (2012-02-22 3e82bc8) (Java HotSpot(TM) Client VM 1.7.0_03) [Windows Server 2008 R2-x86-java]
        Info: using runtime pool timeout of 30 seconds
        Info: received min runtimes = 2
        Info: received max runtimes = 6
        Info: add application to the pool. size now = 1
        Info: add application to the pool. size now = 2
        2012-05-15 14:24:19 INFO: Starting ProtocolHandler ["http-bio-3000"]
        Application Error
        org.jruby.exceptions.RaiseException: (NoMethodError) undefined method `upcase' for #<Java::JavaLang::String:0x1c2bfc4>
        	at java.lang.Thread.getStackTrace(java/lang/Thread.java:1567)
        	at org.jruby.runtime.backtrace.TraceType$Gather$1.getBacktraceData(org/jruby/runtime/backtrace/TraceType.java:59)
        	at org.jruby.runtime.backtrace.TraceType$Gather.getBacktraceData(org/jruby/runtime/backtrace/TraceType.java:111)
        	at org.jruby.runtime.backtrace.TraceType.getBacktrace(org/jruby/runtime/backtrace/TraceType.java:25)
        	at org.jruby.RubyException.prepareBacktrace(org/jruby/RubyException.java:160)
        	at org.jruby.exceptions.RaiseException.preRaise(org/jruby/exceptions/RaiseException.java:205)
        	at org.jruby.exceptions.RaiseException.preRaise(org/jruby/exceptions/RaiseException.java:195)
        	at org.jruby.exceptions.RaiseException.<init>(org/jruby/exceptions/RaiseException.java:141)
        	at org.jruby.exceptions.RaiseException.<init>(org/jruby/exceptions/RaiseException.java:74)
        	at org.jruby.RubyKernel.methodMissing(org/jruby/RubyKernel.java:273)
        	at org.jruby.RubyKernel.access$000(org/jruby/RubyKernel.java:83)
        	at org.jruby.RubyKernel$5.methodMissing(org/jruby/RubyKernel.java:145)
        	at org.jruby.RubyKernel$MethodMissingMethod.call(org/jruby/RubyKernel.java:95)
        	at org.jruby.internal.runtime.methods.DynamicMethod.call(org/jruby/internal/runtime/methods/DynamicMethod.java:203)
        	at org.jruby.runtime.callsite.CachingCallSite.callMethodMissing(org/jruby/runtime/callsite/CachingCallSite.java:379)
        	at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(org/jruby/runtime/callsite/CachingCallSite.java:289)
        	at org.jruby.runtime.callsite.CachingCallSite.call(org/jruby/runtime/callsite/CachingCallSite.java:135)
        	at $_3a_.java.jruby.lib.ruby.gems.$1_dot_8.gems.jruby_minus_rack_minus_1_dot_1_dot_5.lib.jruby_minus_rack_minus_1_dot_1_dot_5_dot_jar.rack.handler.servlet.load_headers(file:c:/java/jruby/lib/ruby/gems/1.8/gems/jruby-rack-1.1.5/lib/jruby-rack-1.1.5.jar!/rack/handler/servlet.rb:99)
        	at $_3a_$java$jruby$lib$ruby$gems$$1_dot_8$gems$jruby_minus_rack_minus_1_dot_1_dot_5$lib$jruby_minus_rack_minus_1_dot_1_dot_5_dot_jar$rack$handler$servlet$block_5$RUBY$load_headers.call($_3a_$java$jruby$lib$ruby$gems$$1_dot_8$gems$jruby_minus_rack_minus_1_dot_1_dot_5$lib$jruby_minus_rack_minus_1_dot_1_dot_5_dot_jar$rack$handler$servlet$block_5$RUBY$load_headers:65535)
        	at org.jruby.runtime.CompiledBlock.yield(org/jruby/runtime/CompiledBlock.java:112)
        	at org.jruby.runtime.CompiledBlock.yield(org/jruby/runtime/CompiledBlock.java:95)
        	at org.jruby.runtime.Block.yield(org/jruby/runtime/Block.java:130)
        	at c_3a_.java.jruby.lib.ruby.site_ruby.shared.builtin.java.java_dot_util.each(c:/java/jruby/lib/ruby/site_ruby/shared/builtin/java/java.util.rb:39)
        	at c_3a_$java$jruby$lib$ruby$site_ruby$shared$builtin$java$java_dot_util$method__10$RUBY$each.call(c_3a_$java$jruby$lib$ruby$site_ruby$shared$builtin$java$java_dot_util$method__10$RUBY$each:65535)
        	at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(org/jruby/runtime/callsite/CachingCallSite.java:302)
        	at org.jruby.runtime.callsite.CachingCallSite.callBlock(org/jruby/runtime/callsite/CachingCallSite.java:144)
        	at org.jruby.runtime.callsite.CachingCallSite.callIter(org/jruby/runtime/callsite/CachingCallSite.java:153)
        	at $_3a_.java.jruby.lib.ruby.gems.$1_dot_8.gems.jruby_minus_rack_minus_1_dot_1_dot_5.lib.jruby_minus_rack_minus_1_dot_1_dot_5_dot_jar.rack.handler.servlet.load_headers(file:c:/java/jruby/lib/ruby/gems/1.8/gems/jruby-rack-1.1.5/lib/jruby-rack-1.1.5.jar!/rack/handler/servlet.rb:97)
        	at $_3a_$java$jruby$lib$ruby$gems$$1_dot_8$gems$jruby_minus_rack_minus_1_dot_1_dot_5$lib$jruby_minus_rack_minus_1_dot_1_dot_5_dot_jar$rack$handler$servlet$method__16$RUBY$load_headers.call($_3a_$java$jruby$lib$ruby$gems$$1_dot_8$gems$jruby_minus_rack_minus_1_dot_1_dot_5$lib$jruby_minus_rack_minus_1_dot_1_dot_5_dot_jar$rack$handler$servlet$method__16$RUBY$load_headers:65535)
        	at $_3a_$java$jruby$lib$ruby$gems$$1_dot_8$gems$jruby_minus_rack_minus_1_dot_1_dot_5$lib$jruby_minus_rack_minus_1_dot_1_dot_5_dot_jar$rack$handler$servlet$method__16$RUBY$load_headers.call($_3a_$java$jruby$lib$ruby$gems$$1_dot_8$gems$jruby_minus_rack_minus_1_dot_1_dot_5$lib$jruby_minus_rack_minus_1_dot_1_dot_5_dot_jar$rack$handler$servlet$method__16$RUBY$load_headers:65535)
        	at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(org/jruby/runtime/callsite/CachingCallSite.java:332)
        	at org.jruby.runtime.callsite.CachingCallSite.call(org/jruby/runtime/callsite/CachingCallSite.java:203)
        	at $_3a_.java.jruby.lib.ruby.gems.$1_dot_8.gems.jruby_minus_rack_minus_1_dot_1_dot_5.lib.jruby_minus_rack_minus_1_dot_1_dot_5_dot_jar.rack.handler.servlet.load_env_key(file:c:/java/jruby/lib/ruby/gems/1.8/gems/jruby-rack-1.1.5/lib/jruby-rack-1.1.5.jar!/rack/handler/servlet.rb:76)
        	at $_3a_$java$jruby$lib$ruby$gems$$1_dot_8$gems$jruby_minus_rack_minus_1_dot_1_dot_5$lib$jruby_minus_rack_minus_1_dot_1_dot_5_dot_jar$rack$handler$servlet$method__14$RUBY$load_env_key.call($_3a_$java$jruby$lib$ruby$gems$$1_dot_8$gems$jruby_minus_rack_minus_1_dot_1_dot_5$lib$jruby_minus_rack_minus_1_dot_1_dot_5_dot_jar$rack$handler$servlet$method__14$RUBY$load_env_key:65535)
        	at $_3a_$java$jruby$lib$ruby$gems$$1_dot_8$gems$jruby_minus_rack_minus_1_dot_1_dot_5$lib$jruby_minus_rack_minus_1_dot_1_dot_5_dot_jar$rack$handler$servlet$method__14$RUBY$load_env_key.call($_3a_$java$jruby$lib$ruby$gems$$1_dot_8$gems$jruby_minus_rack_minus_1_dot_1_dot_5$lib$jruby_minus_rack_minus_1_dot_1_dot_5_dot_jar$rack$handler$servlet$method__14$RUBY$load_env_key:65535)
        	at org.jruby.runtime.callsite.CachingCallSite.call(org/jruby/runtime/callsite/CachingCallSite.java:201)
        	at $_3a_.java.jruby.lib.ruby.gems.$1_dot_8.gems.jruby_minus_rack_minus_1_dot_1_dot_5.lib.jruby_minus_rack_minus_1_dot_1_dot_5_dot_jar.rack.handler.servlet.initialize(file:c:/java/jruby/lib/ruby/gems/1.8/gems/jruby-rack-1.1.5/lib/jruby-rack-1.1.5.jar!/rack/handler/servlet.rb:61)
        	at $_3a_$java$jruby$lib$ruby$gems$$1_dot_8$gems$jruby_minus_rack_minus_1_dot_1_dot_5$lib$jruby_minus_rack_minus_1_dot_1_dot_5_dot_jar$rack$handler$servlet$block_3$RUBY$initialize.call($_3a_$java$jruby$lib$ruby$gems$$1_dot_8$gems$jruby_minus_rack_minus_1_dot_1_dot_5$lib$jruby_minus_rack_minus_1_dot_1_dot_5_dot_jar$rack$handler$servlet$block_3$RUBY$initialize:65535)
        	at org.jruby.runtime.CompiledBlock.yield(org/jruby/runtime/CompiledBlock.java:133)
        	at org.jruby.runtime.BlockBody.call(org/jruby/runtime/BlockBody.java:73)
        	at org.jruby.runtime.Block.call(org/jruby/runtime/Block.java:89)
        	at org.jruby.RubyProc.call(org/jruby/RubyProc.java:270)
        	at org.jruby.RubyProc.call(org/jruby/RubyProc.java:220)
        	at org.jruby.RubyProc$i$0$0$call.call(org/jruby/RubyProc$i$0$0$call.gen:65535)
        	at org.jruby.internal.runtime.methods.DynamicMethod.call(org/jruby/internal/runtime/methods/DynamicMethod.java:219)
        	at org.jruby.internal.runtime.methods.DynamicMethod.call(org/jruby/internal/runtime/methods/DynamicMethod.java:215)
        	at org.jruby.RubyClass.finvoke(org/jruby/RubyClass.java:734)
        	at org.jruby.javasupport.util.RuntimeHelpers.invoke(org/jruby/javasupport/util/RuntimeHelpers.java:551)
        	at org.jruby.RubyHash.default_value_get(org/jruby/RubyHash.java:647)
        	at org.jruby.RubyHash$i$default_value_get.call(org/jruby/RubyHash$i$default_value_get.gen:65535)
        	at org.jruby.RubyClass.finvoke(org/jruby/RubyClass.java:715)
        	at org.jruby.javasupport.util.RuntimeHelpers.invoke(org/jruby/javasupport/util/RuntimeHelpers.java:548)
        	at org.jruby.RubyBasicObject.callMethod(org/jruby/RubyBasicObject.java:361)
        	at org.jruby.RubyHash.op_aref(org/jruby/RubyHash.java:1007)
        	at org.jruby.RubyHash$i$1$0$op_aref.call(org/jruby/RubyHash$i$1$0$op_aref.gen:65535)
        	at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(org/jruby/runtime/callsite/CachingCallSite.java:312)
        	at org.jruby.runtime.callsite.CachingCallSite.call(org/jruby/runtime/callsite/CachingCallSite.java:169)
        	at $_3a_.java.jruby.lib.ruby.gems.$1_dot_8.gems.jruby_minus_rack_minus_1_dot_1_dot_5.lib.jruby_minus_rack_minus_1_dot_1_dot_5_dot_jar.rack.handler.servlet.populate(file:c:/java/jruby/lib/ruby/gems/1.8/gems/jruby-rack-1.1.5/lib/jruby-rack-1.1.5.jar!/rack/handler/servlet.rb:48)
        	at $_3a_$java$jruby$lib$ruby$gems$$1_dot_8$gems$jruby_minus_rack_minus_1_dot_1_dot_5$lib$jruby_minus_rack_minus_1_dot_1_dot_5_dot_jar$rack$handler$servlet$method__9$RUBY$populate.call($_3a_$java$jruby$lib$ruby$gems$$1_dot_8$gems$jruby_minus_rack_minus_1_dot_1_dot_5$lib$jruby_minus_rack_minus_1_dot_1_dot_5_dot_jar$rack$handler$servlet$method__9$RUBY$populate:65535)
        	at $_3a_$java$jruby$lib$ruby$gems$$1_dot_8$gems$jruby_minus_rack_minus_1_dot_1_dot_5$lib$jruby_minus_rack_minus_1_dot_1_dot_5_dot_jar$rack$handler$servlet$method__9$RUBY$populate.call($_3a_$java$jruby$lib$ruby$gems$$1_dot_8$gems$jruby_minus_rack_minus_1_dot_1_dot_5$lib$jruby_minus_rack_minus_1_dot_1_dot_5_dot_jar$rack$handler$servlet$method__9$RUBY$populate:65535)
        	at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(org/jruby/runtime/callsite/CachingCallSite.java:312)
        	at org.jruby.runtime.callsite.CachingCallSite.call(org/jruby/runtime/callsite/CachingCallSite.java:169)
        	at $_3a_.java.jruby.lib.ruby.gems.$1_dot_8.gems.jruby_minus_rack_minus_1_dot_1_dot_5.lib.jruby_minus_rack_minus_1_dot_1_dot_5_dot_jar.rack.handler.servlet.initialize(file:c:/java/jruby/lib/ruby/gems/1.8/gems/jruby-rack-1.1.5/lib/jruby-rack-1.1.5.jar!/rack/handler/servlet.rb:42)
        	at $_3a_$java$jruby$lib$ruby$gems$$1_dot_8$gems$jruby_minus_rack_minus_1_dot_1_dot_5$lib$jruby_minus_rack_minus_1_dot_1_dot_5_dot_jar$rack$handler$servlet$method__8$RUBY$initialize.call($_3a_$java$jruby$lib$ruby$gems$$1_dot_8$gems$jruby_minus_rack_minus_1_dot_1_dot_5$lib$jruby_minus_rack_minus_1_dot_1_dot_5_dot_jar$rack$handler$servlet$method__8$RUBY$initialize:65535)
        	at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(org/jruby/runtime/callsite/CachingCallSite.java:322)
        	at org.jruby.runtime.callsite.CachingCallSite.callBlock(org/jruby/runtime/callsite/CachingCallSite.java:178)
        	at org.jruby.runtime.callsite.CachingCallSite.call(org/jruby/runtime/callsite/CachingCallSite.java:182)
        	at org.jruby.RubyClass.newInstance(org/jruby/RubyClass.java:829)
        	at org.jruby.RubyClass$i$newInstance.call(org/jruby/RubyClass$i$newInstance.gen:65535)
        	at org.jruby.internal.runtime.methods.JavaMethod$JavaMethodZeroOrOneOrNBlock.call(org/jruby/internal/runtime/methods/JavaMethod.java:266)
        	at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(org/jruby/runtime/callsite/CachingCallSite.java:312)
        	at org.jruby.runtime.callsite.CachingCallSite.call(org/jruby/runtime/callsite/CachingCallSite.java:169)
        	at $_3a_.java.jruby.lib.ruby.gems.$1_dot_8.gems.jruby_minus_rack_minus_1_dot_1_dot_5.lib.jruby_minus_rack_minus_1_dot_1_dot_5_dot_jar.rack.handler.servlet.create_env(file:c:/java/jruby/lib/ruby/gems/1.8/gems/jruby-rack-1.1.5/lib/jruby-rack-1.1.5.jar!/rack/handler/servlet.rb:25)
        	at $_3a_$java$jruby$lib$ruby$gems$$1_dot_8$gems$jruby_minus_rack_minus_1_dot_1_dot_5$lib$jruby_minus_rack_minus_1_dot_1_dot_5_dot_jar$rack$handler$servlet$method__5$RUBY$create_env.call($_3a_$java$jruby$lib$ruby$gems$$1_dot_8$gems$jruby_minus_rack_minus_1_dot_1_dot_5$lib$jruby_minus_rack_minus_1_dot_1_dot_5_dot_jar$rack$handler$servlet$method__5$RUBY$create_env:65535)
        	at $_3a_$java$jruby$lib$ruby$gems$$1_dot_8$gems$jruby_minus_rack_minus_1_dot_1_dot_5$lib$jruby_minus_rack_minus_1_dot_1_dot_5_dot_jar$rack$handler$servlet$method__5$RUBY$create_env.call($_3a_$java$jruby$lib$ruby$gems$$1_dot_8$gems$jruby_minus_rack_minus_1_dot_1_dot_5$lib$jruby_minus_rack_minus_1_dot_1_dot_5_dot_jar$rack$handler$servlet$method__5$RUBY$create_env:65535)
        	at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(org/jruby/runtime/callsite/CachingCallSite.java:312)
        	at org.jruby.runtime.callsite.CachingCallSite.call(org/jruby/runtime/callsite/CachingCallSite.java:169)
        	at $_3a_.java.jruby.lib.ruby.gems.$1_dot_8.gems.jruby_minus_rack_minus_1_dot_1_dot_5.lib.jruby_minus_rack_minus_1_dot_1_dot_5_dot_jar.rack.handler.servlet.call(file:c:/java/jruby/lib/ruby/gems/1.8/gems/jruby-rack-1.1.5/lib/jruby-rack-1.1.5.jar!/rack/handler/servlet.rb:21)
        	at $_3a_$java$jruby$lib$ruby$gems$$1_dot_8$gems$jruby_minus_rack_minus_1_dot_1_dot_5$lib$jruby_minus_rack_minus_1_dot_1_dot_5_dot_jar$rack$handler$servlet$method__4$RUBY$call.call($_3a_$java$jruby$lib$ruby$gems$$1_dot_8$gems$jruby_minus_rack_minus_1_dot_1_dot_5$lib$jruby_minus_rack_minus_1_dot_1_dot_5_dot_jar$rack$handler$servlet$method__4$RUBY$call:65535)
        	at $_3a_$java$jruby$lib$ruby$gems$$1_dot_8$gems$jruby_minus_rack_minus_1_dot_1_dot_5$lib$jruby_minus_rack_minus_1_dot_1_dot_5_dot_jar$rack$handler$servlet$method__4$RUBY$call.call($_3a_$java$jruby$lib$ruby$gems$$1_dot_8$gems$jruby_minus_rack_minus_1_dot_1_dot_5$lib$jruby_minus_rack_minus_1_dot_1_dot_5_dot_jar$rack$handler$servlet$method__4$RUBY$call:65535)
        	at org.jruby.RubyClass.finvoke(org/jruby/RubyClass.java:715)
        	at org.jruby.javasupport.util.RuntimeHelpers.invoke(org/jruby/javasupport/util/RuntimeHelpers.java:548)
        	at org.jruby.RubyBasicObject.callMethod(org/jruby/RubyBasicObject.java:361)
        	at org.jruby.javasupport.JavaEmbedUtils$1.callMethod(org/jruby/javasupport/JavaEmbedUtils.java:143)
        	at org.jruby.rack.DefaultRackApplication.__call(org/jruby/rack/DefaultRackApplication.java:72)
        	at org.jruby.rack.DefaultRackApplication.call(org/jruby/rack/DefaultRackApplication.java:40)
        	at org.jruby.rack.AbstractRackDispatcher.process(org/jruby/rack/AbstractRackDispatcher.java:33)
        	at org.jruby.rack.AbstractServlet.service(org/jruby/rack/AbstractServlet.java:37)
        	at org.jruby.rack.AbstractServlet.service(org/jruby/rack/AbstractServlet.java:43)
        	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(org/apache/catalina/core/ApplicationFilterChain.java:305)
        	at org.apache.catalina.core.ApplicationFilterChain.doFilter(org/apache/catalina/core/ApplicationFilterChain.java:210)
        	at org.apache.catalina.core.StandardWrapperValve.invoke(org/apache/catalina/core/StandardWrapperValve.java:224)
        	at org.apache.catalina.core.StandardContextValve.invoke(org/apache/catalina/core/StandardContextValve.java:169)
        	at org.apache.catalina.authenticator.AuthenticatorBase.invoke(org/apache/catalina/authenticator/AuthenticatorBase.java:472)
        	at org.apache.catalina.core.StandardHostValve.invoke(org/apache/catalina/core/StandardHostValve.java:168)
        	at org.apache.catalina.valves.ErrorReportValve.invoke(org/apache/catalina/valves/ErrorReportValve.java:98)
        	at org.apache.catalina.core.StandardEngineValve.invoke(org/apache/catalina/core/StandardEngineValve.java:118)
        	at org.apache.catalina.connector.CoyoteAdapter.service(org/apache/catalina/connector/CoyoteAdapter.java:407)
        	at org.apache.coyote.http11.AbstractHttp11Processor.process(org/apache/coyote/http11/AbstractHttp11Processor.java:987)
        	at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(org/apache/coyote/AbstractProtocol.java:579)
        	at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(org/apache/tomcat/util/net/JIoEndpoint.java:307)
        	at java.util.concurrent.ThreadPoolExecutor.runWorker(java/util/concurrent/ThreadPoolExecutor.java:1110)
        	at java.util.concurrent.ThreadPoolExecutor$Worker.run(java/util/concurrent/ThreadPoolExecutor.java:603)
        	at java.lang.Thread.run(java/lang/Thread.java:722)
        Error: Couldn't handle error
        org.jruby.exceptions.RaiseException: (NoMethodError) undefined method `upcase' for #<Java::JavaLang::String:0x1c2bfc4>
        	at java.lang.Thread.getStackTrace(java/lang/Thread.java:1567)
        	at org.jruby.runtime.backtrace.TraceType$Gather$1.getBacktraceData(org/jruby/runtime/backtrace/TraceType.java:59)
        	at org.jruby.runtime.backtrace.TraceType$Gather.getBacktraceData(org/jruby/runtime/backtrace/TraceType.java:111)
        	at org.jruby.runtime.backtrace.TraceType.getBacktrace(org/jruby/runtime/backtrace/TraceType.java:25)
        	at org.jruby.RubyException.prepareBacktrace(org/jruby/RubyException.java:160)
        	at org.jruby.exceptions.RaiseException.preRaise(org/jruby/exceptions/RaiseException.java:205)
        	at org.jruby.exceptions.RaiseException.preRaise(org/jruby/exceptions/RaiseException.java:195)
        	at org.jruby.exceptions.RaiseException.<init>(org/jruby/exceptions/RaiseException.java:141)
        	at org.jruby.exceptions.RaiseException.<init>(org/jruby/exceptions/RaiseException.java:74)
        	at org.jruby.RubyKernel.methodMissing(org/jruby/RubyKernel.java:273)
        	at org.jruby.RubyKernel.access$000(org/jruby/RubyKernel.java:83)
        	at org.jruby.RubyKernel$5.methodMissing(org/jruby/RubyKernel.java:145)
        	at org.jruby.RubyKernel$MethodMissingMethod.call(org/jruby/RubyKernel.java:95)
        	at org.jruby.internal.runtime.methods.DynamicMethod.call(org/jruby/internal/runtime/methods/DynamicMethod.java:203)
        	at org.jruby.runtime.callsite.CachingCallSite.callMethodMissing(org/jruby/runtime/callsite/CachingCallSite.java:379)
        	at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(org/jruby/runtime/callsite/CachingCallSite.java:289)
        	at org.jruby.runtime.callsite.CachingCallSite.call(org/jruby/runtime/callsite/CachingCallSite.java:135)
        	at $_3a_.java.jruby.lib.ruby.gems.$1_dot_8.gems.jruby_minus_rack_minus_1_dot_1_dot_5.lib.jruby_minus_rack_minus_1_dot_1_dot_5_dot_jar.rack.handler.servlet.load_headers(file:c:/java/jruby/lib/ruby/gems/1.8/gems/jruby-rack-1.1.5/lib/jruby-rack-1.1.5.jar!/rack/handler/servlet.rb:99)
        	at $_3a_$java$jruby$lib$ruby$gems$$1_dot_8$gems$jruby_minus_rack_minus_1_dot_1_dot_5$lib$jruby_minus_rack_minus_1_dot_1_dot_5_dot_jar$rack$handler$servlet$block_5$RUBY$load_headers.call($_3a_$java$jruby$lib$ruby$gems$$1_dot_8$gems$jruby_minus_rack_minus_1_dot_1_dot_5$lib$jruby_minus_rack_minus_1_dot_1_dot_5_dot_jar$rack$handler$servlet$block_5$RUBY$load_headers:65535)
        	at org.jruby.runtime.CompiledBlock.yield(org/jruby/runtime/CompiledBlock.java:112)
        	at org.jruby.runtime.CompiledBlock.yield(org/jruby/runtime/CompiledBlock.java:95)
        	at org.jruby.runtime.Block.yield(org/jruby/runtime/Block.java:130)
        	at c_3a_.java.jruby.lib.ruby.site_ruby.shared.builtin.java.java_dot_util.each(c:/java/jruby/lib/ruby/site_ruby/shared/builtin/java/java.util.rb:39)
        	at c_3a_$java$jruby$lib$ruby$site_ruby$shared$builtin$java$java_dot_util$method__10$RUBY$each.call(c_3a_$java$jruby$lib$ruby$site_ruby$shared$builtin$java$java_dot_util$method__10$RUBY$each:65535)
        	at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(org/jruby/runtime/callsite/CachingCallSite.java:302)
        	at org.jruby.runtime.callsite.CachingCallSite.callBlock(org/jruby/runtime/callsite/CachingCallSite.java:144)
        	at org.jruby.runtime.callsite.CachingCallSite.callIter(org/jruby/runtime/callsite/CachingCallSite.java:153)
        	at $_3a_.java.jruby.lib.ruby.gems.$1_dot_8.gems.jruby_minus_rack_minus_1_dot_1_dot_5.lib.jruby_minus_rack_minus_1_dot_1_dot_5_dot_jar.rack.handler.servlet.load_headers(file:c:/java/jruby/lib/ruby/gems/1.8/gems/jruby-rack-1.1.5/lib/jruby-rack-1.1.5.jar!/rack/handler/servlet.rb:97)
        	at $_3a_$java$jruby$lib$ruby$gems$$1_dot_8$gems$jruby_minus_rack_minus_1_dot_1_dot_5$lib$jruby_minus_rack_minus_1_dot_1_dot_5_dot_jar$rack$handler$servlet$method__16$RUBY$load_headers.call($_3a_$java$jruby$lib$ruby$gems$$1_dot_8$gems$jruby_minus_rack_minus_1_dot_1_dot_5$lib$jruby_minus_rack_minus_1_dot_1_dot_5_dot_jar$rack$handler$servlet$method__16$RUBY$load_headers:65535)
        	at $_3a_$java$jruby$lib$ruby$gems$$1_dot_8$gems$jruby_minus_rack_minus_1_dot_1_dot_5$lib$jruby_minus_rack_minus_1_dot_1_dot_5_dot_jar$rack$handler$servlet$method__16$RUBY$load_headers.call($_3a_$java$jruby$lib$ruby$gems$$1_dot_8$gems$jruby_minus_rack_minus_1_dot_1_dot_5$lib$jruby_minus_rack_minus_1_dot_1_dot_5_dot_jar$rack$handler$servlet$method__16$RUBY$load_headers:65535)
        	at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(org/jruby/runtime/callsite/CachingCallSite.java:332)
        	at org.jruby.runtime.callsite.CachingCallSite.call(org/jruby/runtime/callsite/CachingCallSite.java:203)
        	at $_3a_.java.jruby.lib.ruby.gems.$1_dot_8.gems.jruby_minus_rack_minus_1_dot_1_dot_5.lib.jruby_minus_rack_minus_1_dot_1_dot_5_dot_jar.rack.handler.servlet.load_env_key(file:c:/java/jruby/lib/ruby/gems/1.8/gems/jruby-rack-1.1.5/lib/jruby-rack-1.1.5.jar!/rack/handler/servlet.rb:76)
        	at $_3a_$java$jruby$lib$ruby$gems$$1_dot_8$gems$jruby_minus_rack_minus_1_dot_1_dot_5$lib$jruby_minus_rack_minus_1_dot_1_dot_5_dot_jar$rack$handler$servlet$method__14$RUBY$load_env_key.call($_3a_$java$jruby$lib$ruby$gems$$1_dot_8$gems$jruby_minus_rack_minus_1_dot_1_dot_5$lib$jruby_minus_rack_minus_1_dot_1_dot_5_dot_jar$rack$handler$servlet$method__14$RUBY$load_env_key:65535)
        	at $_3a_$java$jruby$lib$ruby$gems$$1_dot_8$gems$jruby_minus_rack_minus_1_dot_1_dot_5$lib$jruby_minus_rack_minus_1_dot_1_dot_5_dot_jar$rack$handler$servlet$method__14$RUBY$load_env_key.call($_3a_$java$jruby$lib$ruby$gems$$1_dot_8$gems$jruby_minus_rack_minus_1_dot_1_dot_5$lib$jruby_minus_rack_minus_1_dot_1_dot_5_dot_jar$rack$handler$servlet$method__14$RUBY$load_env_key:65535)
        	at org.jruby.runtime.callsite.CachingCallSite.call(org/jruby/runtime/callsite/CachingCallSite.java:201)
        	at $_3a_.java.jruby.lib.ruby.gems.$1_dot_8.gems.jruby_minus_rack_minus_1_dot_1_dot_5.lib.jruby_minus_rack_minus_1_dot_1_dot_5_dot_jar.rack.handler.servlet.initialize(file:c:/java/jruby/lib/ruby/gems/1.8/gems/jruby-rack-1.1.5/lib/jruby-rack-1.1.5.jar!/rack/handler/servlet.rb:61)
        	at $_3a_$java$jruby$lib$ruby$gems$$1_dot_8$gems$jruby_minus_rack_minus_1_dot_1_dot_5$lib$jruby_minus_rack_minus_1_dot_1_dot_5_dot_jar$rack$handler$servlet$block_3$RUBY$initialize.call($_3a_$java$jruby$lib$ruby$gems$$1_dot_8$gems$jruby_minus_rack_minus_1_dot_1_dot_5$lib$jruby_minus_rack_minus_1_dot_1_dot_5_dot_jar$rack$handler$servlet$block_3$RUBY$initialize:65535)
        	at org.jruby.runtime.CompiledBlock.yield(org/jruby/runtime/CompiledBlock.java:133)
        	at org.jruby.runtime.BlockBody.call(org/jruby/runtime/BlockBody.java:73)
        	at org.jruby.runtime.Block.call(org/jruby/runtime/Block.java:89)
        	at org.jruby.RubyProc.call(org/jruby/RubyProc.java:270)
        	at org.jruby.RubyProc.call(org/jruby/RubyProc.java:220)
        	at org.jruby.RubyProc$i$0$0$call.call(org/jruby/RubyProc$i$0$0$call.gen:65535)
        	at org.jruby.internal.runtime.methods.DynamicMethod.call(org/jruby/internal/runtime/methods/DynamicMethod.java:219)
        	at org.jruby.internal.runtime.methods.DynamicMethod.call(org/jruby/internal/runtime/methods/DynamicMethod.java:215)
        	at org.jruby.RubyClass.finvoke(org/jruby/RubyClass.java:734)
        	at org.jruby.javasupport.util.RuntimeHelpers.invoke(org/jruby/javasupport/util/RuntimeHelpers.java:551)
        	at org.jruby.RubyHash.default_value_get(org/jruby/RubyHash.java:647)
        	at org.jruby.RubyHash$i$default_value_get.call(org/jruby/RubyHash$i$default_value_get.gen:65535)
        	at org.jruby.RubyClass.finvoke(org/jruby/RubyClass.java:715)
        	at org.jruby.javasupport.util.RuntimeHelpers.invoke(org/jruby/javasupport/util/RuntimeHelpers.java:548)
        	at org.jruby.RubyBasicObject.callMethod(org/jruby/RubyBasicObject.java:361)
        	at org.jruby.RubyHash.op_aref(org/jruby/RubyHash.java:1007)
        	at org.jruby.RubyHash$i$1$0$op_aref.call(org/jruby/RubyHash$i$1$0$op_aref.gen:65535)
        	at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(org/jruby/runtime/callsite/CachingCallSite.java:312)
        	at org.jruby.runtime.callsite.CachingCallSite.call(org/jruby/runtime/callsite/CachingCallSite.java:169)
        	at $_3a_.java.jruby.lib.ruby.gems.$1_dot_8.gems.jruby_minus_rack_minus_1_dot_1_dot_5.lib.jruby_minus_rack_minus_1_dot_1_dot_5_dot_jar.rack.handler.servlet.populate(file:c:/java/jruby/lib/ruby/gems/1.8/gems/jruby-rack-1.1.5/lib/jruby-rack-1.1.5.jar!/rack/handler/servlet.rb:48)
        	at $_3a_$java$jruby$lib$ruby$gems$$1_dot_8$gems$jruby_minus_rack_minus_1_dot_1_dot_5$lib$jruby_minus_rack_minus_1_dot_1_dot_5_dot_jar$rack$handler$servlet$method__9$RUBY$populate.call($_3a_$java$jruby$lib$ruby$gems$$1_dot_8$gems$jruby_minus_rack_minus_1_dot_1_dot_5$lib$jruby_minus_rack_minus_1_dot_1_dot_5_dot_jar$rack$handler$servlet$method__9$RUBY$populate:65535)
        	at $_3a_$java$jruby$lib$ruby$gems$$1_dot_8$gems$jruby_minus_rack_minus_1_dot_1_dot_5$lib$jruby_minus_rack_minus_1_dot_1_dot_5_dot_jar$rack$handler$servlet$method__9$RUBY$populate.call($_3a_$java$jruby$lib$ruby$gems$$1_dot_8$gems$jruby_minus_rack_minus_1_dot_1_dot_5$lib$jruby_minus_rack_minus_1_dot_1_dot_5_dot_jar$rack$handler$servlet$method__9$RUBY$populate:65535)
        	at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(org/jruby/runtime/callsite/CachingCallSite.java:312)
        	at org.jruby.runtime.callsite.CachingCallSite.call(org/jruby/runtime/callsite/CachingCallSite.java:169)
        	at $_3a_.java.jruby.lib.ruby.gems.$1_dot_8.gems.jruby_minus_rack_minus_1_dot_1_dot_5.lib.jruby_minus_rack_minus_1_dot_1_dot_5_dot_jar.rack.handler.servlet.initialize(file:c:/java/jruby/lib/ruby/gems/1.8/gems/jruby-rack-1.1.5/lib/jruby-rack-1.1.5.jar!/rack/handler/servlet.rb:42)
        	at $_3a_$java$jruby$lib$ruby$gems$$1_dot_8$gems$jruby_minus_rack_minus_1_dot_1_dot_5$lib$jruby_minus_rack_minus_1_dot_1_dot_5_dot_jar$rack$handler$servlet$method__8$RUBY$initialize.call($_3a_$java$jruby$lib$ruby$gems$$1_dot_8$gems$jruby_minus_rack_minus_1_dot_1_dot_5$lib$jruby_minus_rack_minus_1_dot_1_dot_5_dot_jar$rack$handler$servlet$method__8$RUBY$initialize:65535)
        	at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(org/jruby/runtime/callsite/CachingCallSite.java:322)
        	at org.jruby.runtime.callsite.CachingCallSite.callBlock(org/jruby/runtime/callsite/CachingCallSite.java:178)
        	at org.jruby.runtime.callsite.CachingCallSite.call(org/jruby/runtime/callsite/CachingCallSite.java:182)
        	at org.jruby.RubyClass.newInstance(org/jruby/RubyClass.java:829)
        	at org.jruby.RubyClass$i$newInstance.call(org/jruby/RubyClass$i$newInstance.gen:65535)
        	at org.jruby.internal.runtime.methods.JavaMethod$JavaMethodZeroOrOneOrNBlock.call(org/jruby/internal/runtime/methods/JavaMethod.java:266)
        	at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(org/jruby/runtime/callsite/CachingCallSite.java:312)
        	at org.jruby.runtime.callsite.CachingCallSite.call(org/jruby/runtime/callsite/CachingCallSite.java:169)
        	at $_3a_.java.jruby.lib.ruby.gems.$1_dot_8.gems.jruby_minus_rack_minus_1_dot_1_dot_5.lib.jruby_minus_rack_minus_1_dot_1_dot_5_dot_jar.rack.handler.servlet.create_env(file:c:/java/jruby/lib/ruby/gems/1.8/gems/jruby-rack-1.1.5/lib/jruby-rack-1.1.5.jar!/rack/handler/servlet.rb:25)
        	at $_3a_$java$jruby$lib$ruby$gems$$1_dot_8$gems$jruby_minus_rack_minus_1_dot_1_dot_5$lib$jruby_minus_rack_minus_1_dot_1_dot_5_dot_jar$rack$handler$servlet$method__5$RUBY$create_env.call($_3a_$java$jruby$lib$ruby$gems$$1_dot_8$gems$jruby_minus_rack_minus_1_dot_1_dot_5$lib$jruby_minus_rack_minus_1_dot_1_dot_5_dot_jar$rack$handler$servlet$method__5$RUBY$create_env:65535)
        	at $_3a_$java$jruby$lib$ruby$gems$$1_dot_8$gems$jruby_minus_rack_minus_1_dot_1_dot_5$lib$jruby_minus_rack_minus_1_dot_1_dot_5_dot_jar$rack$handler$servlet$method__5$RUBY$create_env.call($_3a_$java$jruby$lib$ruby$gems$$1_dot_8$gems$jruby_minus_rack_minus_1_dot_1_dot_5$lib$jruby_minus_rack_minus_1_dot_1_dot_5_dot_jar$rack$handler$servlet$method__5$RUBY$create_env:65535)
        	at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(org/jruby/runtime/callsite/CachingCallSite.java:312)
        	at org.jruby.runtime.callsite.CachingCallSite.call(org/jruby/runtime/callsite/CachingCallSite.java:169)
        	at $_3a_.java.jruby.lib.ruby.gems.$1_dot_8.gems.jruby_minus_rack_minus_1_dot_1_dot_5.lib.jruby_minus_rack_minus_1_dot_1_dot_5_dot_jar.rack.handler.servlet.call(file:c:/java/jruby/lib/ruby/gems/1.8/gems/jruby-rack-1.1.5/lib/jruby-rack-1.1.5.jar!/rack/handler/servlet.rb:21)
        	at $_3a_$java$jruby$lib$ruby$gems$$1_dot_8$gems$jruby_minus_rack_minus_1_dot_1_dot_5$lib$jruby_minus_rack_minus_1_dot_1_dot_5_dot_jar$rack$handler$servlet$method__4$RUBY$call.call($_3a_$java$jruby$lib$ruby$gems$$1_dot_8$gems$jruby_minus_rack_minus_1_dot_1_dot_5$lib$jruby_minus_rack_minus_1_dot_1_dot_5_dot_jar$rack$handler$servlet$method__4$RUBY$call:65535)
        	at $_3a_$java$jruby$lib$ruby$gems$$1_dot_8$gems$jruby_minus_rack_minus_1_dot_1_dot_5$lib$jruby_minus_rack_minus_1_dot_1_dot_5_dot_jar$rack$handler$servlet$method__4$RUBY$call.call($_3a_$java$jruby$lib$ruby$gems$$1_dot_8$gems$jruby_minus_rack_minus_1_dot_1_dot_5$lib$jruby_minus_rack_minus_1_dot_1_dot_5_dot_jar$rack$handler$servlet$method__4$RUBY$call:65535)
        	at org.jruby.RubyClass.finvoke(org/jruby/RubyClass.java:715)
        	at org.jruby.javasupport.util.RuntimeHelpers.invoke(org/jruby/javasupport/util/RuntimeHelpers.java:548)
        	at org.jruby.RubyBasicObject.callMethod(org/jruby/RubyBasicObject.java:361)
        	at org.jruby.javasupport.JavaEmbedUtils$1.callMethod(org/jruby/javasupport/JavaEmbedUtils.java:143)
        	at org.jruby.rack.DefaultRackApplication.__call(org/jruby/rack/DefaultRackApplication.java:72)
        	at org.jruby.rack.DefaultRackApplication.call(org/jruby/rack/DefaultRackApplication.java:40)
        	at org.jruby.rack.DefaultRackDispatcher.afterException(org/jruby/rack/DefaultRackDispatcher.java:36)
        	at org.jruby.rack.AbstractRackDispatcher.handleException(org/jruby/rack/AbstractRackDispatcher.java:55)
        	at org.jruby.rack.AbstractRackDispatcher.process(org/jruby/rack/AbstractRackDispatcher.java:36)
        	at org.jruby.rack.AbstractServlet.service(org/jruby/rack/AbstractServlet.java:37)
        	at org.jruby.rack.AbstractServlet.service(org/jruby/rack/AbstractServlet.java:43)
        	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(org/apache/catalina/core/ApplicationFilterChain.java:305)
        	at org.apache.catalina.core.ApplicationFilterChain.doFilter(org/apache/catalina/core/ApplicationFilterChain.java:210)
        	at org.apache.catalina.core.StandardWrapperValve.invoke(org/apache/catalina/core/StandardWrapperValve.java:224)
        	at org.apache.catalina.core.StandardContextValve.invoke(org/apache/catalina/core/StandardContextValve.java:169)
        	at org.apache.catalina.authenticator.AuthenticatorBase.invoke(org/apache/catalina/authenticator/AuthenticatorBase.java:472)
        	at org.apache.catalina.core.StandardHostValve.invoke(org/apache/catalina/core/StandardHostValve.java:168)
        	at org.apache.catalina.valves.ErrorReportValve.invoke(org/apache/catalina/valves/ErrorReportValve.java:98)
        	at org.apache.catalina.core.StandardEngineValve.invoke(org/apache/catalina/core/StandardEngineValve.java:118)
        	at org.apache.catalina.connector.CoyoteAdapter.service(org/apache/catalina/connector/CoyoteAdapter.java:407)
        	at org.apache.coyote.http11.AbstractHttp11Processor.process(org/apache/coyote/http11/AbstractHttp11Processor.java:987)
        	at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(org/apache/coyote/AbstractProtocol.java:579)
        	at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(org/apache/tomcat/util/net/JIoEndpoint.java:307)
        	at java.util.concurrent.ThreadPoolExecutor.runWorker(java/util/concurrent/ThreadPoolExecutor.java:1110)
        	at java.util.concurrent.ThreadPoolExecutor$Worker.run(java/util/concurrent/ThreadPoolExecutor.java:603)
        	at java.lang.Thread.run(java/lang/Thread.java:722)
        

        In my particular case, I have only seen the issue with upcase method. Also, it seems to happen on a per-JVM startup basis. If my app starts up fine, it tends to run for days without further issue, even with additional JRuby runtimes spinning up/down.

        Show
        Peter K Chan added a comment - Charlie, I re-ran the app using this command line: set JRUBY_OPTS=-X+C jruby --1.8 --client -J-Xms200m -J-Xmx768m -J-XX:MaxPermSize=80m -J-Djruby.rack.logging=stdout -J-Djruby.compile.invokedynamic= false -X+C -Xcompile.mode=FORCE -Xbacktrace.style=raw -S trinidad and this is what I got: 2012-05-15 14:23:57 INFO: No global web.xml found Info: received max runtimes = 6 jruby 1.6.7 (ruby-1.8.7-p357) (2012-02-22 3e82bc8) (Java HotSpot(TM) Client VM 1.7.0_03) [Windows Server 2008 R2-x86-java] Info: using runtime pool timeout of 30 seconds Info: received min runtimes = 2 Info: received max runtimes = 6 Info: add application to the pool. size now = 1 Info: add application to the pool. size now = 2 2012-05-15 14:24:19 INFO: Starting ProtocolHandler [ "http-bio-3000" ] Application Error org.jruby.exceptions.RaiseException: (NoMethodError) undefined method `upcase' for #<Java::JavaLang:: String :0x1c2bfc4> at java.lang. Thread .getStackTrace(java/lang/ Thread .java:1567) at org.jruby.runtime.backtrace.TraceType$Gather$1.getBacktraceData(org/jruby/runtime/backtrace/TraceType.java:59) at org.jruby.runtime.backtrace.TraceType$Gather.getBacktraceData(org/jruby/runtime/backtrace/TraceType.java:111) at org.jruby.runtime.backtrace.TraceType.getBacktrace(org/jruby/runtime/backtrace/TraceType.java:25) at org.jruby.RubyException.prepareBacktrace(org/jruby/RubyException.java:160) at org.jruby.exceptions.RaiseException.preRaise(org/jruby/exceptions/RaiseException.java:205) at org.jruby.exceptions.RaiseException.preRaise(org/jruby/exceptions/RaiseException.java:195) at org.jruby.exceptions.RaiseException.<init>(org/jruby/exceptions/RaiseException.java:141) at org.jruby.exceptions.RaiseException.<init>(org/jruby/exceptions/RaiseException.java:74) at org.jruby.RubyKernel.methodMissing(org/jruby/RubyKernel.java:273) at org.jruby.RubyKernel.access$000(org/jruby/RubyKernel.java:83) at org.jruby.RubyKernel$5.methodMissing(org/jruby/RubyKernel.java:145) at org.jruby.RubyKernel$MethodMissingMethod.call(org/jruby/RubyKernel.java:95) at org.jruby.internal.runtime.methods.DynamicMethod.call(org/jruby/internal/runtime/methods/DynamicMethod.java:203) at org.jruby.runtime.callsite.CachingCallSite.callMethodMissing(org/jruby/runtime/callsite/CachingCallSite.java:379) at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(org/jruby/runtime/callsite/CachingCallSite.java:289) at org.jruby.runtime.callsite.CachingCallSite.call(org/jruby/runtime/callsite/CachingCallSite.java:135) at $_3a_.java.jruby.lib.ruby.gems.$1_dot_8.gems.jruby_minus_rack_minus_1_dot_1_dot_5.lib.jruby_minus_rack_minus_1_dot_1_dot_5_dot_jar.rack.handler.servlet.load_headers(file:c:/java/jruby/lib/ruby/gems/1.8/gems/jruby-rack-1.1.5/lib/jruby-rack-1.1.5.jar!/rack/handler/servlet.rb:99) at $_3a_$java$jruby$lib$ruby$gems$$1_dot_8$gems$jruby_minus_rack_minus_1_dot_1_dot_5$lib$jruby_minus_rack_minus_1_dot_1_dot_5_dot_jar$rack$handler$servlet$block_5$RUBY$load_headers.call($_3a_$java$jruby$lib$ruby$gems$$1_dot_8$gems$jruby_minus_rack_minus_1_dot_1_dot_5$lib$jruby_minus_rack_minus_1_dot_1_dot_5_dot_jar$rack$handler$servlet$block_5$RUBY$load_headers:65535) at org.jruby.runtime.CompiledBlock.yield(org/jruby/runtime/CompiledBlock.java:112) at org.jruby.runtime.CompiledBlock.yield(org/jruby/runtime/CompiledBlock.java:95) at org.jruby.runtime.Block.yield(org/jruby/runtime/Block.java:130) at c_3a_.java.jruby.lib.ruby.site_ruby.shared.builtin.java.java_dot_util.each(c:/java/jruby/lib/ruby/site_ruby/shared/builtin/java/java.util.rb:39) at c_3a_$java$jruby$lib$ruby$site_ruby$shared$builtin$java$java_dot_util$method__10$RUBY$each.call(c_3a_$java$jruby$lib$ruby$site_ruby$shared$builtin$java$java_dot_util$method__10$RUBY$each:65535) at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(org/jruby/runtime/callsite/CachingCallSite.java:302) at org.jruby.runtime.callsite.CachingCallSite.callBlock(org/jruby/runtime/callsite/CachingCallSite.java:144) at org.jruby.runtime.callsite.CachingCallSite.callIter(org/jruby/runtime/callsite/CachingCallSite.java:153) at $_3a_.java.jruby.lib.ruby.gems.$1_dot_8.gems.jruby_minus_rack_minus_1_dot_1_dot_5.lib.jruby_minus_rack_minus_1_dot_1_dot_5_dot_jar.rack.handler.servlet.load_headers(file:c:/java/jruby/lib/ruby/gems/1.8/gems/jruby-rack-1.1.5/lib/jruby-rack-1.1.5.jar!/rack/handler/servlet.rb:97) at $_3a_$java$jruby$lib$ruby$gems$$1_dot_8$gems$jruby_minus_rack_minus_1_dot_1_dot_5$lib$jruby_minus_rack_minus_1_dot_1_dot_5_dot_jar$rack$handler$servlet$method__16$RUBY$load_headers.call($_3a_$java$jruby$lib$ruby$gems$$1_dot_8$gems$jruby_minus_rack_minus_1_dot_1_dot_5$lib$jruby_minus_rack_minus_1_dot_1_dot_5_dot_jar$rack$handler$servlet$method__16$RUBY$load_headers:65535) at $_3a_$java$jruby$lib$ruby$gems$$1_dot_8$gems$jruby_minus_rack_minus_1_dot_1_dot_5$lib$jruby_minus_rack_minus_1_dot_1_dot_5_dot_jar$rack$handler$servlet$method__16$RUBY$load_headers.call($_3a_$java$jruby$lib$ruby$gems$$1_dot_8$gems$jruby_minus_rack_minus_1_dot_1_dot_5$lib$jruby_minus_rack_minus_1_dot_1_dot_5_dot_jar$rack$handler$servlet$method__16$RUBY$load_headers:65535) at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(org/jruby/runtime/callsite/CachingCallSite.java:332) at org.jruby.runtime.callsite.CachingCallSite.call(org/jruby/runtime/callsite/CachingCallSite.java:203) at $_3a_.java.jruby.lib.ruby.gems.$1_dot_8.gems.jruby_minus_rack_minus_1_dot_1_dot_5.lib.jruby_minus_rack_minus_1_dot_1_dot_5_dot_jar.rack.handler.servlet.load_env_key(file:c:/java/jruby/lib/ruby/gems/1.8/gems/jruby-rack-1.1.5/lib/jruby-rack-1.1.5.jar!/rack/handler/servlet.rb:76) at $_3a_$java$jruby$lib$ruby$gems$$1_dot_8$gems$jruby_minus_rack_minus_1_dot_1_dot_5$lib$jruby_minus_rack_minus_1_dot_1_dot_5_dot_jar$rack$handler$servlet$method__14$RUBY$load_env_key.call($_3a_$java$jruby$lib$ruby$gems$$1_dot_8$gems$jruby_minus_rack_minus_1_dot_1_dot_5$lib$jruby_minus_rack_minus_1_dot_1_dot_5_dot_jar$rack$handler$servlet$method__14$RUBY$load_env_key:65535) at $_3a_$java$jruby$lib$ruby$gems$$1_dot_8$gems$jruby_minus_rack_minus_1_dot_1_dot_5$lib$jruby_minus_rack_minus_1_dot_1_dot_5_dot_jar$rack$handler$servlet$method__14$RUBY$load_env_key.call($_3a_$java$jruby$lib$ruby$gems$$1_dot_8$gems$jruby_minus_rack_minus_1_dot_1_dot_5$lib$jruby_minus_rack_minus_1_dot_1_dot_5_dot_jar$rack$handler$servlet$method__14$RUBY$load_env_key:65535) at org.jruby.runtime.callsite.CachingCallSite.call(org/jruby/runtime/callsite/CachingCallSite.java:201) at $_3a_.java.jruby.lib.ruby.gems.$1_dot_8.gems.jruby_minus_rack_minus_1_dot_1_dot_5.lib.jruby_minus_rack_minus_1_dot_1_dot_5_dot_jar.rack.handler.servlet.initialize(file:c:/java/jruby/lib/ruby/gems/1.8/gems/jruby-rack-1.1.5/lib/jruby-rack-1.1.5.jar!/rack/handler/servlet.rb:61) at $_3a_$java$jruby$lib$ruby$gems$$1_dot_8$gems$jruby_minus_rack_minus_1_dot_1_dot_5$lib$jruby_minus_rack_minus_1_dot_1_dot_5_dot_jar$rack$handler$servlet$block_3$RUBY$initialize.call($_3a_$java$jruby$lib$ruby$gems$$1_dot_8$gems$jruby_minus_rack_minus_1_dot_1_dot_5$lib$jruby_minus_rack_minus_1_dot_1_dot_5_dot_jar$rack$handler$servlet$block_3$RUBY$initialize:65535) at org.jruby.runtime.CompiledBlock.yield(org/jruby/runtime/CompiledBlock.java:133) at org.jruby.runtime.BlockBody.call(org/jruby/runtime/BlockBody.java:73) at org.jruby.runtime.Block.call(org/jruby/runtime/Block.java:89) at org.jruby.RubyProc.call(org/jruby/RubyProc.java:270) at org.jruby.RubyProc.call(org/jruby/RubyProc.java:220) at org.jruby.RubyProc$i$0$0$call.call(org/jruby/RubyProc$i$0$0$call.gen:65535) at org.jruby.internal.runtime.methods.DynamicMethod.call(org/jruby/internal/runtime/methods/DynamicMethod.java:219) at org.jruby.internal.runtime.methods.DynamicMethod.call(org/jruby/internal/runtime/methods/DynamicMethod.java:215) at org.jruby.RubyClass.finvoke(org/jruby/RubyClass.java:734) at org.jruby.javasupport.util.RuntimeHelpers.invoke(org/jruby/javasupport/util/RuntimeHelpers.java:551) at org.jruby.RubyHash.default_value_get(org/jruby/RubyHash.java:647) at org.jruby.RubyHash$i$default_value_get.call(org/jruby/RubyHash$i$default_value_get.gen:65535) at org.jruby.RubyClass.finvoke(org/jruby/RubyClass.java:715) at org.jruby.javasupport.util.RuntimeHelpers.invoke(org/jruby/javasupport/util/RuntimeHelpers.java:548) at org.jruby.RubyBasicObject.callMethod(org/jruby/RubyBasicObject.java:361) at org.jruby.RubyHash.op_aref(org/jruby/RubyHash.java:1007) at org.jruby.RubyHash$i$1$0$op_aref.call(org/jruby/RubyHash$i$1$0$op_aref.gen:65535) at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(org/jruby/runtime/callsite/CachingCallSite.java:312) at org.jruby.runtime.callsite.CachingCallSite.call(org/jruby/runtime/callsite/CachingCallSite.java:169) at $_3a_.java.jruby.lib.ruby.gems.$1_dot_8.gems.jruby_minus_rack_minus_1_dot_1_dot_5.lib.jruby_minus_rack_minus_1_dot_1_dot_5_dot_jar.rack.handler.servlet.populate(file:c:/java/jruby/lib/ruby/gems/1.8/gems/jruby-rack-1.1.5/lib/jruby-rack-1.1.5.jar!/rack/handler/servlet.rb:48) at $_3a_$java$jruby$lib$ruby$gems$$1_dot_8$gems$jruby_minus_rack_minus_1_dot_1_dot_5$lib$jruby_minus_rack_minus_1_dot_1_dot_5_dot_jar$rack$handler$servlet$method__9$RUBY$populate.call($_3a_$java$jruby$lib$ruby$gems$$1_dot_8$gems$jruby_minus_rack_minus_1_dot_1_dot_5$lib$jruby_minus_rack_minus_1_dot_1_dot_5_dot_jar$rack$handler$servlet$method__9$RUBY$populate:65535) at $_3a_$java$jruby$lib$ruby$gems$$1_dot_8$gems$jruby_minus_rack_minus_1_dot_1_dot_5$lib$jruby_minus_rack_minus_1_dot_1_dot_5_dot_jar$rack$handler$servlet$method__9$RUBY$populate.call($_3a_$java$jruby$lib$ruby$gems$$1_dot_8$gems$jruby_minus_rack_minus_1_dot_1_dot_5$lib$jruby_minus_rack_minus_1_dot_1_dot_5_dot_jar$rack$handler$servlet$method__9$RUBY$populate:65535) at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(org/jruby/runtime/callsite/CachingCallSite.java:312) at org.jruby.runtime.callsite.CachingCallSite.call(org/jruby/runtime/callsite/CachingCallSite.java:169) at $_3a_.java.jruby.lib.ruby.gems.$1_dot_8.gems.jruby_minus_rack_minus_1_dot_1_dot_5.lib.jruby_minus_rack_minus_1_dot_1_dot_5_dot_jar.rack.handler.servlet.initialize(file:c:/java/jruby/lib/ruby/gems/1.8/gems/jruby-rack-1.1.5/lib/jruby-rack-1.1.5.jar!/rack/handler/servlet.rb:42) at $_3a_$java$jruby$lib$ruby$gems$$1_dot_8$gems$jruby_minus_rack_minus_1_dot_1_dot_5$lib$jruby_minus_rack_minus_1_dot_1_dot_5_dot_jar$rack$handler$servlet$method__8$RUBY$initialize.call($_3a_$java$jruby$lib$ruby$gems$$1_dot_8$gems$jruby_minus_rack_minus_1_dot_1_dot_5$lib$jruby_minus_rack_minus_1_dot_1_dot_5_dot_jar$rack$handler$servlet$method__8$RUBY$initialize:65535) at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(org/jruby/runtime/callsite/CachingCallSite.java:322) at org.jruby.runtime.callsite.CachingCallSite.callBlock(org/jruby/runtime/callsite/CachingCallSite.java:178) at org.jruby.runtime.callsite.CachingCallSite.call(org/jruby/runtime/callsite/CachingCallSite.java:182) at org.jruby.RubyClass.newInstance(org/jruby/RubyClass.java:829) at org.jruby.RubyClass$i$newInstance.call(org/jruby/RubyClass$i$newInstance.gen:65535) at org.jruby.internal.runtime.methods.JavaMethod$JavaMethodZeroOrOneOrNBlock.call(org/jruby/internal/runtime/methods/JavaMethod.java:266) at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(org/jruby/runtime/callsite/CachingCallSite.java:312) at org.jruby.runtime.callsite.CachingCallSite.call(org/jruby/runtime/callsite/CachingCallSite.java:169) at $_3a_.java.jruby.lib.ruby.gems.$1_dot_8.gems.jruby_minus_rack_minus_1_dot_1_dot_5.lib.jruby_minus_rack_minus_1_dot_1_dot_5_dot_jar.rack.handler.servlet.create_env(file:c:/java/jruby/lib/ruby/gems/1.8/gems/jruby-rack-1.1.5/lib/jruby-rack-1.1.5.jar!/rack/handler/servlet.rb:25) at $_3a_$java$jruby$lib$ruby$gems$$1_dot_8$gems$jruby_minus_rack_minus_1_dot_1_dot_5$lib$jruby_minus_rack_minus_1_dot_1_dot_5_dot_jar$rack$handler$servlet$method__5$RUBY$create_env.call($_3a_$java$jruby$lib$ruby$gems$$1_dot_8$gems$jruby_minus_rack_minus_1_dot_1_dot_5$lib$jruby_minus_rack_minus_1_dot_1_dot_5_dot_jar$rack$handler$servlet$method__5$RUBY$create_env:65535) at $_3a_$java$jruby$lib$ruby$gems$$1_dot_8$gems$jruby_minus_rack_minus_1_dot_1_dot_5$lib$jruby_minus_rack_minus_1_dot_1_dot_5_dot_jar$rack$handler$servlet$method__5$RUBY$create_env.call($_3a_$java$jruby$lib$ruby$gems$$1_dot_8$gems$jruby_minus_rack_minus_1_dot_1_dot_5$lib$jruby_minus_rack_minus_1_dot_1_dot_5_dot_jar$rack$handler$servlet$method__5$RUBY$create_env:65535) at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(org/jruby/runtime/callsite/CachingCallSite.java:312) at org.jruby.runtime.callsite.CachingCallSite.call(org/jruby/runtime/callsite/CachingCallSite.java:169) at $_3a_.java.jruby.lib.ruby.gems.$1_dot_8.gems.jruby_minus_rack_minus_1_dot_1_dot_5.lib.jruby_minus_rack_minus_1_dot_1_dot_5_dot_jar.rack.handler.servlet.call(file:c:/java/jruby/lib/ruby/gems/1.8/gems/jruby-rack-1.1.5/lib/jruby-rack-1.1.5.jar!/rack/handler/servlet.rb:21) at $_3a_$java$jruby$lib$ruby$gems$$1_dot_8$gems$jruby_minus_rack_minus_1_dot_1_dot_5$lib$jruby_minus_rack_minus_1_dot_1_dot_5_dot_jar$rack$handler$servlet$method__4$RUBY$call.call($_3a_$java$jruby$lib$ruby$gems$$1_dot_8$gems$jruby_minus_rack_minus_1_dot_1_dot_5$lib$jruby_minus_rack_minus_1_dot_1_dot_5_dot_jar$rack$handler$servlet$method__4$RUBY$call:65535) at $_3a_$java$jruby$lib$ruby$gems$$1_dot_8$gems$jruby_minus_rack_minus_1_dot_1_dot_5$lib$jruby_minus_rack_minus_1_dot_1_dot_5_dot_jar$rack$handler$servlet$method__4$RUBY$call.call($_3a_$java$jruby$lib$ruby$gems$$1_dot_8$gems$jruby_minus_rack_minus_1_dot_1_dot_5$lib$jruby_minus_rack_minus_1_dot_1_dot_5_dot_jar$rack$handler$servlet$method__4$RUBY$call:65535) at org.jruby.RubyClass.finvoke(org/jruby/RubyClass.java:715) at org.jruby.javasupport.util.RuntimeHelpers.invoke(org/jruby/javasupport/util/RuntimeHelpers.java:548) at org.jruby.RubyBasicObject.callMethod(org/jruby/RubyBasicObject.java:361) at org.jruby.javasupport.JavaEmbedUtils$1.callMethod(org/jruby/javasupport/JavaEmbedUtils.java:143) at org.jruby.rack.DefaultRackApplication.__call(org/jruby/rack/DefaultRackApplication.java:72) at org.jruby.rack.DefaultRackApplication.call(org/jruby/rack/DefaultRackApplication.java:40) at org.jruby.rack.AbstractRackDispatcher.process(org/jruby/rack/AbstractRackDispatcher.java:33) at org.jruby.rack.AbstractServlet.service(org/jruby/rack/AbstractServlet.java:37) at org.jruby.rack.AbstractServlet.service(org/jruby/rack/AbstractServlet.java:43) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(org/apache/catalina/core/ApplicationFilterChain.java:305) at org.apache.catalina.core.ApplicationFilterChain.doFilter(org/apache/catalina/core/ApplicationFilterChain.java:210) at org.apache.catalina.core.StandardWrapperValve.invoke(org/apache/catalina/core/StandardWrapperValve.java:224) at org.apache.catalina.core.StandardContextValve.invoke(org/apache/catalina/core/StandardContextValve.java:169) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(org/apache/catalina/authenticator/AuthenticatorBase.java:472) at org.apache.catalina.core.StandardHostValve.invoke(org/apache/catalina/core/StandardHostValve.java:168) at org.apache.catalina.valves.ErrorReportValve.invoke(org/apache/catalina/valves/ErrorReportValve.java:98) at org.apache.catalina.core.StandardEngineValve.invoke(org/apache/catalina/core/StandardEngineValve.java:118) at org.apache.catalina.connector.CoyoteAdapter.service(org/apache/catalina/connector/CoyoteAdapter.java:407) at org.apache.coyote.http11.AbstractHttp11Processor.process(org/apache/coyote/http11/AbstractHttp11Processor.java:987) at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(org/apache/coyote/AbstractProtocol.java:579) at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(org/apache/tomcat/util/net/JIoEndpoint.java:307) at java.util.concurrent.ThreadPoolExecutor.runWorker(java/util/concurrent/ThreadPoolExecutor.java:1110) at java.util.concurrent.ThreadPoolExecutor$Worker.run(java/util/concurrent/ThreadPoolExecutor.java:603) at java.lang. Thread .run(java/lang/ Thread .java:722) Error: Couldn't handle error org.jruby.exceptions.RaiseException: (NoMethodError) undefined method `upcase' for #<Java::JavaLang:: String :0x1c2bfc4> at java.lang. Thread .getStackTrace(java/lang/ Thread .java:1567) at org.jruby.runtime.backtrace.TraceType$Gather$1.getBacktraceData(org/jruby/runtime/backtrace/TraceType.java:59) at org.jruby.runtime.backtrace.TraceType$Gather.getBacktraceData(org/jruby/runtime/backtrace/TraceType.java:111) at org.jruby.runtime.backtrace.TraceType.getBacktrace(org/jruby/runtime/backtrace/TraceType.java:25) at org.jruby.RubyException.prepareBacktrace(org/jruby/RubyException.java:160) at org.jruby.exceptions.RaiseException.preRaise(org/jruby/exceptions/RaiseException.java:205) at org.jruby.exceptions.RaiseException.preRaise(org/jruby/exceptions/RaiseException.java:195) at org.jruby.exceptions.RaiseException.<init>(org/jruby/exceptions/RaiseException.java:141) at org.jruby.exceptions.RaiseException.<init>(org/jruby/exceptions/RaiseException.java:74) at org.jruby.RubyKernel.methodMissing(org/jruby/RubyKernel.java:273) at org.jruby.RubyKernel.access$000(org/jruby/RubyKernel.java:83) at org.jruby.RubyKernel$5.methodMissing(org/jruby/RubyKernel.java:145) at org.jruby.RubyKernel$MethodMissingMethod.call(org/jruby/RubyKernel.java:95) at org.jruby.internal.runtime.methods.DynamicMethod.call(org/jruby/internal/runtime/methods/DynamicMethod.java:203) at org.jruby.runtime.callsite.CachingCallSite.callMethodMissing(org/jruby/runtime/callsite/CachingCallSite.java:379) at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(org/jruby/runtime/callsite/CachingCallSite.java:289) at org.jruby.runtime.callsite.CachingCallSite.call(org/jruby/runtime/callsite/CachingCallSite.java:135) at $_3a_.java.jruby.lib.ruby.gems.$1_dot_8.gems.jruby_minus_rack_minus_1_dot_1_dot_5.lib.jruby_minus_rack_minus_1_dot_1_dot_5_dot_jar.rack.handler.servlet.load_headers(file:c:/java/jruby/lib/ruby/gems/1.8/gems/jruby-rack-1.1.5/lib/jruby-rack-1.1.5.jar!/rack/handler/servlet.rb:99) at $_3a_$java$jruby$lib$ruby$gems$$1_dot_8$gems$jruby_minus_rack_minus_1_dot_1_dot_5$lib$jruby_minus_rack_minus_1_dot_1_dot_5_dot_jar$rack$handler$servlet$block_5$RUBY$load_headers.call($_3a_$java$jruby$lib$ruby$gems$$1_dot_8$gems$jruby_minus_rack_minus_1_dot_1_dot_5$lib$jruby_minus_rack_minus_1_dot_1_dot_5_dot_jar$rack$handler$servlet$block_5$RUBY$load_headers:65535) at org.jruby.runtime.CompiledBlock.yield(org/jruby/runtime/CompiledBlock.java:112) at org.jruby.runtime.CompiledBlock.yield(org/jruby/runtime/CompiledBlock.java:95) at org.jruby.runtime.Block.yield(org/jruby/runtime/Block.java:130) at c_3a_.java.jruby.lib.ruby.site_ruby.shared.builtin.java.java_dot_util.each(c:/java/jruby/lib/ruby/site_ruby/shared/builtin/java/java.util.rb:39) at c_3a_$java$jruby$lib$ruby$site_ruby$shared$builtin$java$java_dot_util$method__10$RUBY$each.call(c_3a_$java$jruby$lib$ruby$site_ruby$shared$builtin$java$java_dot_util$method__10$RUBY$each:65535) at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(org/jruby/runtime/callsite/CachingCallSite.java:302) at org.jruby.runtime.callsite.CachingCallSite.callBlock(org/jruby/runtime/callsite/CachingCallSite.java:144) at org.jruby.runtime.callsite.CachingCallSite.callIter(org/jruby/runtime/callsite/CachingCallSite.java:153) at $_3a_.java.jruby.lib.ruby.gems.$1_dot_8.gems.jruby_minus_rack_minus_1_dot_1_dot_5.lib.jruby_minus_rack_minus_1_dot_1_dot_5_dot_jar.rack.handler.servlet.load_headers(file:c:/java/jruby/lib/ruby/gems/1.8/gems/jruby-rack-1.1.5/lib/jruby-rack-1.1.5.jar!/rack/handler/servlet.rb:97) at $_3a_$java$jruby$lib$ruby$gems$$1_dot_8$gems$jruby_minus_rack_minus_1_dot_1_dot_5$lib$jruby_minus_rack_minus_1_dot_1_dot_5_dot_jar$rack$handler$servlet$method__16$RUBY$load_headers.call($_3a_$java$jruby$lib$ruby$gems$$1_dot_8$gems$jruby_minus_rack_minus_1_dot_1_dot_5$lib$jruby_minus_rack_minus_1_dot_1_dot_5_dot_jar$rack$handler$servlet$method__16$RUBY$load_headers:65535) at $_3a_$java$jruby$lib$ruby$gems$$1_dot_8$gems$jruby_minus_rack_minus_1_dot_1_dot_5$lib$jruby_minus_rack_minus_1_dot_1_dot_5_dot_jar$rack$handler$servlet$method__16$RUBY$load_headers.call($_3a_$java$jruby$lib$ruby$gems$$1_dot_8$gems$jruby_minus_rack_minus_1_dot_1_dot_5$lib$jruby_minus_rack_minus_1_dot_1_dot_5_dot_jar$rack$handler$servlet$method__16$RUBY$load_headers:65535) at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(org/jruby/runtime/callsite/CachingCallSite.java:332) at org.jruby.runtime.callsite.CachingCallSite.call(org/jruby/runtime/callsite/CachingCallSite.java:203) at $_3a_.java.jruby.lib.ruby.gems.$1_dot_8.gems.jruby_minus_rack_minus_1_dot_1_dot_5.lib.jruby_minus_rack_minus_1_dot_1_dot_5_dot_jar.rack.handler.servlet.load_env_key(file:c:/java/jruby/lib/ruby/gems/1.8/gems/jruby-rack-1.1.5/lib/jruby-rack-1.1.5.jar!/rack/handler/servlet.rb:76) at $_3a_$java$jruby$lib$ruby$gems$$1_dot_8$gems$jruby_minus_rack_minus_1_dot_1_dot_5$lib$jruby_minus_rack_minus_1_dot_1_dot_5_dot_jar$rack$handler$servlet$method__14$RUBY$load_env_key.call($_3a_$java$jruby$lib$ruby$gems$$1_dot_8$gems$jruby_minus_rack_minus_1_dot_1_dot_5$lib$jruby_minus_rack_minus_1_dot_1_dot_5_dot_jar$rack$handler$servlet$method__14$RUBY$load_env_key:65535) at $_3a_$java$jruby$lib$ruby$gems$$1_dot_8$gems$jruby_minus_rack_minus_1_dot_1_dot_5$lib$jruby_minus_rack_minus_1_dot_1_dot_5_dot_jar$rack$handler$servlet$method__14$RUBY$load_env_key.call($_3a_$java$jruby$lib$ruby$gems$$1_dot_8$gems$jruby_minus_rack_minus_1_dot_1_dot_5$lib$jruby_minus_rack_minus_1_dot_1_dot_5_dot_jar$rack$handler$servlet$method__14$RUBY$load_env_key:65535) at org.jruby.runtime.callsite.CachingCallSite.call(org/jruby/runtime/callsite/CachingCallSite.java:201) at $_3a_.java.jruby.lib.ruby.gems.$1_dot_8.gems.jruby_minus_rack_minus_1_dot_1_dot_5.lib.jruby_minus_rack_minus_1_dot_1_dot_5_dot_jar.rack.handler.servlet.initialize(file:c:/java/jruby/lib/ruby/gems/1.8/gems/jruby-rack-1.1.5/lib/jruby-rack-1.1.5.jar!/rack/handler/servlet.rb:61) at $_3a_$java$jruby$lib$ruby$gems$$1_dot_8$gems$jruby_minus_rack_minus_1_dot_1_dot_5$lib$jruby_minus_rack_minus_1_dot_1_dot_5_dot_jar$rack$handler$servlet$block_3$RUBY$initialize.call($_3a_$java$jruby$lib$ruby$gems$$1_dot_8$gems$jruby_minus_rack_minus_1_dot_1_dot_5$lib$jruby_minus_rack_minus_1_dot_1_dot_5_dot_jar$rack$handler$servlet$block_3$RUBY$initialize:65535) at org.jruby.runtime.CompiledBlock.yield(org/jruby/runtime/CompiledBlock.java:133) at org.jruby.runtime.BlockBody.call(org/jruby/runtime/BlockBody.java:73) at org.jruby.runtime.Block.call(org/jruby/runtime/Block.java:89) at org.jruby.RubyProc.call(org/jruby/RubyProc.java:270) at org.jruby.RubyProc.call(org/jruby/RubyProc.java:220) at org.jruby.RubyProc$i$0$0$call.call(org/jruby/RubyProc$i$0$0$call.gen:65535) at org.jruby.internal.runtime.methods.DynamicMethod.call(org/jruby/internal/runtime/methods/DynamicMethod.java:219) at org.jruby.internal.runtime.methods.DynamicMethod.call(org/jruby/internal/runtime/methods/DynamicMethod.java:215) at org.jruby.RubyClass.finvoke(org/jruby/RubyClass.java:734) at org.jruby.javasupport.util.RuntimeHelpers.invoke(org/jruby/javasupport/util/RuntimeHelpers.java:551) at org.jruby.RubyHash.default_value_get(org/jruby/RubyHash.java:647) at org.jruby.RubyHash$i$default_value_get.call(org/jruby/RubyHash$i$default_value_get.gen:65535) at org.jruby.RubyClass.finvoke(org/jruby/RubyClass.java:715) at org.jruby.javasupport.util.RuntimeHelpers.invoke(org/jruby/javasupport/util/RuntimeHelpers.java:548) at org.jruby.RubyBasicObject.callMethod(org/jruby/RubyBasicObject.java:361) at org.jruby.RubyHash.op_aref(org/jruby/RubyHash.java:1007) at org.jruby.RubyHash$i$1$0$op_aref.call(org/jruby/RubyHash$i$1$0$op_aref.gen:65535) at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(org/jruby/runtime/callsite/CachingCallSite.java:312) at org.jruby.runtime.callsite.CachingCallSite.call(org/jruby/runtime/callsite/CachingCallSite.java:169) at $_3a_.java.jruby.lib.ruby.gems.$1_dot_8.gems.jruby_minus_rack_minus_1_dot_1_dot_5.lib.jruby_minus_rack_minus_1_dot_1_dot_5_dot_jar.rack.handler.servlet.populate(file:c:/java/jruby/lib/ruby/gems/1.8/gems/jruby-rack-1.1.5/lib/jruby-rack-1.1.5.jar!/rack/handler/servlet.rb:48) at $_3a_$java$jruby$lib$ruby$gems$$1_dot_8$gems$jruby_minus_rack_minus_1_dot_1_dot_5$lib$jruby_minus_rack_minus_1_dot_1_dot_5_dot_jar$rack$handler$servlet$method__9$RUBY$populate.call($_3a_$java$jruby$lib$ruby$gems$$1_dot_8$gems$jruby_minus_rack_minus_1_dot_1_dot_5$lib$jruby_minus_rack_minus_1_dot_1_dot_5_dot_jar$rack$handler$servlet$method__9$RUBY$populate:65535) at $_3a_$java$jruby$lib$ruby$gems$$1_dot_8$gems$jruby_minus_rack_minus_1_dot_1_dot_5$lib$jruby_minus_rack_minus_1_dot_1_dot_5_dot_jar$rack$handler$servlet$method__9$RUBY$populate.call($_3a_$java$jruby$lib$ruby$gems$$1_dot_8$gems$jruby_minus_rack_minus_1_dot_1_dot_5$lib$jruby_minus_rack_minus_1_dot_1_dot_5_dot_jar$rack$handler$servlet$method__9$RUBY$populate:65535) at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(org/jruby/runtime/callsite/CachingCallSite.java:312) at org.jruby.runtime.callsite.CachingCallSite.call(org/jruby/runtime/callsite/CachingCallSite.java:169) at $_3a_.java.jruby.lib.ruby.gems.$1_dot_8.gems.jruby_minus_rack_minus_1_dot_1_dot_5.lib.jruby_minus_rack_minus_1_dot_1_dot_5_dot_jar.rack.handler.servlet.initialize(file:c:/java/jruby/lib/ruby/gems/1.8/gems/jruby-rack-1.1.5/lib/jruby-rack-1.1.5.jar!/rack/handler/servlet.rb:42) at $_3a_$java$jruby$lib$ruby$gems$$1_dot_8$gems$jruby_minus_rack_minus_1_dot_1_dot_5$lib$jruby_minus_rack_minus_1_dot_1_dot_5_dot_jar$rack$handler$servlet$method__8$RUBY$initialize.call($_3a_$java$jruby$lib$ruby$gems$$1_dot_8$gems$jruby_minus_rack_minus_1_dot_1_dot_5$lib$jruby_minus_rack_minus_1_dot_1_dot_5_dot_jar$rack$handler$servlet$method__8$RUBY$initialize:65535) at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(org/jruby/runtime/callsite/CachingCallSite.java:322) at org.jruby.runtime.callsite.CachingCallSite.callBlock(org/jruby/runtime/callsite/CachingCallSite.java:178) at org.jruby.runtime.callsite.CachingCallSite.call(org/jruby/runtime/callsite/CachingCallSite.java:182) at org.jruby.RubyClass.newInstance(org/jruby/RubyClass.java:829) at org.jruby.RubyClass$i$newInstance.call(org/jruby/RubyClass$i$newInstance.gen:65535) at org.jruby.internal.runtime.methods.JavaMethod$JavaMethodZeroOrOneOrNBlock.call(org/jruby/internal/runtime/methods/JavaMethod.java:266) at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(org/jruby/runtime/callsite/CachingCallSite.java:312) at org.jruby.runtime.callsite.CachingCallSite.call(org/jruby/runtime/callsite/CachingCallSite.java:169) at $_3a_.java.jruby.lib.ruby.gems.$1_dot_8.gems.jruby_minus_rack_minus_1_dot_1_dot_5.lib.jruby_minus_rack_minus_1_dot_1_dot_5_dot_jar.rack.handler.servlet.create_env(file:c:/java/jruby/lib/ruby/gems/1.8/gems/jruby-rack-1.1.5/lib/jruby-rack-1.1.5.jar!/rack/handler/servlet.rb:25) at $_3a_$java$jruby$lib$ruby$gems$$1_dot_8$gems$jruby_minus_rack_minus_1_dot_1_dot_5$lib$jruby_minus_rack_minus_1_dot_1_dot_5_dot_jar$rack$handler$servlet$method__5$RUBY$create_env.call($_3a_$java$jruby$lib$ruby$gems$$1_dot_8$gems$jruby_minus_rack_minus_1_dot_1_dot_5$lib$jruby_minus_rack_minus_1_dot_1_dot_5_dot_jar$rack$handler$servlet$method__5$RUBY$create_env:65535) at $_3a_$java$jruby$lib$ruby$gems$$1_dot_8$gems$jruby_minus_rack_minus_1_dot_1_dot_5$lib$jruby_minus_rack_minus_1_dot_1_dot_5_dot_jar$rack$handler$servlet$method__5$RUBY$create_env.call($_3a_$java$jruby$lib$ruby$gems$$1_dot_8$gems$jruby_minus_rack_minus_1_dot_1_dot_5$lib$jruby_minus_rack_minus_1_dot_1_dot_5_dot_jar$rack$handler$servlet$method__5$RUBY$create_env:65535) at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(org/jruby/runtime/callsite/CachingCallSite.java:312) at org.jruby.runtime.callsite.CachingCallSite.call(org/jruby/runtime/callsite/CachingCallSite.java:169) at $_3a_.java.jruby.lib.ruby.gems.$1_dot_8.gems.jruby_minus_rack_minus_1_dot_1_dot_5.lib.jruby_minus_rack_minus_1_dot_1_dot_5_dot_jar.rack.handler.servlet.call(file:c:/java/jruby/lib/ruby/gems/1.8/gems/jruby-rack-1.1.5/lib/jruby-rack-1.1.5.jar!/rack/handler/servlet.rb:21) at $_3a_$java$jruby$lib$ruby$gems$$1_dot_8$gems$jruby_minus_rack_minus_1_dot_1_dot_5$lib$jruby_minus_rack_minus_1_dot_1_dot_5_dot_jar$rack$handler$servlet$method__4$RUBY$call.call($_3a_$java$jruby$lib$ruby$gems$$1_dot_8$gems$jruby_minus_rack_minus_1_dot_1_dot_5$lib$jruby_minus_rack_minus_1_dot_1_dot_5_dot_jar$rack$handler$servlet$method__4$RUBY$call:65535) at $_3a_$java$jruby$lib$ruby$gems$$1_dot_8$gems$jruby_minus_rack_minus_1_dot_1_dot_5$lib$jruby_minus_rack_minus_1_dot_1_dot_5_dot_jar$rack$handler$servlet$method__4$RUBY$call.call($_3a_$java$jruby$lib$ruby$gems$$1_dot_8$gems$jruby_minus_rack_minus_1_dot_1_dot_5$lib$jruby_minus_rack_minus_1_dot_1_dot_5_dot_jar$rack$handler$servlet$method__4$RUBY$call:65535) at org.jruby.RubyClass.finvoke(org/jruby/RubyClass.java:715) at org.jruby.javasupport.util.RuntimeHelpers.invoke(org/jruby/javasupport/util/RuntimeHelpers.java:548) at org.jruby.RubyBasicObject.callMethod(org/jruby/RubyBasicObject.java:361) at org.jruby.javasupport.JavaEmbedUtils$1.callMethod(org/jruby/javasupport/JavaEmbedUtils.java:143) at org.jruby.rack.DefaultRackApplication.__call(org/jruby/rack/DefaultRackApplication.java:72) at org.jruby.rack.DefaultRackApplication.call(org/jruby/rack/DefaultRackApplication.java:40) at org.jruby.rack.DefaultRackDispatcher.afterException(org/jruby/rack/DefaultRackDispatcher.java:36) at org.jruby.rack.AbstractRackDispatcher.handleException(org/jruby/rack/AbstractRackDispatcher.java:55) at org.jruby.rack.AbstractRackDispatcher.process(org/jruby/rack/AbstractRackDispatcher.java:36) at org.jruby.rack.AbstractServlet.service(org/jruby/rack/AbstractServlet.java:37) at org.jruby.rack.AbstractServlet.service(org/jruby/rack/AbstractServlet.java:43) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(org/apache/catalina/core/ApplicationFilterChain.java:305) at org.apache.catalina.core.ApplicationFilterChain.doFilter(org/apache/catalina/core/ApplicationFilterChain.java:210) at org.apache.catalina.core.StandardWrapperValve.invoke(org/apache/catalina/core/StandardWrapperValve.java:224) at org.apache.catalina.core.StandardContextValve.invoke(org/apache/catalina/core/StandardContextValve.java:169) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(org/apache/catalina/authenticator/AuthenticatorBase.java:472) at org.apache.catalina.core.StandardHostValve.invoke(org/apache/catalina/core/StandardHostValve.java:168) at org.apache.catalina.valves.ErrorReportValve.invoke(org/apache/catalina/valves/ErrorReportValve.java:98) at org.apache.catalina.core.StandardEngineValve.invoke(org/apache/catalina/core/StandardEngineValve.java:118) at org.apache.catalina.connector.CoyoteAdapter.service(org/apache/catalina/connector/CoyoteAdapter.java:407) at org.apache.coyote.http11.AbstractHttp11Processor.process(org/apache/coyote/http11/AbstractHttp11Processor.java:987) at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(org/apache/coyote/AbstractProtocol.java:579) at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(org/apache/tomcat/util/net/JIoEndpoint.java:307) at java.util.concurrent.ThreadPoolExecutor.runWorker(java/util/concurrent/ThreadPoolExecutor.java:1110) at java.util.concurrent.ThreadPoolExecutor$Worker.run(java/util/concurrent/ThreadPoolExecutor.java:603) at java.lang. Thread .run(java/lang/ Thread .java:722) In my particular case, I have only seen the issue with upcase method. Also, it seems to happen on a per-JVM startup basis. If my app starts up fine, it tends to run for days without further issue, even with additional JRuby runtimes spinning up/down.
        Hide
        Charles Oliver Nutter added a comment -

        Ok, still no luck reproducing this on JRuby master + Java 7u3. A few more notes.

        • getHeaderNames, called out multiple times here, actually returns an Enumeration. However the logic for Enumeration#each is trivial too.
        • Per reported that Mizuno had the problem consistently on Java 7u3 but I could not reproduce with a simple rackup file.
        • Peter sees the problem on Trinidad.
        • A common theme seems to be that this is happening in jruby-rack somewhere.
        Show
        Charles Oliver Nutter added a comment - Ok, still no luck reproducing this on JRuby master + Java 7u3. A few more notes. getHeaderNames, called out multiple times here, actually returns an Enumeration. However the logic for Enumeration#each is trivial too. Per reported that Mizuno had the problem consistently on Java 7u3 but I could not reproduce with a simple rackup file. Peter sees the problem on Trinidad. A common theme seems to be that this is happening in jruby-rack somewhere.
        Hide
        Peter K Chan added a comment -

        Charlie, if necessary, I can make arrangement for you to access an environment that can reproduce this error.

        I will be up in my time zone for another 1 or 2 hours.

        Show
        Peter K Chan added a comment - Charlie, if necessary, I can make arrangement for you to access an environment that can reproduce this error. I will be up in my time zone for another 1 or 2 hours.
        Hide
        Charles Oliver Nutter added a comment -

        Hi Peter, thanks for the new trace. That is helpful.

        I will be on IRC and would happily access your environment to try to dig deeper.

        Show
        Charles Oliver Nutter added a comment - Hi Peter, thanks for the new trace. That is helpful. I will be on IRC and would happily access your environment to try to dig deeper.
        Hide
        Peter K Chan added a comment -

        Charlie, is there an email where I can send you the access information?

        Give me some time to prepare your access, and I will email you the info.

        Show
        Peter K Chan added a comment - Charlie, is there an email where I can send you the access information? Give me some time to prepare your access, and I will email you the info.
        Hide
        Charles Oliver Nutter added a comment -

        Peter: headius@headius.com, always

        Show
        Charles Oliver Nutter added a comment - Peter: headius@headius.com, always
        Hide
        Charles Oliver Nutter added a comment -

        Heh...I just noticed everyone who has reported this reported it on Windows too...that's another clue at least.

        Show
        Charles Oliver Nutter added a comment - Heh...I just noticed everyone who has reported this reported it on Windows too...that's another clue at least.
        Hide
        Charles Oliver Nutter added a comment -

        Ok, I did some exploration on Peter's machine, and I'm sadly no closer to having a solution.

        Reproducing it was pretty easy, though it wasn't consistent. At first it happened every server startup, but after that it was maybe 75% of the server starts would lead to this.

        I added logic into Enumeration#each to print out the types of elements, and it is indeed getting a wrapped Java string somehow.

        I tried turning on --server mode and could not get it to reproduce. That could simply be a coincidence, but I probably restarted it + hit it 50 or more times.

        Show
        Charles Oliver Nutter added a comment - Ok, I did some exploration on Peter's machine, and I'm sadly no closer to having a solution. Reproducing it was pretty easy, though it wasn't consistent. At first it happened every server startup, but after that it was maybe 75% of the server starts would lead to this. I added logic into Enumeration#each to print out the types of elements, and it is indeed getting a wrapped Java string somehow. I tried turning on --server mode and could not get it to reproduce. That could simply be a coincidence, but I probably restarted it + hit it 50 or more times.
        Hide
        Charles Oliver Nutter added a comment -

        Found it! Epic commit message coming.

        Show
        Charles Oliver Nutter added a comment - Found it! Epic commit message coming.
        Hide
        Charles Oliver Nutter added a comment -

        Ok, it's fixed on master and 1.6 branch, even though we won't be doing a 1.6.8 release. Thanks for the patience on this, everyone, and thanks for the machine access Peter

        1.6 branch commit is d7ffb84.

        commit 545da6c46c62357f475d0279e3a78bdbc060f4f4
        Author: Charles Oliver Nutter <headius@headius.com>
        Date:   Tue May 15 15:02:27 2012 -0500
        
            Fix JRUBY-6619: NoMethodError 'upcase' on Java string
            
            Well, this was a tricky one to find.
            
            The problem stems from the actual Enumeration being walked. In
            this case, when running under a Tomcat-based server (or perhaps
            when running under a server that just uses some Apache libraries)
            it is the NamesEnumerator class.
            
            NamesEnumerator implements Enumeration<String>, which causes javac
            to generate two nextElement methods: one with a String return and
            one with an Object return. Issue number 1 is that JRuby does not
            consider these to be overloads, and so it would randomly pick one
            or the other depending on what order they were retrieved via Java
            reflection. That was the cause of the variability.
            
            JRuby converts return arguments using a cached "converter" that
            it validates is still correct by confirming the object type being
            returned matches the expected object type. If a method returns
            String, we will use the cached String converter if the returned
            object is also a String.
            
            We also had code in place that attempted to find a "more public"
            version of methods defined on non-public classes by searching the
            public classes and interfaces above it.
            
            In the case of NamesEnumerator, which is package-private, whenever
            the String-returning method was encountered first we would proceed
            to search for the Object version even though both were public
            methods. But upon finding the Object version, we did not save it.
            Instead, we only captured the converter based on an Object return
            type and still dispatched using the String version.
            
            So basically, we were calling the String version of the method but
            using the Object converter to convert the result, which is why it
            wrapped rather than converted.
            
            I removed the public method search, since it wasn't actually
            accomplishing anything. Both of the public methods in question
            should dispatch ok without it, and this should avoid the broken
            hybrid of String method with Object converter.
        
        Show
        Charles Oliver Nutter added a comment - Ok, it's fixed on master and 1.6 branch, even though we won't be doing a 1.6.8 release. Thanks for the patience on this, everyone, and thanks for the machine access Peter 1.6 branch commit is d7ffb84. commit 545da6c46c62357f475d0279e3a78bdbc060f4f4 Author: Charles Oliver Nutter <headius@headius.com> Date: Tue May 15 15:02:27 2012 -0500 Fix JRUBY-6619: NoMethodError 'upcase' on Java string Well, this was a tricky one to find. The problem stems from the actual Enumeration being walked. In this case, when running under a Tomcat-based server (or perhaps when running under a server that just uses some Apache libraries) it is the NamesEnumerator class. NamesEnumerator implements Enumeration<String>, which causes javac to generate two nextElement methods: one with a String return and one with an Object return. Issue number 1 is that JRuby does not consider these to be overloads, and so it would randomly pick one or the other depending on what order they were retrieved via Java reflection. That was the cause of the variability. JRuby converts return arguments using a cached "converter" that it validates is still correct by confirming the object type being returned matches the expected object type. If a method returns String, we will use the cached String converter if the returned object is also a String. We also had code in place that attempted to find a "more public" version of methods defined on non-public classes by searching the public classes and interfaces above it. In the case of NamesEnumerator, which is package-private, whenever the String-returning method was encountered first we would proceed to search for the Object version even though both were public methods. But upon finding the Object version, we did not save it. Instead, we only captured the converter based on an Object return type and still dispatched using the String version. So basically, we were calling the String version of the method but using the Object converter to convert the result, which is why it wrapped rather than converted. I removed the public method search, since it wasn't actually accomplishing anything. Both of the public methods in question should dispatch ok without it, and this should avoid the broken hybrid of String method with Object converter.

          People

          • Assignee:
            Charles Oliver Nutter
            Reporter:
            Peter K Chan
          • Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: