[appengine-java] calling blobstore from inside the webapp

2010-11-29 Thread Zsombor
Hello,

 I would like to modify the content of the BlobStore from inside my
webapp. I mean, the user uploads a picture into blobstore, after in
the background the app should create thumbnails, and stores that
thumbnails too in the BlobStore.
 I figured out, that from my 'servlet', I can call
BlobstoreServiceFactory.getBlobstoreService().createUploadUrl("/
internal/uploadBlob/"+id);
and to the acquired URL I can post the content - with proper multi-
part encoding. It works in the development mode, however in the live
system, it always fails with a generic server error message. I'm sure
that my code doesn't gets called - nothing refers to /internal/
uploadBlob/ in the request log. From the response headers, it seems
that the upload server responding :
{server=[Upload Server Built on Nov 11 2010 15:36:58 (1289518618)],
date=[Sun, 28 Nov 2010 12:54:40 GMT], pragma=[no-cache], expires=[Fri,
01 Jan 1990 00:00:00 GMT], cache-control=[no-cache, no-store, must-
revalidate], content-length=[456], content-type=[text/html], x-google-
cache-control=[remote-fetch], via=[HTTP/1.1 GWA]}

Is there anybody, how noticed similar behaviour? Or better, know how
to do it correctly ?

BR,
 Zsombor

-- 
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 google-appengine-j...@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en.



[appengine-java] countEntities problem

2010-12-19 Thread Zsombor
Hi,

 I'm using the low level API, and noticed something strange:
If I call :

service.prepare(
new Query(USER_KIND).addFilter("active", FilterOperator.EQUAL,
Boolean.TRUE)
  .addFilter("registrationDate",
FilterOperator.GREATER_THAN_OR_EQUAL, date).setKeysOnly())
 .countEntities(FetchOptions.Builder.withDefaults())

it returns 0.

However If I call:
service.prepare(
new Query(USER_KIND).addFilter("active", FilterOperator.EQUAL,
Boolean.TRUE)
  .addFilter("registrationDate",
FilterOperator.GREATER_THAN_OR_EQUAL, date).setKeysOnly())
 .asList(FetchOptions.Builder.withDefaults()).size()

it returns 3 - in this case this is the correct answer. I'm very
curious what happens here. Is there a problem with the indexes? But if
I not correctly configured my indexes, I guess, the second query
should fail similarly with returning 0 entity.

Any thought ? Is it a bug in the datastore ?

BR
 Zsombor

-- 
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 google-appengine-j...@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en.



[appengine-java] Re: countEntities problem

2010-12-20 Thread Zsombor

Sorry, after I've upgraded to 1.4.0 this problem is solved.

BR,
 Zsombor


On dec. 20, 02:24, Gal Dolber  wrote:
> Try adding a limit to the count query
>
>

-- 
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 google-appengine-j...@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en.