Got it! Kindly ignore this. There was some other part of code which was failing. In the class Contacts I hadn't wrote a primary key.
But I have another problem. I am storing keys as Long, but when I retrieve those keys by calling getKey() they come back as String. My code is giving the following error. java.lang.Long cannot be cast to java.lang.String I am not sure which part of code is giving the error but I suppose that the "Long" key is coming back as a String -- 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.