Working now,

Looks like I did have a library mismatch

allan

On Aug 19, 11:17 am, allan kelly <[email protected]> wrote:
> Hello,
> My app has grown to the point were I should really add some tests.  So
> I'm following the description given in the 
> Docs,http://code.google.com/appengine/docs/java/tools/localunittesting.html
>
> But, I'm having a couple of problems.
> At first I thought it was mismatched Jar versions but I can't find
> anything wrong there (all version 1.3.5) so I was wondering if anyone
> else has seen this?
>
> I've got the data store sample code from above, unwound a little so it
> looks like:
>
>  private void doTest() {
>         DatastoreService ds =
> DatastoreServiceFactory.getDatastoreService();
>         PreparedQuery pq = ds.prepare(new Query("yam"));
>         int count = pq.countEntities();
>
> First point: in the example there is a withLimit(10) on the
> countEntitites call, something seems to have changed here as
> countEntitites doesn't take any parameter.
> (http://code.google.com/appengine/docs/java/javadoc/com/google/
> appengine/api/datastore/PreparedQuery.html#countEntities%28%29)
>
> Has something changed here?
>
> Second, when the call to countEntities goes in it blows up, (stack
> trace below).  I'm getting a NoSuchMethodError against a call to
> DatastorePb$Query.hasEndCompiledCursor()
>
> Any suggestions?
>
> Thanks
>
> allan
>
> com.google.apphosting.api.ApiProxy$UnknownException: An error occurred
> for the API request datastore_v3.Count().
>         at com.google.appengine.tools.development.ApiProxyLocalImpl
> $AsyncApiCall.call(ApiProxyLocalImpl.java:316)
>         at com.google.appengine.tools.development.ApiProxyLocalImpl
> $AsyncApiCall.call(ApiProxyLocalImpl.java:262)
>         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:886)
>         at java.util.concurrent.ThreadPoolExecutor
> $Worker.run(ThreadPoolExecutor.java:908)
>         at java.lang.Thread.run(Thread.java:637)
> Caused by: java.lang.NoSuchMethodError:
> com.google.apphosting.api.DatastorePb$Query.hasEndCompiledCursor()Z
>         at
> com.google.appengine.api.datastore.dev.LocalDatastoreService.runQuery(Local 
> DatastoreService.java:
> 786)
>         at
> com.google.appengine.api.datastore.dev.LocalDatastoreService.count(LocalDat 
> astoreService.java:
> 886)
>         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>         at
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:
> 39)
>         at
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImp 
> l.java:
> 25)
>         at java.lang.reflect.Method.invoke(Method.java:597)
>         at com.google.appengine.tools.development.ApiProxyLocalImpl
> $AsyncApiCall.call(ApiProxyLocalImpl.java:305)
>         ... 9 more

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" 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?hl=en.

Reply via email to