New bie question: import com.google.appengine cannot be resolved

768 views
Skip to first unread message

vijay garg

unread,
May 8, 2009, 6:04:32 PM5/8/09
to Google-We...@googlegroups.com, google-a...@googlegroups.com
Hi,

I am using GWT+ Appengine for building a simple web application and got stuck with a error.

I am using JDO to save some objects in datastore, I have a created a service which returns a field of persistent class which is of type  com.google.appengine.api.datastore.Key, i am calling this service from my main .java file and hence imported the required path. When running the application I got error as

Line 6: The import com.google.appengine cannot be resolved

The path com.google.appengine was auto completed and also it was not showing any error for files under .server package, the error are only for files under .client package.
I think I am missing something very basic here. Is there any restriction that I cannot import appengine packages in .client package?

Please let me know if my problem is not clear.

Regards,
Vijay

Jason (Google)

unread,
May 11, 2009, 2:33:52 PM5/11/09
to google-a...@googlegroups.com, Google-We...@googlegroups.com
Hi Vijay. I believe the issue here is that the GWT compiler cannot find the source code for the Key class, as detailed in the post at http://fredsa.allen-sauer.com/2009/04/1st-look-at-app-engine-using-jdo.html.

You should be able to follow the steps in that post, stubbing out the Key class, to get your application working.

- Jason

vijay garg

unread,
May 15, 2009, 2:17:50 AM5/15/09
to google-a...@googlegroups.com, Google-We...@googlegroups.com
Thanks Jason,
As also pointed out by Shawn that we cannot simply use Key in client code we need write a super class instead.
So now i have changed my implementation to use Long instead of key.
Reply all
Reply to author
Forward
0 new messages