JRuby on Rails应用程序和JBoss 4.2.0/Tomcat 5.5 [英] JRuby on Rails app on and JBoss 4.2.0/Tomcat 5.5

查看:95
本文介绍了JRuby on Rails应用程序和JBoss 4.2.0/Tomcat 5.5的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的JRuby on rails应用程序在Tomcat 6.0上运行良好,但是当我将其部署在公司的Webfarm(即JBoss 4.2.0/Tomcat 5.5(Servlet API 2.4))上时,它失败并显示以下堆栈跟踪:

My JRuby on rails app works fine on Tomcat 6.0, But when I deploy it on my company's webfarm which is JBoss 4.2.0/Tomcat 5.5 (Servlet API 2.4) It fails with the following stack trace:

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

Thanks, Arkadiy

推荐答案

首先请注意,从0.9.7版本开始,JRuby-Rack更改为Servlet 2.5.因此,要在5.5上运行,您必须降级到0.9.6或更早的版本.对于Warbler依赖项,这可能有些棘手,但是您可以使用config.java_libs在Warbler配置文件中手动调整罐子.

First note that JRuby-Rack changed to servlet 2.5 as of the 0.9.7 release. So in order to run on 5.5 you'll have to downgrade to 0.9.6 or earlier. This may be a bit tricky with Warbler dependencies but you can manually adjust the jars in a Warbler config file using config.java_libs.

至于上面的错误,我以前从未见过.唯一想到的是,本机/ffi支持在某些容器中不起作用,您可能需要使用-Djruby.native.enabled=false禁用它.

As for the errors above, I haven't seen them before. The only thing that comes to mind is that native/ffi support doesn't work in some containers and you may need to disable it with -Djruby.native.enabled=false.

这篇关于JRuby on Rails应用程序和JBoss 4.2.0/Tomcat 5.5的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆