com.google.appengine.api.datastore.Key can not be found in source packages?!

34 views
Skip to first unread message

Eric Atkinson

unread,
Jul 10, 2011, 3:34:54 PM7/10/11
to google-a...@googlegroups.com
I get the follwing compile error -- com.google.appengine.api.datastore.Key can not be found in source packages. Check the inheritance chain from your module; it may not be inheriting a required module or a module may not be adding its source path entries properly -- with the below code snippet.

What's wrong with this code? Why can't the compiler see com.google.appengine.api.datastore.Key. I assume by "inheritance chain" it means the build path and that includes com.google.appengine.api.datastore.Key in the app eng SDK, so why am I getting the above compile error in the following code:

package com.sis.app.shared;

import javax.jdo.annotations.PersistenceCapable;
import javax.jdo.annotations.Persistent;
import javax.jdo.annotations.IdGeneratorStrategy;
import javax.jdo.annotations.PrimaryKey;
import com.google.appengine.api.datastore.Key;


@SuppressWarnings("serial")
@PersistenceCapable
public class ModelMember implements Serializable {
    @PrimaryKey
    @Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
    private Key key;


Eric Atkinson

unread,
Jul 10, 2011, 3:54:42 PM7/10/11
to google-a...@googlegroups.com
This answer to this -- in the Eclispe IDE -- is to uncheck "build automatically" and then hit "build all", and then it can see it. Strange, but true.
Reply all
Reply to author
Forward
0 new messages