I'm getting the following error when testing my application on my
machine. I am using the datastoreservice APIs for storing data. I
have the <application> defined in appengine-web.xml and am getting
confirmation messages that those files are being read.
The code that I'm invoking is as such:
DatastoreService datastore =
DatastoreServiceFactory.getDatastoreService();
Transaction txn = datastore.beginTransaction();
try {
// create enough keys
KeyRange keys =
datastore.allocateIds(datatype.getDataTypeKey(),
recordList.size());
Evidence that the application id should be getting set:
May 9, 2010 3:32:44 AM
com.google.apphosting.utils.config.AppEngineWebXmlReader
readAppEngineWebXml
INFO: Successfully processed XXXXXXX\war\WEB-INF/appengine-web.xml
Actual error being received:
java.lang.IllegalArgumentException: appId not set
at
com.google.appengine.repackaged.com.google.common.base.Preconditions.checkArgument(Preconditions.java:
90)
at
com.google.appengine.api.datastore.dev.LocalDatastoreService.getOrCreateProfile(LocalDatastoreService.java:
1133)
at
com.google.appengine.api.datastore.dev.LocalDatastoreService.beginTransaction(LocalDatastoreService.java:
903)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:
39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:
25)
at java.lang.reflect.Method.invoke(Method.java:597)
at com.google.appengine.tools.development.ApiProxyLocalImpl
$AsyncApiCall.call(ApiProxyLocalImpl.java:307)
at com.google.appengine.tools.development.ApiProxyLocalImpl
$AsyncApiCall.call(ApiProxyLocalImpl.java:264)
at java.util.concurrent.Executors$PrivilegedCallable
$1.run(Executors.java:463)
at java.security.AccessController.doPrivileged(Native Method)
at java.util.concurrent.Executors
$PrivilegedCallable.call(Executors.java:460)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at java.util.concurrent.ThreadPoolExecutor
$Worker.runTask(ThreadPoolExecutor.java:885)
at java.util.concurrent.ThreadPoolExecutor
$Worker.run(ThreadPoolExecutor.java:907)
at java.lang.Thread.run(Thread.java:619)
Any help would be very much appreciated - I can't find anyone who has
run into this.
--
You received this message because you are subscribed to the Google Groups
"Google App Engine for Java" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/google-appengine-java?hl=en.