java.lang.VerifyError: Expecting a stackmap frame

后端 未结 4 1464
情话喂你
情话喂你 2020-11-30 02:13

Is there a way to load a custom HttpServlet to GAE? I uploaded a project that included an HttpServlet in the .server package and added it to the web.xml...

&         


        
相关标签:
4条回答
  • 2020-11-30 02:25

    GAE uses Java 1.6, but you've compiled the code with Java 1.7. You need to recompile with Java 1.6. As per the comments, you're using Eclipse; you can set the Java compiler level in Java > Compiler section of project's properties.

    enter image description here

    0 讨论(0)
  • 2020-11-30 02:28

    Using -XX:-UseSplitVerifier is a temporary solution. Now java uses the previous version of the bytecode verifier which tolerates this bad or missing stackmap frames. Java8 doesnt support this option.

    0 讨论(0)
  • 2020-11-30 02:34

    As BalusC pointed out, one solution to the problem is to just use JDK6.

    Another solution, if you want to stay with JDK7, would be to use "-XX:-UseSplitVerifier" as an argument for the VM. Go to

    Window → Preferences → Java → Installed JREs → Edit... → Default VM arguments

    and add it there.

    Installed JREs JRE Definition

    0 讨论(0)
  • 2020-11-30 02:41

    I could solve this issue by setting Eclipse Mars / Project properties / Java compiler :

    • Compiler compliance level to 1.7 (as I don't have 1.6 anymore)
    • Generated .class files compatibility : 1.6
    • Source compatibility : 1.6

    as I didn't have 1.7 specific code :-)

    Server Ubuntu + Tomcat 7.0.52 on JVM 1.7.0_85-b01 Dev Eclipse Mars on JDK 7u55

    0 讨论(0)
提交回复
热议问题