java.lang.VerifyError: Expecting a stackmap frame at branch target JDK 1.7

来源:互联网 发布:域名服务器ip 编辑:程序博客网 时间:2024/05/29 18:36


我在实战spring配置loadtime weaver的时候,报了此次错误。

此问题在stackoverFlow上找到了答案,先把原文贴出来再简要的解释下。


原因:大意是jdk7,java验证更严格了,所以报错。(无心研究jdk代码)

解决办法:

第一种:

…………用jdk6

好吧,当我没说过。


第二种: 

在eclipse  选择   Windows -> Preferences -> Installed JREs. 

然后选择默认的jre环境,点击edit,在Default Vm argument 填写一个参数。

如果是jdk7:请填写:-XX:-UseSplitVerifier

如果是jdk8:请填写:-noverify

我的为jdk8,所以设置如下


第三种:和第二种一个性质。只是把jvm运行参数不配置为默认参数,而是在每个run configuration 里配置,具体看下面截图。






stackoverflow 检索到的解决办法:(很多问题这里都有答案)

Right now, when I try to persist an object in Google App Engine, I’m facing the error “Java.lang.VerifyError: Expecting a stackmap frame at branch target“. I’m using JDK 7 and it seems like the problem lies with this JDK.

After googling a bit, I found that there seems to be two solutions to fix this problem.

Solution 1: Change to JDK 6

As simple as is, change your JDK to version 6 and you won’t be bugged by this exception anymore. Well, in my case, I have to use JDK 7. So, moving on to the solution 2.

Solution 2: Configure JVM

Go to Windows -> Preferences -> Installed JREs. Select the default JVM and click edit. Then add this parameter as VM argument “-XX:-UseSplitVerifier” as seen below.


As a workaround you can add -noverify to the JVM arguments in order to disable verification. In Java 7 it was also possible to use -XX:-UseSplitVerifier to use the less strict verification method, but that option was removed in Java 8.






0 0