spring-projects / spring-loaded

Java agent that enables class reloading in a running JVM
Apache License 2.0
2.72k stars 515 forks source link

Tomcat8 + JDK8 - Exception in thread "main" java.lang.VerifyError #105

Open icougil opened 9 years ago

icougil commented 9 years ago

Hi!

I'm trying to use Spring-loaded in order to be able to reload class changes but I'm not able to launch the servlet container we are using (Tomcat 8). I'm using IntelliJ and I've made the changes to the server runtime in order to add the spring-loaded JAR to the startup VM options (we are using JDK 8) but it is impossible to launch it. The VM throws an exception when I add the reference to the VM arguments.

/.../tomcat/8.0.17/libexec/bin/catalina.sh run Java HotSpot(TM) 64-Bit Server VM warning: ignoring option PermSize=256m; support was removed in 8.0 Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=512m; support was removed in 8.0 objc[1996]: Class JavaLaunchHelper is implemented in both /Library/Java/JavaVirtualMachines/jdk1.8.0_31.jdk/Contents/Home/bin/java and /Library/Java/JavaVirtualMachines/jdk1.8.0_31.jdk/Contents/Home/jre/lib/libinstrument.dylib. One of the two will be used. Which one is undefined. [2015-02-20 04:15:17,995] Artifact WebApp:war exploded: Server is not connected. Deploy is not available. Exception in thread "main" java.lang.VerifyError: Expecting a stackmap frame at branch target 64 Exception Details: Location: org/apache/catalina/startup/Bootstrap.()V @37: ifnull Reason: Expected stackmap frame at this location. Bytecode: 0x0000000: 1202 b801 bbb3 0046 01b3 0159 1301 bdb8 0x0000010: 01c1 b301 8f13 01c3 b800 d54b 12cc b800 0x0000020: d54c 014d 2bc6 001b bb01 8159 2bb7 01c4 0x0000030: 4e2d b601 c74d a700 0a3a 042d b601 ca4d 0x0000040: 2cc7 0034 bb01 8159 2a13 01cc b701 cf4e 0x0000050: 2db6 01d2 9900 21bb 0181 592a 1301 d4b7 0x0000060: 01cf 3a04 1904 b601 c74d a700 0b3a 0519 0x0000070: 04b6 01ca 4d2c c700 1bbb 0181 592a b701 0x0000080: c44e 2db6 01c7 4da7 000a 3a04 2db6 01ca 0x0000090: 4d2c b301 7f12 ccb2 017f b601 84b8 01d8 0x00000a0: 5712 d1b8 00d5 4e2d c700 0cb2 017f b301 0x00000b0: 86a7 0025 bb01 8159 2db7 01c4 3a04 1904 0x00000c0: b601 c73a 04a7 000c 3a05 1904 b601 ca3a 0x00000d0: 0419 04b3 0186 12d1 b201 86b6 0184 b801 0x00000e0: d857 b1
Exception Handler Table: bci [49, 54] => handler: 57 bci [100, 106] => handler: 109 bci [130, 135] => handler: 138 bci [190, 197] => handler: 200 at java.lang.Class.getDeclaredMethods0(Native Method) at java.lang.Class.privateGetDeclaredMethods(Class.java:2693) at java.lang.Class.privateGetMethodRecursive(Class.java:3040) at java.lang.Class.getMethod0(Class.java:3010) at java.lang.Class.getMethod(Class.java:1776) at sun.launcher.LauncherHelper.validateMainClass(LauncherHelper.java:544) at sun.launcher.LauncherHelper.checkAndLoadMain(LauncherHelper.java:526) Disconnected from server`

Do you know what can we do?

Best regards,

lcs-felix commented 9 years ago

Hi!

I have had the same issue. I'm using Tomcat 8 and JDK 8. Can anyone help us?

thanks, and excuse my english.

AlexCzar commented 9 years ago

Can you post your command-line? Did you specify -noverify parameter?

fabwu commented 9 years ago

@lucas-felix I run into this issue too and add the -noverify parameter to the vm options. This should solve your problem.

Then I update to version 1.2.3 (it's currently not in the maven repo) and unfortunately I got this issue #106.