xml - App Engine <threadsafe> 元素丢失错误

标签 xml google-app-engine error-handling thread-safety

所以我遇到了很多人都遇到过的错误:

appengine-web.xml does not contain a <threadsafe> element.

但始终提供的解决方案是添加

<threadsafe>true</threadsafe>

到 appengine-web.xml 文件。这是我的 appengine-web.xml 文件:

<?xml version="1.0" encoding="utf-8"?>
<appengine-web-app xmlns="http://appengine.google.com/ns/1.0">
  <application>dummy</application>
  <version>1</version>
  <threadsafe>true</threadsafe>
  <!-- Configure java.util.logging -->
  <system-properties>
    <property name="java.util.logging.config.file" value="WEB-INF/logging.properties"/>
  </system-properties>
</appengine-web-app>

我仍然收到没有找到线程安全元素的错误消息?

最佳答案

我认为<threadsafe>true</threadsafe>需要成为您的 appengine-web.xml 中的第一个条目

这是我没有错误的 xml:

<appengine-web-app xmlns="http://appengine.google.com/ns/1.0">
    <!--<async-session-persistence enabled="true"/>-->
    <threadsafe>true</threadsafe>
    <application>dummy</application>

    <version>443</version>
    <sessions-enabled>true</sessions-enabled>
    <inbound-services>
        <service>mail</service>
        <service>xmpp_message</service>
    </inbound-services>
    <system-properties>
      <property name="com.google.gdata.DisableCookieHandler" value="true"/>
    </system-properties>
</appengine-web-app>

关于xml - App Engine <threadsafe> 元素丢失错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12563587/

相关文章:

java - Google App Engine 中的配额控制

C++,在 CBuilder 2010 中传递参数时出现 ostream 错误

c++ - c++ 中的自定义(非异常)错误处理策略

java - 高枕无忧 3 + Jackson + Tomcat + XML 响应

r - 将数据与 R xml2 中的单个 XML 节点集隔离

android - 自定义ListView找不到按钮

python - 使用微服务运行 Google App Engine 应用程序

xml - 如何在 Scala 中计算 XML 文字标记名称?

google-app-engine - Google应用程序引擎的eclipse插件中的 "SDK Development Console"在哪里?

javascript - 一旦 promise 得到解决,如何在 catch 中传递错误?