[appengine-java] Re: FileServiceFactory.getFileService().getBlobKey(file) is Broken, blobkey parser returns null

2011-08-22 Thread Jared Alexander
Thanks for the tip, worked for me as well! -- You received this message because you are subscribed to the Google Groups "Google App Engine for Java" group. To view this discussion on the web visit https://groups.google.com/d/msg/google-appengine-java/-/4UtA_mAj6nYJ. To post to this group, send

[appengine-java] Re: FileServiceFactory.getFileService().getBlobKey(file) is Broken, blobkey parser returns null

2011-06-13 Thread John Patterson
I'm finding the same problem. This worked for me: BlobKey key = files.getBlobKey(file); if (key == null) { Thread.sleep(2000); key = files.getBlobKey(file); } -- You received this message because you are subscribed to the Google Groups "Google App Engine for Java" group. To view this discussi

[appengine-java] Re: FileServiceFactory.getFileService().getBlobKey(file) is Broken, blobkey parser returns null

2011-06-05 Thread Brandon Donnelson
I needed to use Thread.sleep(2000); instead of wait(2000); Brandon Donnelson http://gwt-examples.googlecode.com -- You received this message because you are subscribed to the Google Groups "Google App Engine for Java" group. To view this discussion on the web visit https://groups.google.com/d/

[appengine-java] Re: FileServiceFactory.getFileService().getBlobKey(file) is Broken, blobkey parser returns null

2011-06-05 Thread Brandon Donnelson
My work around: try { writeChannel.closeFinally(); } catch (IllegalStateException e) { success = false; log.severe("close(): Error 6: writeChannel.closeFinally() error " + e.toString()); } catch (IOException e) { success = false; log.severe("close(): Error

[appengine-java] Re: FileServiceFactory.getFileService().getBlobKey(file) is Broken, blobkey parser returns null

2011-04-28 Thread Brandon Donnelson
This workaround fails. The GAE is working up a fix. Wahoo, 2 points for the GAE Teams!!! Brandon Donnelson http://gwt-examples.googlecode.com http://c.gawkat.com Challenge is to: Spice up the java forum with some profile pictures, lets beat the python community. :) -- You received this message

[appengine-java] Re: FileServiceFactory.getFileService().getBlobKey(file) is Broken, blobkey parser returns null

2011-04-27 Thread Mitch Rudominer
Hi Brandon, Sorry, I wasn't clear before. What I meant was that the API is working as designed. In your code sample you call writeChannel.write(bb) but you never called writeChannel.closeFinally(). This means that the file is not *finalized*. Until the file is finalized it is write-only, it cannot

[appengine-java] Re: FileServiceFactory.getFileService().getBlobKey(file) is Broken, blobkey parser returns null

2011-04-27 Thread Brandon Donnelson
I dont' want to waste your time, so I wanted to let you know, that all blobs write to store perfectly. When I get a null return for blobkey after successful write to blobstore, I split the namePart to get the key, but for some reason, this doesn't match up yet. Its probably api operator error,

[appengine-java] Re: FileServiceFactory.getFileService().getBlobKey(file) is Broken, blobkey parser returns null

2011-04-27 Thread Brandon Donnelson
I was merely trying to grab the blobkey before it was closed to see if it was possible, in trying to find a workaround. I knew that I had to do it after closing. I see the blobkey string in the file object when it is null, although I am finding the blog actually is null(corrupted) even though th

[appengine-java] Re: FileServiceFactory.getFileService().getBlobKey(file) is Broken, blobkey parser returns null

2011-04-26 Thread Mitch Rudominer
Hi Brandon, Sorry I wasn't clear in my previous response. The API is working as designed. In your code sample you call writeChannel.write(bb) and then getBlobKey(file) without calling writeChannel.closeFinally(). Until you call closeFinally() the file has not been *finalized*. This means the fil

[appengine-java] Re: FileServiceFactory.getFileService().getBlobKey(file) is Broken, blobkey parser returns null

2011-04-26 Thread branflake2267
I kinda figured, since it shows experimental. I've got a work around, for sucking out of the object. I like using it, very nice work so far! Thanks for looking. Brandon -- You received this message because you are subscribed to the Google Groups "Google App Engine for Java" group. To post to t

[appengine-java] Re: FileServiceFactory.getFileService().getBlobKey(file) is Broken, blobkey parser returns null

2011-04-26 Thread Mitch Rudominer
On Apr 26, 7:42 am, branflake2267 wrote: > My code snippet that procured the above trace: > > public long uploadBlob_ByFile(long fileThingId, String fileName, String > contentType, byte[] filebytes) { >     if (filebytes == null || filebytes.length == 0) { >       log.warning("uploadBlob_ByFile

[appengine-java] Re: FileServiceFactory.getFileService().getBlobKey(file) is Broken, blobkey parser returns null

2011-04-26 Thread branflake2267
Trying work around: private BlobKey getBlobKey(AppEngineFile file) { BlobKey key = FileServiceFactory.getFileService().getBlobKey(file); if (key == null && file.getNamePart().contains(":") == true) { String[] s = file.getNamePart().split(":"); if (s != null && s.leng

[appengine-java] Re: FileServiceFactory.getFileService().getBlobKey(file) is Broken, blobkey parser returns null

2011-04-26 Thread branflake2267
I'd like to note related bugs on GAE side not dev side: - FileReadChannel won't read all the bytes of a blob. - BlobInfo records the wrong byte size for base64 upload -- You received this message because you are subscribed to the Google Groups "Google App Engine for Java" group. To post to this

[appengine-java] Re: FileServiceFactory.getFileService().getBlobKey(file) is Broken, blobkey parser returns null

2011-04-26 Thread branflake2267
My code snippet that procured the above trace: public long uploadBlob_ByFile(long fileThingId, String fileName, String contentType, byte[] filebytes) { if (filebytes == null || filebytes.length == 0) { log.warning("uploadBlob_ByFile(): Warn: filebytes is null or length=0"); return

[appengine-java] Re: FileServiceFactory.getFileService().getBlobKey(file) is Broken, blobkey parser returns null

2011-04-26 Thread branflake2267
It doesn't look like this happens every time, but something is not parsing correctly when trying to read the blobkey out of the file object. -- 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 goog