Digital Marketing

How to fix com.google.appengine.api.datastore.DatastoreNeedIndexException in Google App Engine

If you encounter the following error on your Google App Engine web app:

Error: Server Error

The server encountered an error and could not complete your request.
Please try again in 30 seconds.

And in the app log:

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.The suggested index for this query is:    <datastore-index kind="Greeting" ancestor="true" source="manual">        <property name="date" direction="desc"/>    </datastore-index>
To fix it:

Put the index in your datastore-indexes.xml file located in your WEB-INF directory. The full xml file would look like:

<?xml version="1.0" encoding="utf-8"?>
<datastore-indexes autoGenerate="true">
<datastore-index kind="Greeting" ancestor="true" source="manual">
<property name="date" direction="desc"/>
</datastore-index>
</datastore-indexes>



Comments

Popular posts from this blog

Make online money from the Internet