Hello,

I have a very simple web application which retrieves objets from the
datastore with the following query:

select from " + Entry.class.getName();

Entry is the persistence capable class, full body off which is given
at the end of this mail. My application works fine on the hosted mode,
and on 127.0.0.1:8080. But when I deploy the application, I get the
following error in the server logs (shortened for clarity):

com.google.appengine.api.datastore.DatastoreNeedIndexException: no
matching index found.

If I try to manually add an index to the datastore-indexes.xml file,
then the deploy fails saying that this index was not necessary and
cannot be created. I can see that new entries are being added to the
datastore via the application but getting them raises this exception.

Can someone with experience with indexes on GAE help me understand why
the indexes are not autogenerated for this simople query?

package com.sudancevap.app.server;

import java.util.Date;

import javax.jdo.annotations.IdGeneratorStrategy;
import javax.jdo.annotations.IdentityType;
import javax.jdo.annotations.PersistenceCapable;
import javax.jdo.annotations.Persistent;
import javax.jdo.annotations.PrimaryKey;

@PersistenceCapable(identityType = IdentityType.APPLICATION)
public class Entry {

  @PrimaryKey
  @Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
  private Long id;

  @Persistent
  private Date date;

  @Persistent
  private String content;

  public Entry(String entryText) {
    this.content = entryText;
  }

  // getters, setters for private fields
}

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to google-appengine@googlegroups.com
To unsubscribe from this group, send email to 
google-appengine+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to