Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Can't load class files in WARs compiled by warbler using jruby 1.7.0.preview1 #108

Open
kares opened this Issue · 0 comments

1 participant

Karol Bucek
Karol Bucek
Collaborator

Previously reported at jruby/jruby-rack#111 by @sanelson2000 copied description :

This was initially filed as a bug with JRuby, and I was told to re-file it here.

https://jira.codehaus.org/browse/JRUBY-6731

When trying to load classfiles generated by warbler I am getting the error below. The application loads fine if it is not compiled. It also was working in JRuby 1.6.7.2. I was able to duplicate this issue on both Windows and Linux.

The app will load properly if I change all of the .rb files from:
require FILE.sub(/.rb$/, '.class')
to:
load FILE.sub(/.rb$/, '.class')

The exception being thrown is:

Jun 15, 2012 11:28:14 AM org.apache.catalina.core.ApplicationContext log
SEVERE: Error: application initialization failed
org.jruby.rack.RackInitializationException: unable to create shared application instance
at org.jruby.rack.SharedRackApplicationFactory.init(SharedRackApplicationFactory.java:44)
at org.jruby.rack.RackServletContextListener.contextInitialized(RackServletContextListener.java:48)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4779)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5273)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1566)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1556)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
at java.util.concurrent.FutureTask.run(FutureTask.java:166)
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.rack.RackInitializationException: no such file to load – C:/myapp/apps/apache-tomcat/webapps/../../../webapps/myapp/WEB-INF/config/boot.class
from org/jruby/RubyKernel.java:982:in `require'
from C:/myapp/apps/apache-tomcat/webapps/../../../webapps/myapp/WEB-INF/config/boot.rb:1:in `(root)'
from org/jruby/RubyKernel.java:982:in `require'
from file:/C:/myapp/webapps/myapp/WEB-INF/lib/gems-gems-jruby-rack-1.1.6-lib-jruby-rack-1.1.6.jar!/jruby/rack/rails/environment3.rb:1:in `(root)'
from file:/C:/myapp/webapps/myapp/WEB-INF/lib/gems-gems-jruby-rack-1.1.6-lib-jruby-rack-1.1.6.jar!/jruby/rack/rails/environment3.rb:21:in `load_environment'
from file:/C:/myapp/webapps/myapp/WEB-INF/lib/gems-gems-jruby-rack-1.1.6-lib-jruby-rack-1.1.6.jar!/jruby/rack/rails_booter.rb:65:in `load_environment'
at org.jruby.rack.DefaultRackApplicationFactory$4.init(DefaultRackApplicationFactory.java:218)
at org.jruby.rack.DefaultRackApplicationFactory.getApplication(DefaultRackApplicationFactory.java:58)
at org.jruby.rack.SharedRackApplicationFactory.init(SharedRackApplicationFactory.java:32)
... 11 more
Caused by: org.jruby.exceptions.RaiseException: (LoadError) no such file to load – C:/myapp/apps/apache-tomcat/webapps/../../../webapps/myapp/WEB-INF/config/boot.class
at org.jruby.RubyKernel.require(org/jruby/RubyKernel.java:982)
at RUBY.(root)(C:/myapp/apps/apache-tomcat/webapps/../../../webapps/myapp/WEB-INF/config/boot.rb:1)
at org.jruby.RubyKernel.require(org/jruby/RubyKernel.java:982)
at RUBY.(root)(file:/C:/myapp/webapps/myapp/WEB-INF/lib/gems-gems-jruby-rack-1.1.6-lib-jruby-rack-1.1.6.jar!/jruby/rack/rails/environment3.rb:1)
at RUBY.load_environment(file:/C:/myapp/webapps/myapp/WEB-INF/lib/gems-gems-jruby-rack-1.1.6-lib-jruby-rack-1.1.6.jar!/jruby/rack/rails/environment3.rb:21)
at RUBY.load_environment(file:/C:/myapp/webapps/myapp/WEB-INF/lib/gems-gems-jruby-rack-1.1.6-lib-jruby-rack-1.1.6.jar!/jruby/rack/rails_booter.rb:65)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.