RackInitializationException when run with Tomcat7 and symlinked instead of
packaged into the WAR
------------------------------------------------------------------------------------------------
Key: JRUBY-6168
URL: https://jira.codehaus.org/browse/JRUBY-6168
Project: JRuby
Issue Type: Bug
Components: JRuby-extras
Affects Versions: JRuby 1.7
Environment: jruby 565a6d8a2f943e0c2de602841f1a3f886deb7c39
Tomcat7
Ubuntu 10.04.3 LTS
Reporter: Tom Germano
I am trying to run a WAR where the jruby.jar is not packaged into the warble
for security reasons. The WAR will run fine when jruby.jar is packaged into the
WAR but not when I symlink jruby.jar into the tomcat7/lib directory. There are
three distinct warnings/errors that do not occur when either symlinking to
jruby 1.6.5 or including jruby 1.7 into the WAR:
warning: already initialized constant ClassReader
Invalid gemspec ... Valid types are [:development, :runtime]
org.jruby.rack.RackInitializationException: no such file to load --
bundler/setup
Below is the main snippet of the log with the warnings and errors:
file:/usr/share/ghost/java/jruby-complete-1.7.0.jar!/META-INF/jruby.home/lib/ruby/site_ruby/shared/jruby.rb:10
warning: already initialized constant ClassReader
file:/usr/share/ghost/java/jruby-complete-1.7.0.jar!/META-INF/jruby.home/lib/ruby/site_ruby/shared/jruby.rb:10
warning: already initialized constant ClassReader
Invalid gemspec in
[/usr/share/tomcat7/webapps/ROOT/WEB-INF/gems/specifications/rack-1.3.3.gemspec]:
Valid types are [:development, :runtime],
Invalid gemspec in
[/usr/share/tomcat7/webapps/ROOT/WEB-INF/gems/specifications/mime-types-1.16.gemspec]:
Valid types are [:development, :runtime],
Invalid gemspec in
[/usr/share/tomcat7/webapps/ROOT/WEB-INF/gems/specifications/rack-mount-0.8.3.gemspec]:
Valid types are [:development, :runtime],
Invalid gemspec in
[/usr/share/tomcat7/webapps/ROOT/WEB-INF/gems/specifications/treetop-1.4.10.gemspec]:
Valid types are [:development, :runtime],
Invalid gemspec in
[/usr/share/tomcat7/webapps/ROOT/WEB-INF/gems/specifications/rack-cache-1.0.3.gemspec]:
Valid types are [:development, :runtime],
Invalid gemspec in
[/usr/share/tomcat7/webapps/ROOT/WEB-INF/gems/specifications/actionpack-3.1.0.gemspec]:
Valid types are [:development, :runtime],
Invalid gemspec in
[/usr/share/tomcat7/webapps/ROOT/WEB-INF/gems/specifications/rdoc-3.9.4.gemspec]:
Valid types are [:development, :runtime],
Invalid gemspec in
[/usr/share/tomcat7/webapps/ROOT/WEB-INF/gems/specifications/bundler-1.0.21.gemspec]:
Valid types are [:development, :runtime],
Invalid gemspec in
[/usr/share/tomcat7/webapps/ROOT/WEB-INF/gems/specifications/uglifier-1.0.3.gemspec]:
Valid types are [:development, :runtime],
Invalid gemspec in
[/usr/share/tomcat7/webapps/ROOT/WEB-INF/gems/specifications/execjs-1.2.9.gemspec]:
Valid types are [:development, :runtime],
Invalid gemspec in
[/usr/share/tomcat7/webapps/ROOT/WEB-INF/gems/specifications/coffee-rails-3.1.1.gemspec]:
Valid types are [:development, :runtime],
Invalid gemspec in
[/usr/share/tomcat7/webapps/ROOT/WEB-INF/gems/specifications/activemodel-3.1.0.gemspec]:
Valid types are [:development, :runtime],
Invalid gemspec in
[/usr/share/tomcat7/webapps/ROOT/WEB-INF/gems/specifications/i18n-0.6.0.gemspec]:
Valid types are [:development, :runtime],
Invalid gemspec in
[/usr/share/tomcat7/webapps/ROOT/WEB-INF/gems/specifications/activeresource-3.1.0.gemspec]:
Valid types are [:development, :runtime],
Invalid gemspec in
[/usr/share/tomcat7/webapps/ROOT/WEB-INF/gems/specifications/multi_json-1.0.3.gemspec]:
Valid types are [:development, :runtime],
Invalid gemspec in
[/usr/share/tomcat7/webapps/ROOT/WEB-INF/gems/specifications/rack-ssl-1.3.2.gemspec]:
Valid types are [:development, :runtime],
Invalid gemspec in
[/usr/share/tomcat7/webapps/ROOT/WEB-INF/gems/specifications/jquery-rails-1.0.14.gemspec]:
Valid types are [:development, :runtime],
Oct 27, 2011 7:36:48 AM org.apache.catalina.core.ApplicationContext log
SEVERE: Application Error
org.jruby.rack.RackInitializationException: no such file to load --
bundler/setup
from
file:/usr/share/ghost/java/jruby-complete-1.7.0.jar!/META-INF/jruby.home/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in
`require'
from /usr/share/tomcat7/webapps/ROOT/WEB-INF/config/boot.rb:6:in
`(root)'
from org/jruby/RubyKernel.java:970:in `require'
from /usr/share/tomcat7/webapps/ROOT/WEB-INF/config/boot.rb:36:in
`require'
from
file:/usr/share/tomcat7/webapps/ROOT/WEB-INF/lib/jruby-rack-1.0.10.jar!/jruby/rack/rails.rb:165:in
`load_environment'
from
file:/usr/share/tomcat7/webapps/ROOT/WEB-INF/lib/jruby-rack-1.0.10.jar!/jruby/rack/rails.rb:173:in
`to_app'
from
file:/usr/share/tomcat7/webapps/ROOT/WEB-INF/lib/jruby-rack-1.0.10.jar!/jruby/rack/rails.rb:193:in
`new'
from <web.xml>:1:in `(root)'
from org/jruby/RubyBasicObject.java:1753:in `instance_eval'
from
file:/usr/share/tomcat7/webapps/ROOT/WEB-INF/lib/jruby-rack-1.0.10.jar!/vendor/rack-1.3.2/rack/builder.rb:51:in
`initialize'
from <web.xml>:1:in `(root)'
at
org.jruby.rack.DefaultRackApplicationFactory$4.init(DefaultRackApplicationFactory.java:204)
at
org.jruby.rack.DefaultRackApplicationFactory.getApplication(DefaultRackApplicationFactory.java:54)
at
org.jruby.rack.PoolingRackApplicationFactory.getApplication(PoolingRackApplicationFactory.java:95)
at
org.jruby.rack.DefaultRackDispatcher.process(DefaultRackDispatcher.java:28)
at org.jruby.rack.RackFilter.doFilter(RackFilter.java:58)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:224)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:169)
at
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:168)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:100)
at
org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:929)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:405)
at
org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:964)
at
org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:515)
at
org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:304)
at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
at java.lang.Thread.run(Thread.java:722)
Caused by: org.jruby.exceptions.RaiseException: (LoadError) no such file to
load -- bundler/setup
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email