Excetion in Tomcat

I am trying to run Redmine in Tomcat 6, after I deployed the war file I
am getting below error.

org.jruby.rack.RackInitializationException: java.lang.NoSuchMethodError:
javax.servlet.ServletContext.getContextPath()Ljava/lang/String;
from file:/C:/Program Files/Apache Software Foundation/Tomcat
5.5/webapps/redmine/WEB-INF/lib/jruby-rack-0.9.7.jar!/jruby/rack/rails.rb:113:in
setup_relative_url_root' from file:/C:/Program Files/Apache Software Foundation/Tomcat 5.5/webapps/redmine/WEB-INF/lib/jruby-rack-0.9.7.jar!/jruby/rack/rails.rb:48:inload_environment’
from file:/C:/Program Files/Apache Software Foundation/Tomcat
5.5/webapps/redmine/WEB-INF/lib/jruby-rack-0.9.7.jar!/jruby/rack/rails.rb:38:in
to_app' from file:/C:/Program Files/Apache Software Foundation/Tomcat 5.5/webapps/redmine/WEB-INF/lib/jruby-rack-0.9.7.jar!/jruby/rack/rails.rb:186:innew’
from :2
from file:/C:/Program Files/Apache Software Foundation/Tomcat
5.5/webapps/redmine/WEB-INF/lib/jruby-rack-0.9.7.jar!/vendor/rack-1.1.0/rack/builder.rb:46:in
instance_eval' from file:/C:/Program Files/Apache Software Foundation/Tomcat 5.5/webapps/redmine/WEB-INF/lib/jruby-rack-0.9.7.jar!/vendor/rack-1.1.0/rack/builder.rb:46:ininitialize’
from :2:in `new’
from :2

at
org.jruby.rack.DefaultRackApplicationFactory$4.init(DefaultRackApplicationFactory.java:172)
at
org.jruby.rack.DefaultRackApplicationFactory.getApplication(DefaultRackApplicationFactory.java:51)
at
org.jruby.rack.PoolingRackApplicationFactory.getApplication(PoolingRackApplicationFactory.java:94)
at
org.jruby.rack.servlet.DefaultServletDispatcher.process(DefaultServletDispatcher.java:36)
at org.jruby.rack.RackFilter.doFilter(RackFilter.java:56)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:215)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:172)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108)
at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:174)
at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:875)
at
org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665)
at
org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528)
at
org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81)
at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:689)
at java.lang.Thread.run(Thread.java:619)
Caused by: org.jruby.exceptions.RaiseException: Native Exception: ‘class
java.lang.NoSuchMethodError’; Message:
javax.servlet.ServletContext.getContextPath()Ljava/lang/String;;
StackTrace: java.lang.NoSuchMethodError:
javax.servlet.ServletContext.getContextPath()Ljava/lang/String;
at
org.jruby.rack.servlet.ServletRackContext.getContextPath(ServletRackContext.java:104)

at
org.jruby.rack.servlet.ServletRackContext.getContextPath(ServletRackContext.java:104)
Caused by: java.lang.NoSuchMethodError:
javax.servlet.ServletContext.getContextPath()Ljava/lang/String;
… 1 more

Does Tomcat 6 not support the Servlet 2.5 spec?

/Nick

On Thu, Apr 8, 2010 at 5:11 PM, Murtuza K. [email protected]
wrote:

`load_environment’
from file:/C:/Program Files/Apache Software Foundation/Tomcat
org.jruby.rack.PoolingRackApplicationFactory.getApplication(PoolingRackApplicationFactory.java:94)
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:172)
at
javax.servlet.ServletContext.getContextPath()Ljava/lang/String;;

Posted via http://www.ruby-forum.com/.


To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email


To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email

On Thu, Apr 8, 2010 at 6:28 PM, Nick S. [email protected]
wrote:

Does Tomcat 6 not support the Servlet 2.5 spec?

It does, I’ve got 2.5 apps running on it.


Hassan S. ------------------------ [email protected]
twitter: @hassan


To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email

Does Tomcat 6 not support the Servlet 2.5 spec?

It does, I’ve got 2.5 apps running on it.

Actually I was running it on Tomcat 5.5, switched to Tomcat 6 and this
error was gone but now I am seeing a wired error. Here is the stack
trace.

org.jruby.rack.RackInitializationException: IO error – rfpdf/korean
from file:/C:/Program Files/Apache Software Foundation/Tomcat
6.0/webapps/redmine/WEB-INF/lib/jruby-stdlib-1.4.0.jar!/META-INF/jruby.home/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in
require' from C:/Program Files/Apache Software Foundation/Tomcat 6.0/webapps/redmine/WEB-INF/vendor/rails/activesupport/lib/active_support/dependencies.rb:158:inrequire’
from C:/Program Files/Apache Software Foundation/Tomcat
6.0/webapps/redmine/WEB-INF/vendor/plugins/rfpdf/lib/rfpdf.rb:31
from C:/Program Files/Apache Software Foundation/Tomcat
6.0/webapps/redmine/WEB-INF/vendor/plugins/rfpdf/lib/rfpdf.rb:31:in
require' from file:/C:/Program Files/Apache Software Foundation/Tomcat 6.0/webapps/redmine/WEB-INF/lib/jruby-stdlib-1.4.0.jar!/META-INF/jruby.home/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:inrequire’
from C:/Program Files/Apache Software Foundation/Tomcat
6.0/webapps/redmine/WEB-INF/vendor/rails/activesupport/lib/active_support/dependencies.rb:158:in
require' from C:/Program Files/Apache Software Foundation/Tomcat 6.0/webapps/redmine/WEB-INF/vendor/plugins/rfpdf/init.rb:1:inevaluate_init_rb’

at
org.jruby.rack.DefaultRackApplicationFactory$4.init(DefaultRackApplicationFactory.java:172)
at
org.jruby.rack.DefaultRackApplicationFactory.getApplication(DefaultRackApplicationFactory.java:51)
at
org.jruby.rack.PoolingRackApplicationFactory.getApplication(PoolingRackApplicationFactory.java:94)
at
org.jruby.rack.servlet.DefaultServletDispatcher.process(DefaultServletDispatcher.java:36)
at org.jruby.rack.RackFilter.doFilter(RackFilter.java:56)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)
at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:849)
at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
at
org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:454)
at java.lang.Thread.run(Unknown Source)
Caused by: org.jruby.exceptions.RaiseException: IO error – rfpdf/korean
at (unknown).new(file:/C:/Program Files/Apache Software
Foundation/Tomcat
6.0/webapps/redmine/WEB-INF/lib/jruby-stdlib-1.4.0.jar!/META-INF/jruby.home/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31)
at Kernel.require(file:/C:/Program Files/Apache Software
Foundation/Tomcat
6.0/webapps/redmine/WEB-INF/lib/jruby-stdlib-1.4.0.jar!/META-INF/jruby.home/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31)
at Kernel.require(C:/Program Files/Apache Software Foundation/Tomcat
6.0/webapps/redmine/WEB-INF/vendor/rails/activesupport/lib/active_support/dependencies.rb:158)
at ActiveSupport::Dependencies::Loadable.require(C:/Program
Files/Apache Software Foundation/Tomcat
6.0/webapps/redmine/WEB-INF/vendor/plugins/rfpdf/lib/rfpdf.rb:31)
at (unknown).(unknown)(C:/Program Files/Apache Software
Foundation/Tomcat
6.0/webapps/redmine/WEB-INF/vendor/plugins/rfpdf/lib/rfpdf.rb:31)
at Kernel.require(file:/C:/Program Files/Apache Software
Foundation/Tomcat
6.0/webapps/redmine/WEB-INF/lib/jruby-stdlib-1.4.0.jar!/META-INF/jruby.home/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31)
at Kernel.require(C:/Program Files/Apache Software Foundation/Tomcat
6.0/webapps/redmine/WEB-INF/vendor/rails/activesupport/lib/active_support/dependencies.rb:158)
at ActiveSupport::Dependencies::Loadable.require(C:/Program
Files/Apache Software Foundation/Tomcat
6.0/webapps/redmine/WEB-INF/vendor/plugins/rfpdf/init.rb:1)
at Rails::Plugin.evaluate_init_rb(C:/Program Files/Apache Software
Foundation/Tomcat
6.0/webapps/redmine/WEB-INF/vendor/rails/activesupport/lib/active_support/core_ext/kernel/reporting.rb:11)
at Kernel.eval(C:/Program Files/Apache Software Foundation/Tomcat
6.0/webapps/redmine/WEB-INF/vendor/rails/railties/lib/rails/plugin.rb:158)
at Rails::Plugin.evaluate_init_rb(C:/Program Files/Apache Software
Foundation/Tomcat
6.0/webapps/redmine/WEB-INF/vendor/rails/activesupport/lib/active_support/core_ext/kernel/reporting.rb:11)
at Kernel.silence_warnings(C:/Program Files/Apache Software
Foundation/Tomcat
6.0/webapps/redmine/WEB-INF/vendor/rails/railties/lib/rails/plugin.rb:154)
at Rails::Plugin.evaluate_init_rb(C:/Program Files/Apache Software
Foundation/Tomcat
6.0/webapps/redmine/WEB-INF/vendor/rails/railties/lib/rails/plugin.rb:48)
at Rails::Plugin.load(C:/Program Files/Apache Software
Foundation/Tomcat
6.0/webapps/redmine/WEB-INF/vendor/plugins/engines/lib/engines/plugin.rb:44)
at Engines::Plugin.load(C:/Program Files/Apache Software
Foundation/Tomcat
6.0/webapps/redmine/WEB-INF/vendor/rails/railties/lib/rails/plugin/loader.rb:38)
at Rails::Plugin::Loader.load_plugins(C:/Program Files/Apache Software
Foundation/Tomcat
6.0/webapps/redmine/WEB-INF/vendor/rails/railties/lib/rails/plugin/loader.rb:37)
at Array.each(C:/Program Files/Apache Software Foundation/Tomcat
6.0/webapps/redmine/WEB-INF/vendor/rails/railties/lib/rails/plugin/loader.rb:37)
at Rails::Plugin::Loader.load_plugins(C:/Program Files/Apache Software
Foundation/Tomcat
6.0/webapps/redmine/WEB-INF/vendor/rails/railties/lib/initializer.rb:369)
at Rails::Initializer.load_plugins(C:/Program Files/Apache Software
Foundation/Tomcat
6.0/webapps/redmine/WEB-INF/vendor/rails/railties/lib/initializer.rb:165)
at Rails::Initializer.process(C:/Program Files/Apache Software
Foundation/Tomcat
6.0/webapps/redmine/WEB-INF/vendor/rails/railties/lib/initializer.rb:113)
at #Class:01x1ffd425.run(C:/Program Files/Apache Software
Foundation/Tomcat 6.0/webapps/redmine/WEB-INF/config/environment.rb:20)
at (unknown).(unknown)(C:/Program Files/Apache Software
Foundation/Tomcat 6.0/webapps/redmine/WEB-INF/config/environment.rb:44)
at Kernel.load(file:/C:/Program Files/Apache Software
Foundation/Tomcat
6.0/webapps/redmine/WEB-INF/lib/jruby-rack-0.9.7.jar!/jruby/rack/rails.rb:44)
at
JRuby::Rack::RailsBooter::Rails2Environment.load_environment(file:/C:/Program
Files/Apache Software Foundation/Tomcat
6.0/webapps/redmine/WEB-INF/lib/jruby-rack-0.9.7.jar!/jruby/rack/rails.rb:38)
at JRuby::Rack::RailsBooter::Rails2Environment.to_app(file:/C:/Program
Files/Apache Software Foundation/Tomcat
6.0/webapps/redmine/WEB-INF/lib/jruby-rack-0.9.7.jar!/jruby/rack/rails.rb:186)
at #Class:01x963953.new(:2)
at (unknown).(unknown)(file:/C:/Program Files/Apache Software
Foundation/Tomcat
6.0/webapps/redmine/WEB-INF/lib/jruby-rack-0.9.7.jar!/vendor/rack-1.1.0/rack/builder.rb:46)
at Kernel.instance_eval(file:/C:/Program Files/Apache Software
Foundation/Tomcat
6.0/webapps/redmine/WEB-INF/lib/jruby-rack-0.9.7.jar!/vendor/rack-1.1.0/rack/builder.rb:46)
at Kernel.instance_eval(file:/C:/Program Files/Apache Software
Foundation/Tomcat
6.0/webapps/redmine/WEB-INF/lib/jruby-rack-0.9.7.jar!/vendor/rack-1.1.0/rack/builder.rb:46)
at Rack::Builder.initialize(:2)
at (unknown).new(:2)
at (unknown).(unknown)(:1)

2010/4/15 Reto Schüttel [email protected]:

Hi Nick

Am 09.04.2010 um 03:28 schrieb Nick S.:

Does Tomcat 6 not support the Servlet 2.5 spec?

He was running 5.5 (see the paths in the error output). I have to stick with tomcat 5.5 (which doesnt support Servlet 2.5), will it no longer be supported with jruby-rack 0.9.7?

Use 0.9.6 if you can. If you can’t, create a ticket for 0.9.7 to
downgrade back below Servlet 2.5, we’ll see how many people need it.

Thanks,
/Nick

Cheers!
Reto

To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email


To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email

Nick S. wrote:

Use 0.9.6 if you can. If you can’t, create a ticket for 0.9.7 to
downgrade back below Servlet 2.5, we’ll see how many people need it.

Just to add as I had that problem recently, the exception
“Caused by: java.lang.NoSuchMethodError:
javax.servlet.ServletContext.getContextPath()Ljava/lang/String”
is thrown when deploying an application with jruby-rack > 0.9.6 to
Tomcat 5.5. That means that if you are using Warbler to deploy the
application to Tomcat, you’ll get the exception. A workaround is to use
Warbler < 1.0 (0.9.14 at the moment).

Hi Nick

Am 09.04.2010 um 03:28 schrieb Nick S.:

Does Tomcat 6 not support the Servlet 2.5 spec?

He was running 5.5 (see the paths in the error output). I have to stick
with tomcat 5.5 (which doesnt support Servlet 2.5), will it no longer be
supported with jruby-rack 0.9.7?

Cheers!
Reto

To unsubscribe from this list, please visit:

http://xircles.codehaus.org/manage_email

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs