2012-09-24 28 views
3

所以我有這樣的錯誤,我已經看到很多人有:App Engine的<threadsafe>元素缺失錯誤,

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> 

而且我仍然得到沒有找到線程安全元素的錯誤?

回答

1

我認爲<threadsafe>true</threadsafe>需要在你的AppEngine-web.xml中的第一個條目

這裏是我的xml withouth的錯誤:

<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> 
+0

感謝您的建議,但我不能確認這就是解。儘管我幾次刪除並重新輸入「啞元」部分後仍設法使其運行。現在,我的XML文件看起來就像它在問題中所做的一樣,但不再引發錯誤。 它仍然是一個謎... – Michiel