gpt4 book ai didi

java - ClassCastException :com. google.appengine.tools.development.ApiProxyLocalImpl 无法转换为 com.google.appengine.tools.development.ApiProxyLocal

转载 作者:塔克拉玛干 更新时间:2023-11-03 04:08:33 25 4
gpt4 key购买 nike

我是开发 Maven 应用程序并部署到谷歌应用引擎的新手。我正在使用 appengine 1.9.0eclipse kepler 4.3

然而,当我尝试运行时,我得到了一个错误,根据这个 blog克里斯,它建议删除这个 jar 。

appengine-api-labs 
appengine-api-stubs
appengine-testing

我已经在库中删除了它并尝试了 maven clean 但错误仍然出现。下面是我的图书馆。

libraries

下面是完整的控制台错误:

WARNING: failed _ah_ServeBlobFilter: java.lang.ClassCastException: com.google.appengine.tools.development.ApiProxyLocalImpl cannot be cast to com.google.appengine.tools.development.ApiProxyLocal
3 20, 2014 2:34:57 午前 com.google.apphosting.utils.jetty.JettyLogger warn
WARNING: Failed startup of context com.google.appengine.tools.development.DevAppEngineWebAppContext@87ec13{/,C:\Users\Annette\Desktop\WebCaller\src\main\webapp}
java.lang.ClassCastException: com.google.appengine.tools.development.ApiProxyLocalImpl cannot be cast to com.google.appengine.tools.development.ApiProxyLocal
at com.google.appengine.api.blobstore.dev.ServeBlobFilter.init(ServeBlobFilter.java:55)
at org.mortbay.jetty.servlet.FilterHolder.doStart(FilterHolder.java:97)
at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
at org.mortbay.jetty.servlet.ServletHandler.initialize(ServletHandler.java:662)
at org.mortbay.jetty.servlet.Context.startContext(Context.java:140)
at org.mortbay.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1250)
at org.mortbay.jetty.handler.ContextHandler.doStart(ContextHandler.java:517)
at org.mortbay.jetty.webapp.WebAppContext.doStart(WebAppContext.java:467)
at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
at org.mortbay.jetty.handler.HandlerWrapper.doStart(HandlerWrapper.java:130)
at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
at org.mortbay.jetty.handler.HandlerWrapper.doStart(HandlerWrapper.java:130)
at org.mortbay.jetty.Server.doStart(Server.java:224)
at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
at com.google.appengine.tools.development.JettyContainerService.startContainer(JettyContainerService.java:250)
at com.google.appengine.tools.development.AbstractContainerService.startup(AbstractContainerService.java:305)
at com.google.appengine.tools.development.AutomaticInstanceHolder.startUp(AutomaticInstanceHolder.java:26)
at com.google.appengine.tools.development.AbstractModule.startup(AbstractModule.java:79)
at com.google.appengine.tools.development.Modules.startup(Modules.java:97)
at com.google.appengine.tools.development.DevAppServerImpl.doStart(DevAppServerImpl.java:255)
at com.google.appengine.tools.development.DevAppServerImpl.access$000(DevAppServerImpl.java:47)
at com.google.appengine.tools.development.DevAppServerImpl$1.run(DevAppServerImpl.java:213)
at com.google.appengine.tools.development.DevAppServerImpl$1.run(DevAppServerImpl.java:211)
at java.security.AccessController.doPrivileged(Native Method)
at com.google.appengine.tools.development.DevAppServerImpl.start(DevAppServerImpl.java:211)
at com.google.appengine.tools.development.DevAppServerMain$StartAction.apply(DevAppServerMain.java:277)
at com.google.appengine.tools.util.Parser$ParseResult.applyArgs(Parser.java:48)
at com.google.appengine.tools.development.DevAppServerMain.run(DevAppServerMain.java:219)
at com.google.appengine.tools.development.DevAppServerMain.main(DevAppServerMain.java:210)

谁能指出来?谢谢。

最佳答案

我采取了以下步骤来解决这个问题:

  1. 删除 appengine-api-stubs 和 appengine-testing
  2. 在 Properties 和 Google > App Engine 上,我确保选择默认的“App Engine - 1.9.1”
  3. 在属性构建路径上,我删除了与 GAE v1.9.1 相关的所有 JAR,而是从“添加库”添加了 GAE 库

令人惊讶的是,即使我的 WEB-INF/lib 上有 appengine-api-labs,我的本地主机部署仍然有效。

最后,我的 WEB-INF/lib 包含以下内容:

  • appengine-agent.jar
  • appengine-agentimpl.jar
  • appengine-api-1.0-sdk-1.9.1.jar
  • appengine-api-labs-1.9.1.jar
  • appengine-api-labs.jar
  • appengine-endpoints-deps.jar
  • appengine-endpoints.jar
  • appengine-jsr107cache-1.9.1.jar

希望对您有所帮助。它对我有用,很可能对你也有用。

关于java - ClassCastException :com. google.appengine.tools.development.ApiProxyLocalImpl 无法转换为 com.google.appengine.tools.development.ApiProxyLocal,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22522426/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com