I have an app that is successfully uploading content to a server on Google´s App Engine. What I wanna do now, is retrieve that content using a DataStore constructed like this:
DatastoreService datastore = DatastoreServiceFactory.getDatastoreService();
Whenever I call that line, I get the following error:
09-05 11:21:37.922: E/AndroidRuntime(27138): FATAL EXCEPTION: AsyncTask #2
Caused by: java.lang.NoClassDefFoundError:
com.google.appengine.api.datastore.DatastoreServiceFactory
I´m unsure at the moment if the problem lies on the application itself, or on the AppEngine. I have already tried to add some suggested JARs to my buildpath, for example appengine-agent.jar and appengineagentimpl.jar without success.
I would deeply appreciate any inputs on this. Thanks!
Note that DatastoreServiceFactory is only available on the server-side. If that's the case, then you need to add required jars to your war/WEB-INF/lib/ folder. It's not enough to have them on your buildpath.
If you use Eclipse, click on the Problems tab. You may see a warning saying that this jar is not available on a server. Right click on this warning, select QuickFix, select "Copy..." option. Or copy this jar to this directory manually.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.