简体   繁体   English

java.lang.VerifyError:堆栈图框架不一致

[英]java.lang.VerifyError: Inconsistent stackmap frames

I am getting an error and I have absolutely no clue how to go to fix it. 我遇到了一个错误,而且我完全不知道如何去解决它。 Looking around stackoverflow it seems this error is related to either corrupt files or classes compiled in incompatible versions of Java. 环顾stackoverflow,似乎此错误与损坏的文件或在Java的不兼容版本中编译的类有关。 This is one of the questions I've been looking into: Causes of getting a java.lang.VerifyError 这是我一直在研究的问题之一: 出现java.lang.VerifyError的原因

WARNING: Error for /clearnlp
java.lang.VerifyError: Inconsistent stackmap frames at branch target 60
Exception Details:
  Location:
    edu/emory/clir/clearnlp/util/DSUtils.createStringHashMap(Ljava/io/InputStream;Ledu/emory/clir/clearnlp/util/CharTokenizer;Z)Ljava/util/Map; @60: aload_1
  Reason:
    Type top (current frame, locals[5]) is not assignable to 'java/lang/String' (stack map, locals[5])
  Current Frame:
    bci: @39
    flags: { }
    locals: { 'java/io/InputStream', 'edu/emory/clir/clearnlp/util/CharTokenizer', integer, 'java/io/BufferedReader', 'java/util/Map', top, 'java/lang/String' }
    stack: { integer }
  Stackmap Frame:
    bci: @60
    flags: { }
    locals: { 'java/io/InputStream', 'edu/emory/clir/clearnlp/util/CharTokenizer', integer, 'java/io/BufferedReader', 'java/util/Map', 'java/lang/String' }
    stack: { }
  Bytecode:
    0x0000000: bb00 5159 bb00 6f59 2ab7 0074 b700 774e
    0x0000010: bb00 8a59 0312 8c12 0b12 0db8 0013 b700
    0x0000020: 8d3a 04a7 0045 1c99 0015 1905 b600 323a
    0x0000030: 0519 05b6 0036 9900 06a7 002f 2b19 0503
    0x0000040: 1295 120b 120d b800 13b6 0099 3a06 1904
    0x0000050: 1906 0332 1906 0432 0312 9b12 0b12 0db8
    0x0000060: 0013 b900 9f03 0057 2db6 005c 593a 05c7
    0x0000070: ffb7 a700 0a3a 0719 07b6 0061 1904 b0  
  Exception Handler Table:
    bci [35, 114] => handler: 117
  Stackmap Table:
    full_frame(@38,{Object[#143],Object[#145],Integer,Object[#81],Object[#147],Top,Object[#40]},{})
    full_frame(@60,{Object[#143],Object[#145],Integer,Object[#81],Object[#147],Object[#40]},{})
    chop_frame(@104,1)
    same_locals_1_stack_item_frame(@117,Object[#71])
    same_frame(@124)

    at java.lang.Class.forName0(Native Method)
    at java.lang.Class.forName(Class.java:264)
    at com.google.appengine.tools.development.agent.runtime.RuntimeHelper.checkRestricted(RuntimeHelper.java:70)
    at com.google.appengine.tools.development.agent.runtime.Runtime.checkRestricted(Runtime.java:65)
    at edu.emory.clir.clearnlp.coreference.sieve.SpeakerIdentification.<init>(SpeakerIdentification.java:24)
    at edu.emory.clir.clearnlp.coreference.config.SieveSystemCongiuration.loadDefaultSieves(SieveSystemCongiuration.java:63)
    at edu.drexel.gameailab.ClearNLPServlet.doGet(ClearNLPServlet.java:66)
    at edu.drexel.gameailab.ClearNLPServlet.doPost(ClearNLPServlet.java:44)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
    at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:511)

In order to dismiss this kinds of errors, I've cleaned the project several times, deleted every single .class file I found. 为了消除此类错误,我对项目进行了多次清理,删除了发现的每个.class文件。 Updated all the dependencies (JARs) to the latest version and for the more obscure JARs I could not find new versions for I tracked the source code and I dumped it along my sources to ensure it's being compiled again by my JVM. 将所有依赖项(JAR)更新为最新版本,对于更晦涩的JAR,我找不到新版本,因为我跟踪了源代码,并随同我的源代码一起将其转储以确保它由JVM重新编译。

Regarding the setup, this is a web interface to the clearnlp parser project using servlets (Jetty) and the Google App Engine. 关于设置,这是使用servlet(Jetty)和Google App Engine到clearnlp解析器项目的Web界面。 I know there are some limitations on the GAE and I have already rewritten the file access parts that would be troublesome. 我知道GAE有一些限制,我已经重写了麻烦的文件访问部分。 I already went though the same process with the stanford corenlp and there were no issues once rewritten. 我已经通过斯坦福大学corenlp进行了相同的处理,并且一旦重写就没有任何问题。

The at edu.emory.clir.clearnlp.coreference.sieve.SpeakerIdentification.<init>(SpeakerIdentification.java:24) is initializing some collections: private final Set<String> firstPersonSingularPronouns = DSUtils.toHashSet("i", "me", "my", "mine"); at edu.emory.clir.clearnlp.coreference.sieve.SpeakerIdentification.<init>(SpeakerIdentification.java:24)正在初始化一些集合: private final Set<String> firstPersonSingularPronouns = DSUtils.toHashSet("i", "me", "my", "mine"); and below there is some source code from DSUtils.java: 下面是DSUtils.java的一些源代码:

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.lang.reflect.Field;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
import java.util.Collections;
import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.PriorityQueue;
import java.util.Random;
import java.util.Set;
import java.util.regex.Pattern;

import edu.emory.clir.clearnlp.collection.list.FloatArrayList;
import edu.emory.clir.clearnlp.collection.pair.DoubleIntPair;
import edu.emory.clir.clearnlp.collection.pair.Pair;

public class DSUtils
{
[...]

    @SuppressWarnings("unchecked")
    static public <T>Set<T> toHashSet(T... items)
    {
        Set<T> set = new HashSet<T>(items.length);
        for (T item : items) set.add(item);
        return set;
    }

Anyone has any pointer on what I should be looking at next? 有人对我接下来要看的内容有任何指示吗? Is GAE corrupting the class files? GAE是否破坏了类文件? How could I fix it? 我该如何解决? I don't have source code for com.google.appengine.tools.development.agent.runtime.RuntimeHelper.checkRestricted(RuntimeHelper.java:70) or com.google.appengine.tools.development.agent.runtime.Runtime.checkRestricted(Runtime.java:65) , those belong to the GAE SDK, I am currently in Release: 1.9.30. 我没有com.google.appengine.tools.development.agent.runtime.RuntimeHelper.checkRestricted(RuntimeHelper.java:70)com.google.appengine.tools.development.agent.runtime.Runtime.checkRestricted(Runtime.java:65)源代码com.google.appengine.tools.development.agent.runtime.Runtime.checkRestricted(Runtime.java:65) ,它们属于GAE SDK,我目前在Release:1.9.30中。 Not sure if relevant but I'm on OSX 10.11.2 using Apple's jdk1.8.0_60. 不知道是否相关,但是我正在使用Apple的jdk1.8.0_60在OSX 10.11.2上。

The problem is in the code generated for createStringHashmap method, and if you are using eclipse to compile your code, this could be a bug in the eclipse compiler because of which it is generating wrong byte code. 问题出在为createStringHashmap方法生成的代码中,如果您使用eclipse编译代码,则这可能是eclipse编译器中的错误,因为它生成了错误的字节码。 See if you can identify which portion of the code is causing the problem and file a bug with eclipse. 查看您是否可以确定导致问题的代码的哪一部分,并使用eclipse提交错误。 I would also recommend you try a more recent version of eclipse you aren't on one already. 我还建议您尝试使用尚未使用过的较新版本的Eclipse。

For 1.8 do the followings: 对于1.8,请执行以下操作:

  1. Windows -> Preferences -> Installed JRE. Windows->首选项->已安装的JRE。
  2. Select jdk/jre and select edit. 选择jdk / jre,然后选择编辑。
  3. In default VM arguments, give "-noverify " . 在默认的VM参数中,给“ -noverify”。 For 1.7 give " -XX:- UseSplitVerifier" 对于1.7,请输入“ -XX:-UseSplitVerifier”

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 java.lang.VerifyError:分支目标 421 处的堆栈映射帧不一致 - java.lang.VerifyError: Inconsistent stackmap frames at branch target 421 mockito-java.lang.VerifyError:分支目标处的堆栈图框架不一致 - mockito - java.lang.VerifyError: Inconsistent stackmap frames at branch target 未使用的局部变量Java 8 - java.lang.VerifyError:不一致的stackmap帧 - Unsed local variables Java 8 - java.lang.VerifyError: Inconsistent stackmap frames FacesContext.getCurrentInstance() 抛出 java.lang.VerifyError: Inconsistent stackmap frames at branch target exception - FacesContext.getCurrentInstance() throwing java.lang.VerifyError: Inconsistent stackmap frames at branch target exception java.lang.VerifyError:期望一个stackmap框架 - java.lang.VerifyError: Expecting a stackmap frame java.lang.VerifyError:期望分支目标上的stackmap帧 - java.lang.VerifyError: Expecting a stackmap frame at branch target java.lang.VerifyError:期望分支目标73处的堆栈图帧 - java.lang.VerifyError: Expecting a stackmap frame at branch target 73 java.lang.VerifyError:在分支目标29处期待一个堆栈映射框架 - java.lang.VerifyError: Expecting a stackmap frame at branch target 29 java.lang.VerifyError:在分支目标 5 处期望堆栈图帧 - java.lang.VerifyError: Expecting a stackmap frame at branch target 5 java.lang.VerifyError:堆栈形状不一致 - java.lang.VerifyError: Stack shape inconsistent
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM