-
Notifications
You must be signed in to change notification settings - Fork 201
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Using warbler with jbundler excludes JRuby #261
Comments
@hadronzoo next version of jbundler will use the "dependencies" from jruby itself to put it into the mix of jar dependencies to be resolved (more like "hard coding jar org.jruby:jruby into the Jarfile"). so warbler with jbundler will handle the jruby-jars differently. well, missing the whole jruby in the executable jar is quite a big miss ;) |
@mkristian When I include |
the executable jar starts up and run ruby code until it reaches objects from other java libraries. are those libraries part of the Jarfile ? what do you mean with import individual classes ? are just running "java -jar my.jar" ? sounds like classloader issue ;) |
Yes, all of the libraries are part of the Jarfile, I am running When executing the application with JRuby (not packaged as a standalone Jar), it runs without exception, thanks to jbundler downloading all of the required Jar dependencies. When packaged as a Jar, exceptions seem to occur because JRuby classes cannot be found—as if parts of the JRuby runtime are not imported. The other libraries will load and run without issue until they return something that appears to require JRuby reflection. Here's an example that occurs during a shutdown hook:
If I were to I'm wondering if including |
import_java will load these classes into the jruby-classloader which has so you telling that import_java helps, and the exception is EvalFailedException assuming an eval of some kind took place. you did play around with jbundler executable itself. did that work ? jruby-complete is indeed complete ;) maybe warbler removes the META-INF/jruby.home part but your remarks are On Thu, May 1, 2014 at 5:04 PM, Joshua Griffith notifications@github.comwrote:
|
I solved the issue. I was calling JRuby code within a Java shutdown hook, rather than using |
I'm having the same issue mentioned by @timuckun on the jruby-user mailing list. When using warbler with jbundler to create a standalone executable, the resulting JAR appears to be missing JRuby. Starting the JAR yields the error:
If I include
jruby-complete
in the jbundlerJarfile
, the application will run but periodically throwjava.lang.NoClassDefFoundError
exceptions, being unable to find JRuby classes likeorg/jruby/embed/variable/Argv
.Why would warbler be excluding JRuby from packaged JARs? @jkutner @mkristian
The text was updated successfully, but these errors were encountered: