I'm hoping this isn't a warbler-based bug, but given the stack trace, I'm assuming it has more to do with the JRuby 1.7.5 compiler.
Under 1.7.4 bundle exec warble jar:clean gemjar compiled runnable jar will create a properly runnable jar file.
bundle exec warble jar:clean gemjar compiled runnable jar
Under 1.7.5, a jar-file will be created, but upon running it, the following exception will be raised:
-> % java -jar smb-full.jar -T
Exception in thread "main" java.lang.ClassFormatError: Extra bytes at the end of class file JarMain
at java.lang.ClassLoader.defineClass1(Native Method)
at java.security.AccessController.doPrivileged(Native Method)
Looks like this issue might be the underlying reason for the exception.
-> % java -version
java version "1.7.0_40"
OpenJDK Runtime Environment (IcedTea 2.4.1) (suse-8.18.1-x86_64)
OpenJDK 64-Bit Server VM (build 24.0-b50, mixed mode)
Damn, I saw this issue once recently and can't remember what caused it. I'll investigate.
If there's anything you need help with in terms of hunting it down, find me on the IRC channel, I'll be around :)
If you can provide simple steps to build an app this way (I have not used this feature of warbler in a long time) I can try to reproduce here.
I did find a couple other JRuby issues indicating that conflicts with certain versions of the ASM bytecode library could be to blame.
Also this: jruby/warbler#196
And this one claims to fix the problem in warbler: jruby/warbler#197
@headius Unfortunately, besides giving you access to a proprietary codebase, I can't really reproduce this This does occur on 1.7.6 as well as 1.7.5 though
I'll try to run warbler from HEAD to see if it generates a good jar file.
As far as I can tell, this has been corrected as of warbler in 1.4.0 which was recently released.