关于:java.lang.VerifyError: Expecting a stackmap frame at branch target

背景:

java源代码是用jdk1.6下开发的,后来mac上安装了jdk1.7就赖的换回去了。结果用ant编译代码没有问题,但在tomcat7下不能运行。


报错:

java.lang.VerifyError: Expecting a stackmap frame at branch target 64
Exception Details:
  Location:
    org/apache/roller/weblogger/pojos/TaskLock.()V @55: ifnull
  Reason:
    Expected stackmap frame at this location.
  Bytecode:
    0000000: 1401 b1b3 01b4 1006 bd00 7359 0312 9653
    0000010: 5904 1297 5359 0512 9853 5906 1299 5359
    0000020: 0712 9a53 5908 129b 53b3 009d 1006 bd00
    0000030: 9f59 0300 b200 b3c6 0009 b200 b3a7 000c
    0000040: 12b5 b800 b759 b300 b300 5359 0400 b200
    0000050: b3c6 0009 b200 b3a7 000c 12b5 b800 b759
    0000060: b300 b300 5359 0500 b200 bac6 0009 b200
    0000070: baa7 000c 12bc b800 b759 b300 ba00 5359
    0000080: 0600 b200 b3c6 0009 b200 b3a7 000c 12b5
    0000090: b800 b759 b300 b300 5359 0700 b200 bac6
    00000a0: 0009 b200 baa7 000c 12bc b800 b759 b300
    00000b0: ba00 5359 0800 b200 c153 b300 c310 06bc
    00000c0: 0859 0310 1a54 5904 101a 5459 0510 1a54
    00000d0: 5906 101a 5459 0710 1a54 5908 101a 54b3
    00000e0: 00c5 00b2 00c8 c600 09b2 00c8 a700 0c12
    00000f0: cab8 00b7 59b3 00c8 00b2 009d b200 c3b2
    0000100: 00c5 b200 cc12 cebb 001a 59b7 00cf b800
    0000110: d5b1                          


解决方法:

在eclipse中给jdk设置参数:-XX:-UseSplitVerifier

Preferences》Java》Installed JREs》双击选择的jdk,在弹出对话框的Default vm arguments输入:-XX:-UseSplitVerifier


如果是LINUX
修改catalina.sh 加上
JAVA_OPTS= -XX:-UseSplitVerifier

windows:

修改catalina.bat

set JAVA_OPTS= -XX:-UseSplitVerifier


参考:http://blog.csdn.net/dingxy/article/details/8707367


你可能感兴趣的:(VerifyError,Expecting,a,stackmap)