よくあるエラー

実行時のエラー

Indexがない

com.google.appengine.api.datastore.DatastoreNeedIndexException: The index for this query is not ready to serve. See the Datastore Indexes page in the Admin Console.

こういうエラーが出た場合、datastore-indexes.xmlをWEB-INFに作成する必要があります。
親切にも、作成するべきdatastore-indexはエラーの下に出ていたり、あるいはappengine-generatedのフォルダーにdatastore-indexes-auto.xmlができています。

Deploy時のエラー

datastore-indexes.xmlがおかしい


An internal error occurred during: "Deploying FaceItems to Google".
XML error validating C:\Users\aki\workspace\FaceItems\war\WEB-INF\datastore-indexes.xml against C:\eclipse\plugins\com.google.appengine.eclipse.sdkbundle_1.7.0\appengine-java-sdk-1.7.0\docs\datastore-indexes.xsd

datastore-indexes-auto.xmlをリネームしただけだと、エラーが出る場合があります。
その場合、XMLの先頭に <?xml version="1.0" encoding="utf-8"?> をつけたり、
datastore-indexesタグにautoGenerate="true"をつけるといいでしょう。

<?xml version="1.0" encoding="utf-8"?>
<datastore-indexes autoGenerate="true">
   
</datastore-indexes>

Comments