kares / jruby-rack-worker

Thread-ed Background Workers on top of JRuby::Rack
Apache License 2.0
53 stars 15 forks source link

Errors when upgrading to warbler 1.4.2 #15

Closed amalagaura closed 10 years ago

amalagaura commented 10 years ago

I upgraded to warbler 1.4.2 from 1.4.0 and I am getting this:

SEVERE: Error configuring application listener of class org.kares.jruby.rack.WorkerContextListener java.lang.ClassNotFoundException: org.kares.jruby.rack.WorkerContextListener

I check the .war file and it does have jruby-rack-worker in the gem directory with the jar and the code to load the jar. I don't see anything obvious.

kares commented 10 years ago

how WEB-INF/lib the .jar is no longer there right?

amalagaura commented 10 years ago

Correct, there is no jruby-rack-worker.jar in 1.4.2 WEB-INF/lib. It only has jruby-core-complete-1.7.11.jar jruby-rack-1.1.14.jar jruby-stdlib-complete-1.7.11.jar

This is a huge change. I don't know how this is done in a point version, seems like a big breaking change. They have left everything to WEB-INF/gems/gems which does look the same in both versions.

In 1.4.0 every single gem has a jar file in that WEB-INF/lib, for jruby-rack-worker it is called: gems-gems-jruby-rack-worker~ruby-rack-worker_0.10.0.jar

amalagaura commented 10 years ago

Looks like they have something in config.rb regarding this

If set to true, moves jar files into WEB-INF/lib. Prior to version 1.4.2 of Warbler this was done

by default. But since 1.4.2 this config defaults to false. It may need to be set to true for

web servers that do not explode the WAR file.

config.move_jars_to_webinf_lib = false

Setting it to true now and it does work. Is this a workaround or should this be the method we use with jruby-rack-worker?

Anyway thank you for pointing me to WEB-INF/lib

This is the discussion https://github.com/jruby/warbler/issues/242

kares commented 10 years ago

yes, I actually asked for that setting ... for .jars that the web app needs to see e.g. listener declared (in case of jruby-rack-worker) it simply won't work without the setting, discussion happened at https://github.com/jruby/warbler/pull/241

kares commented 10 years ago

updated README + Warbler 1.4.4 will have support for selectively choosing which files to include. thanks