我的 JRuby on rails 应用程序在 Tomcat 6.0 上运行良好,但是当我将它部署在我公司的 JBoss 4.2.0/Tomcat 5.5 (Servlet API 2.4) 的 webfarm 上时,它失败并显示以下堆栈跟踪:
java.lang.ArrayIndexOutOfBoundsException: 0
at com.kenai.jaffl.provider.jffi.AsmLibraryLoader.generateBufferInvocation(AsmLibraryLoader.java:548)
at com.kenai.jaffl.provider.jffi.AsmLibraryLoader.generateMethod(AsmLibraryLoader.java:511)
at com.kenai.jaffl.provider.jffi.AsmLibraryLoader.generateInterfaceImpl(AsmLibraryLoader.java:223)
at com.kenai.jaffl.provider.jffi.AsmLibraryLoader.loadLibrary(AsmLibraryLoader.java:125)
at com.kenai.jaffl.provider.jffi.Provider.loadLibrary(Provider.java:31)
at com.kenai.jaffl.provider.jffi.Provider.loadLibrary(Provider.java:25)
at com.kenai.jaffl.Library.loadLibrary(Library.java:76)
at com.kenai.jaffl.Library.loadLibrary(Library.java:48)
at org.jruby.ext.socket.RubyUNIXSocket.tryUnixDomainSocket(RubyUNIXSocket.java:167)
at org.jruby.ext.socket.RubySocket$Service.load(RubySocket.java:103)
at org.jruby.runtime.load.LoadService.reflectedLoad(LoadService.java:384)
at org.jruby.ext.LateLoadingLibrary.load(LateLoadingLibrary.java:49)
at org.jruby.runtime.load.LoadService.tryLoadingLibraryOrScript(LoadService.java:671)
at org.jruby.runtime.load.LoadService.smartLoad(LoadService.java:314)
at org.jruby.runtime.load.LoadService.require(LoadService.java:357)
at org.jruby.runtime.load.LoadService.lockAndRequire(LoadService.java:289)
at org.jruby.RubyKernel.requireCommon(RubyKernel.java:984)
at org.jruby.RubyKernel.require(RubyKernel.java:967)
at org.jruby.RubyKernel$s_method_1_0$RUBYFRAMEDINVOKER$require.call(org/jruby/RubyKernel$s_method_1_0$RUBYFRAMEDINVOKER$require.gen:65535)
at org.jruby.internal.runtime.methods.JavaMethod$JavaMethodOneOrNBlock.call(JavaMethod.java:319)
at org.jruby.internal.runtime.methods.AliasMethod.call(AliasMethod.java:61)
at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:146)
at ruby.jit.require_120F9897B5F59B6B5FA66BC56E0277183EA7EAA5.rescue_1$RUBY$__rescue___0(custom_require.rb:31)
at ruby.jit.require_120F9897B5F59B6B5FA66BC56E0277183EA7EAA5.__file__(Lruby.jit.require_120F9897B5F59B6B5FA66BC56E0277183EA7EAA5;Lorg.jruby.runtime.ThreadContext;Lorg.jruby.runtime.builtin.IRubyObject;Lorg.jruby.runtime.builtin.IRubyObject;Lorg.jruby.runtime.Block;)Lorg.jruby.runtime.builtin.IRubyObject;(custom_require.rb:???)
at ruby.jit.require_120F9897B5F59B6B5FA66BC56E0277183EA7EAA5.__file__(Lorg.jruby.runtime.ThreadContext;Lorg.jruby.runtime.builtin.IRubyObject;Lorg.jruby.runtime.builtin.IRubyObject;Lorg.jruby.runtime.Block;)Lorg.jruby.runtime.builtin.IRubyObject;(custom_require.rb:???)
at org.jruby.internal.runtime.methods.JittedMethod.call(JittedMethod.java:153)
at org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:309)
at org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:148)
at org.jruby.ast.FCallOneArgNode.interpret(FCallOneArgNode.java:36)
at org.jruby.ast.NewlineNode.interpret(NewlineNode.java:104)
at org.jruby.ast.BlockNode.interpret(BlockNode.java:71)
at org.jruby.ast.RootNode.interpret(RootNode.java:129)
进而:
org.jruby.rack.RackInitializationException: stack level too deep
from file:/home/tkjbgrpd/jboss/eap4.2/tmp/deploy/tmp23048subwire-exp.war/WEB-INF/lib/jruby-stdlib-1.5.3.jar!/META-INF/jruby.home/lib/ruby/site_ruby/1.8/rubygems/version.rb:298:in `<=>'
from file:/home/tkjbgrpd/jboss/eap4.2/tmp/deploy/tmp23048subwire-exp.war/WEB-INF/lib/jruby-stdlib-1.5.3.jar!/META-INF/jruby.home/lib/ruby/site_ruby/1.8/rubygems/requirement.rb:17
from file:/home/tkjbgrpd/jboss/eap4.2/tmp/deploy/tmp23048subwire-exp.war/WEB-INF/lib/jruby-stdlib-1.5.3.jar!/META-INF/jruby.home/lib/ruby/site_ruby/1.8/rubygems/requirement.rb:129:in `call'
from file:/home/tkjbgrpd/jboss/eap4.2/tmp/deploy/tmp23048subwire-exp.war/WEB-INF/lib/jruby-stdlib-1.5.3.jar!/META-INF/jruby.home/lib/ruby/site_ruby/1.8/rubygems/requirement.rb:129:in `satisfied_by?'
from file:/home/tkjbgrpd/jboss/eap4.2/tmp/deploy/tmp23048subwire-exp.war/WEB-INF/lib/jruby-stdlib-1.5.3.jar!/META-INF/jruby.home/lib/ruby/site_ruby/1.8/rubygems/requirement.rb:129:in `all?'
from file:/home/tkjbgrpd/jboss/eap4.2/tmp/deploy/tmp23048subwire-exp.war/WEB-INF/lib/jruby-stdlib-1.5.3.jar!/META-INF/jruby.home/lib/ruby/site_ruby/1.8/rubygems/requirement.rb:129:in `satisfied_by?'
from file:/home/tkjbgrpd/jboss/eap4.2/tmp/deploy/tmp23048subwire-exp.war/WEB-INF/lib/jruby-stdlib-1.5.3.jar!/META-INF/jruby.home/lib/ruby/site_ruby/1.8/rubygems/dependency.rb:202:in `=~'
from /home/tkjbgrpd/jboss/eap4.2/tmp/deploy/tmp23048subwire-exp.war/WEB-INF/gems/gems/bundler-1.0.2/lib/bundler/index.rb:41:in `search_for_all_platforms'
... 321 levels...
谢谢, 阿卡迪