2010-10-07 87 views
0

我的JRuby on rails應用程序在Tomcat 6.0上工作正常,但是當我將它部署到我公司的webfarm(它是JBoss 4.2.0/Tomcat 5.5(Servlet API 2.4)它失敗,出現以下堆棧跟蹤:JRuby on Rails應用程序和JBoss 4.2.0/Tomcat 5.5

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... 

感謝, 長Arkadiy

回答

1

首先要注意JRuby的機架改爲Servlet 2.5的爲0.9.7發佈。所以爲了在5.5上運行,你必須降級到0.9.6或更低版本。 Warbler依賴關係可能有點棘手,但您可以使用config.java_libs手動調整Warbler配置文件中的jar。

至於上面的錯誤,我以前沒見過。唯一想到的是native/ffi支持在某些容器中不起作用,您可能需要使用-Djruby.native.enabled=false將其禁用。

1
org.jruby.rack.RackInitializationException: stack level too deep 

可能是由低線程堆棧大小造成的。嘗試通過將-Xss16k傳遞給JVM來增加它。增加它直到你找到一個對應用程序無害的值。

相關問題