Tomcat 5.5过滤器执行引发异常,JRuby,Rails 3.2,warbler

时间:2013-04-17 05:05:54

标签: ruby-on-rails tomcat ruby-on-rails-3.2 jruby warbler

请帮忙。我需要将Rails 3.2部署到5.5旧版Tomcat。不幸的是,我没有可能将那个升级到6. Java是1.6.0_43-b01。该应用程序工作正常,运行webrick和我自己的tomcat(这是6,我不知道他们使用5) argh

这是我得到的例外。因为我是一个Ruby人和一个Java noob,任何想法如何解决这个问题?

HTTP Status 500 -

type Exception report

message

description The server encountered an internal error () that prevented it from fulfilling     this request.

exception

javax.servlet.ServletException: Filter execution threw an exception
root cause

java.lang.NoSuchMethodError: javax.servlet.ServletContext.getContextPath()Ljava/lang/String;
org.jruby.rack.servlet.DefaultServletRackContext.getContextPath(DefaultServletRackCont ext.java:75)
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
java.lang.reflect.Method.invoke(Method.java:597)
org.jruby.javasupport.JavaMethod.invokeDirectWithExceptionHandling(JavaMethod.java:440)
org.jruby.javasupport.JavaMethod.invokeDirect(JavaMethod.java:304)
org.jruby.java.invokers.InstanceMethodInvoker.call(InstanceMethodInvoker.java:52)
org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:306)
org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:136)
org.jruby.ast.CallNoArgNode.interpret(CallNoArgNode.java:64)
org.jruby.ast.CallOneArgNode.interpret(CallOneArgNode.java:57)
org.jruby.ast.LocalAsgnNode.interpret(LocalAsgnNode.java:123)
org.jruby.ast.NewlineNode.interpret(NewlineNode.java:105)
org.jruby.ast.BlockNode.interpret(BlockNode.java:71)
org.jruby.evaluator.ASTInterpreter.INTERPRET_METHOD(ASTInterpreter.java:75)
org.jruby.internal.runtime.methods.InterpretedMethod.call(InterpretedMethod.java:139)
org.jruby.internal.runtime.methods.DefaultMethod.call(DefaultMethod.java:172)
org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:306)
org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:136)
org.jruby.ast.VCallNode.interpret(VCallNode.java:88)
org.jruby.ast.NewlineNode.interpret(NewlineNode.java:105)
org.jruby.ast.BlockNode.interpret(BlockNode.java:71)
org.jruby.evaluator.ASTInterpreter.INTERPRET_METHOD(ASTInterpreter.java:75)
org.jruby.internal.runtime.methods.InterpretedMethod.call(InterpretedMethod.java:139)
org.jruby.internal.runtime.methods.DefaultMethod.call(DefaultMethod.java:172)
org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:306)
org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:136)
org.jruby.ast.CallNoArgNode.interpret(CallNoArgNode.java:64)
org.jruby.ast.NewlineNode.interpret(NewlineNode.java:105)
org.jruby.ast.BlockNode.interpret(BlockNode.java:71)
org.jruby.ast.RootNode.interpret(RootNode.java:129)
org.jruby.evaluator.ASTInterpreter.INTERPRET_ROOT(ASTInterpreter.java:120)
org.jruby.Ruby.runInterpreter(Ruby.java:842)
org.jruby.Ruby.loadFile(Ruby.java:2659)
org.jruby.runtime.load.ExternalScript.load(ExternalScript.java:66)
org.jruby.runtime.load.LoadService.load(LoadService.java:351)
org.jruby.RubyKernel.loadCommon(RubyKernel.java:1054)
org.jruby.RubyKernel.load19(RubyKernel.java:1046)
org.jruby.RubyKernel$INVOKER$s$0$1$load19.call(RubyKernel$INVOKER$s$0$1$load19.gen)
org.jruby.internal.runtime.methods.DynamicMethod.call(DynamicMethod.java:209)
org.jruby.internal.runtime.methods.DynamicMethod.call(DynamicMethod.java:205)
org.jruby.runtime.callsite.CachingCallSite.cacheAndCall(CachingCallSite.java:326)
org.jruby.runtime.callsite.CachingCallSite.call(CachingCallSite.java:170)
org.jruby.ast.FCallOneArgNode.interpret(FCallOneArgNode.java:36)
org.jruby.ast.NewlineNode.interpret(NewlineNode.java:105)
org.jruby.ast.RootNode.interpret(RootNode.java:129)
org.jruby.evaluator.ASTInterpreter.INTERPRET_ROOT(ASTInterpreter.java:120)
org.jruby.Ruby.evalScriptlet(Ruby.java:427)
org.jruby.Ruby.evalScriptlet(Ruby.java:404)
org.jruby.rack.rails.RailsRackApplicationFactory.createApplicationObject(RailsRackApplicationFactory.java:21)
org.jruby.rack.DefaultRackApplicationFactory$1.create(DefaultRackApplicationFactory.java:98)
org.jruby.rack.DefaultRackApplicationFactory$RackApplicationImpl.init(DefaultRackApplicationFactory.java:420)
org.jruby.rack.DefaultRackApplicationFactory.getApplication(DefaultRackApplicationFactory.java:111)
org.jruby.rack.PoolingRackApplicationFactory.createApplication(PoolingRackApplicationFactory.java:340)
org.jruby.rack.PoolingRackApplicationFactory.getApplicationImpl(PoolingRackApplicationFactory.java:180)
org.jruby.rack.RackApplicationFactoryDecorator.getApplication(RackApplicationFactoryDecorator.java:131)
org.jruby.rack.DefaultRackDispatcher.getApplication(DefaultRackDispatcher.java:37)
org.jruby.rack.AbstractRackDispatcher.process(AbstractRackDispatcher.java:32)
org.jruby.rack.AbstractFilter.doFilter(AbstractFilter.java:66)

1 个答案:

答案 0 :(得分:1)

根据Nick Sieger的this response,你需要将jruby-rack降级到0.9.6(或更低版本)才能与Tomcat 5.5一起运行。