简体   繁体   English

从eclipse运行Google App时,为什么会出现以下错误?

[英]Why am I getting the following error when running Google App from eclipse?

I did a search and found QuickTip: VerifyError with jdk 7 : 我做了一个搜索,发现了QuickTip:VerifyError with jdk 7

If you are struggling with the following kind of error 如果您正在努力解决以下类型的错误

java.lang.VerifyError: Expecting a stackmap frame at branch target 6 bla bla bla …

then a simple solution is to add the following default JVM argument -XX:-UseSplitVerifier 那么一个简单的解决方案是添加以下默认JVM参数-XX:-UseSplitVerifier

If you are doing it in eclipse, like i was, then goto Window -> Preferences -> Installed JREs -> and add the default parameter. 如果你在eclipse中这样做,就像我一样,那么转到Window - > Preferences - > Installed JREs - >并添加默认参数。

What does this setting do? 这个设置有什么作用? Oracle just mentions that it a new type checker with StackMapTable attributes. Oracle 刚刚提到它是一个带有StackMapTable属性的新类型检查器。 Huh! 咦! Enjoy! 请享用! It is Oracle now. 现在是Oracle。

However, when I go to the Installed JREs settings it says An error has occurred when creating this preference page 但是,当我转到已安装的JRE设置时,它表示An error has occurred when creating this preference page

I started learning about Google App Engine and began with Google's CodeLabEx0, and I think it worked out fine because I saw on my browser what I was supposed to see. 我开始学习Google App Engine并开始使用Google的CodeLabEx0,我觉得它很好,因为我在浏览器上看到了我应该看到的内容。 But when I moved on to the second chapter CodeLabEx1, there's an error that won't allow me to create any products or items through the browser interface. 但是当我转到第二章CodeLabEx1时,出现了一个错误,它不允许我通过浏览器界面创建任何产品或项目。 Then I looked at the eclipse console and saw this: 然后我看着eclipse控制台看到了这个:

Oct 28, 2011 11:40:30 PM com.google.apphosting.utils.jetty.JettyLogger info
INFO: Logging to JettyLogger(null) via com.google.apphosting.utils.jetty.JettyLogger
Oct 28, 2011 11:40:31 PM com.google.apphosting.utils.config.AppEngineWebXmlReader readAppEngineWebXml
INFO: Successfully processed C:\Users\rock84\Downloads\CodeLabEx1\CodeLabEx1\war\WEB-INF/appengine-web.xml
Oct 28, 2011 11:40:31 PM com.google.apphosting.utils.config.AbstractConfigXmlReader readConfigXml
INFO: Successfully processed C:\Users\rock84\Downloads\CodeLabEx1\CodeLabEx1\war\WEB-INF/web.xml
Oct 28, 2011 4:40:31 PM com.google.appengine.tools.development.DevAppServerImpl start
INFO: The server is running at http://localhost:8888/
Oct 28, 2011 11:40:59 PM com.google.apphosting.utils.jetty.JettyLogger warn
WARNING: Error for /product
java.lang.VerifyError: Expecting a stackmap frame at branch target 48 in method com.google.appengine.codelab.ProductServlet.doPut(Ljavax/servlet/http/HttpServletRequest;Ljavax/servlet/http/HttpServletResponse;)V at offset 38
    at java.lang.Class.getDeclaredConstructors0(Native Method)
    at java.lang.Class.privateGetDeclaredConstructors(Unknown Source)
    at java.lang.Class.getConstructor0(Unknown Source)
    at java.lang.Class.newInstance0(Unknown Source)
    at java.lang.Class.newInstance(Unknown Source)
    at org.mortbay.jetty.servlet.Holder.newInstance(Holder.java:153)
    at org.mortbay.jetty.servlet.ServletHolder.initServlet(ServletHolder.java:428)
    at org.mortbay.jetty.servlet.ServletHolder.getServlet(ServletHolder.java:339)
    at org.mortbay.jetty.servlet.ServletHolder.handle(ServletHolder.java:487)
    at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1166)
    at com.google.appengine.tools.development.HeaderVerificationFilter.doFilter(HeaderVerificationFilter.java:35)
    at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
    at com.google.appengine.api.blobstore.dev.ServeBlobFilter.doFilter(ServeBlobFilter.java:58)
    at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
    at com.google.apphosting.utils.servlet.TransactionCleanupFilter.doFilter(TransactionCleanupFilter.java:43)
    at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
    at com.google.appengine.tools.development.StaticFileFilter.doFilter(StaticFileFilter.java:122)
    at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
    at com.google.appengine.tools.development.BackendServersFilter.doFilter(BackendServersFilter.java:97)
    at org.mortbay.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1157)
    at org.mortbay.jetty.servlet.ServletHandler.handle(ServletHandler.java:388)
    at org.mortbay.jetty.security.SecurityHandler.handle(SecurityHandler.java:216)
    at org.mortbay.jetty.servlet.SessionHandler.handle(SessionHandler.java:182)
    at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:765)
    at org.mortbay.jetty.webapp.WebAppContext.handle(WebAppContext.java:418)
    at com.google.apphosting.utils.jetty.DevAppEngineWebAppContext.handle(DevAppEngineWebAppContext.java:70)
    at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
    at com.google.appengine.tools.development.JettyContainerService$ApiProxyHandler.handle(JettyContainerService.java:351)
    at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:152)
    at org.mortbay.jetty.Server.handle(Server.java:326)
    at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:542)
    at org.mortbay.jetty.HttpConnection$RequestHandler.headerComplete(HttpConnection.java:923)
    at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:547)
    at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:212)
    at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:404)
    at org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:409)
    at org.mortbay.thread.QueuedThreadPool$PoolThread.run(QueuedThreadPool.java:582)

I have no idea what this could be. 我不知道这可能是什么。 This is a fresh install of Eclipse 3.7 with the following installed software: 这是Eclipse 3.7的全新安装,包含以下安装的软件:

  • Eclipse IDE for Java Developers 适用于Java开发人员的Eclipse IDE
  • Google App Engine Java SDK 1.5.5 Google App Engine Java SDK 1.5.5
  • Gooogle Plugin for Eclipse 3.7 适用于Eclipse 3.7的Gooogle插件
  • Google Web Toolkit SDK 2.4.0 Google Web Toolkit SDK 2.4.0

I'm on Windows 7 64-bit with Java version 1.7.0 我使用Java版本1.7.0的Windows 7 64位

Ok, I found the solution. 好的,我找到了解决方案。 It's what I wrote at the very top. 这是我在最顶层写的。 Turns out I was adding the argument to the wrong eclipse installation. 事实证明我是在错误的eclipse安装中添加了参数。 It works now. 它现在有效。

"If you are struggling with the following kind of error java.lang.VerifyError: Expecting a stackmap frame at branch target 6 bla bla bla …. then a simple solution is to add the following default JVM argument -XX:-UseSplitVerifier If you are doing it in eclipse, like i was, then goto Window -> Preferences -> Installed JREs -> and add the default parameter. What does this setting do? Oracle just mentions that it a new type checker with StackMapTable attributes. Huh! Enjoy! It is Oracle now." “如果你正在努力解决以下类型的错误:java.lang.VerifyError:期望在分支目标6 bla bla bla ...的堆栈图框架。然后一个简单的解决方案是添加以下默认JVM参数-XX:-UseSplitVerifier如果你是在eclipse中执行它,就像我一样,然后转到Window - > Preferences - > Installed JREs - >并添加默认参数。这个设置有什么作用?Oracle只是提到它是一个带有StackMapTable属性的新类型检查器。嗯!享受!现在是甲骨文。“ Thanks to this dude: http://vikashazrati.wordpress.com/2011/10/09/quicktip-verifyerror-with-jdk-7/ 感谢这位老兄: http//vikashazrati.wordpress.com/2011/10/09/quicktip-verifyerror-with-jdk-7/

This is also possible by changing your run configuration: Run > Run configurations 通过更改运行配置也可以这样做:运行>运行配置

Pick your Web Application project from the left, open the Arguments tab and add the -XX:-UseSplitVerifier argument to the VM arguments. 从左侧选择Web应用程序项目,打开Arguments选项卡并将-XX:-UseSplitVerifier参数添加到VM参数。

The benefits of this approach is also its downside: it only applies to this project, instead of an entire VM installation. 这种方法的好处也是它的缺点:它只适用于这个项目,而不是整个VM安装。

我在GAE中部署我的GWT应用程序时遇到了类似的问题,我正在使用JDK 7.将项目切换到JDK 6解决了这个问题(我忘记了此时只有JDK支持JDK 5和6)。

暂无
暂无

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

相关问题 运行我的应用程序时,我在运行时收到以下错误:java.lang.NoSuchMethodError: No virtual method setTokenProvider - I am getting the following error during runtime when running my app: java.lang.NoSuchMethodError: No virtual method setTokenProvider 为什么在运行JXTA应用程序时出现此异常? - Why I am getting this exception when running a JXTA app? 当我在eclipse上借助appium运行程序时,出现会话未创建错误 - When I am running program with the help of appium on eclipse i am getting session not created error 我正在尝试编写Google Map应用程序代码,但是即使安装了Google Play商店服务后,我也收到以下错误消息: - I am trying to write a google map app code, but even after installing the google play store services i am getting the following error: 为什么在运行应用程序时出现此错误? - Why am I getting this error when I run my app? 运行Eclipse时,我在运行代码后在控制台中收到错误 - When running Eclipse, I am getting a error in console after running the code 为什么在通过eclipse运行/调试TomCat时会收到ClassNotFoundException - Why am I getting ClassNotFoundException when running/debugging with TomCat through eclipse 可以告诉我为什么我尝试在地图中添加浮点数时出现以下错误,即使我的浮点数是从Number继承的 - Could any on tell why am I getting following error when I am trying to add float number in the map even though my float is inherited from Number 为什么我在 Cloud Firestore (24.1.2) 中出现内部错误。 仅在运行浓缩咖啡测试时在我的 Android 应用中? - Why am I getting Internal error in Cloud Firestore (24.1.2). In my Android app only when running an espresso test? 以下Java程序的输出是什么? 以及为什么我会出错 - What will be the output of following Java program? And why I am getting error
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM