0
請幫忙。我需要將Rails 3.2部署到5.5遺留的Tomcat。不幸的是,我沒有可能將其升級到6.Java的版本是1.6.0_43-b01。該應用程序工作正常,運行webrick和我自己的雄貓(這是6,我不知道他們使用5)arghTomcat 5.5過濾器執行拋出異常,JRuby,Rails 3.2,鶯
這是我得到的例外。因爲我是一個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)
好的,我發現它與Servlet 2.5有關,Tomcat 5只支持到2.4。 Andybody有一個想法如何與2.4戰鬥? – florigee