title: Google App Engine - ImagesService.getServingUrl() fails to read image
body: <p>I'm receiving an image file through a HTTP request and storing it in the Blobstore. My code is along the lines of that found here: [https://developers.google.com/appengine/docs/java/blobstore/overview#Writing_Files_to_the_Blobstore][1].</p>
  
  <p>When calling the function ImagesService.getServingUrl() on the blobkey for the image I had stored I get the message below:</p>
  
  <pre><code>HTTP ERROR 500
  
  Problem accessing /upload. Reason:
  
      Failed to read image
  Caused by:
  
  java.lang.IllegalArgumentException: Failed to read image
      at com.google.appengine.api.images.ImagesServiceImpl.getServingUrl(ImagesServiceImpl.java:282)
  </code></pre>
  
  <p>After hours of googling, trying to find a solution, I think that the problem is that the function closeFinally() is faulty. I think this because after closing the new blob image that I make, the FileStats object associated with the blob returns false for the hasFinalizedName(). Yet the blob returns true for isClosed() and isFinalized(). Also, its full path is something like this:</p>
  
  <p>/blobstore/writable:xFSAF_493dsfAfw489vFa...</p>
  
  <p>If it is closed it shouldn't be writable, I think.</p>
  
  <p>So my questions are: Does anyone have a solution to the getServingUrl not working? Does anyone have a workaround getServingUrl? I want to have pictures to serve to users and I want these pictures to exist as static files. getServingUrl with blobstore seems to be the best choice for me. I don't want to use Google Cloud Storage because for every Blobstore vs Google Cloud Storage question I saw, Blobstore won it seemed.</p>