Note that there are some explanatory texts on larger screens.

plurals
  1. POVersionConflictException when downloading document
    primarykey
    data
    text
    <p>I sometimes get a VersionConflictException when trying to download a file from Google Docs. I'm guessing this is harmless but why does this happen? </p> <p>I'm using gdata-media-1.0-1.41.3.jar</p> <pre><code>com.google.gdata.util.VersionConflictException: Conflict at com.google.gdata.client.http.HttpGDataRequest.handleErrorResponse(HttpGDataRequest.java:612) at com.google.gdata.client.http.GoogleGDataRequest.handleErrorResponse(GoogleGDataRequest.java:563) at com.google.gdata.client.http.HttpGDataRequest.checkResponse(HttpGDataRequest.java:552) at com.google.gdata.client.http.HttpGDataRequest.execute(HttpGDataRequest.java:530) at com.google.gdata.client.http.GoogleGDataRequest.execute(GoogleGDataRequest.java:535) at com.google.gdata.client.media.MediaService.getMediaResource(MediaService.java:234) at com.google.gdata.client.media.MediaService.getMedia(MediaService.java:276) at com.google.gdata.client.media.MediaService.getMedia(MediaService.java:302) </code></pre> <p>The code we are using is as follows:</p> <pre><code>DocumentListEntry entry = ... // from the feed of changed documents MediaContent documentContent = (com.google.gdata.data.MediaContent) entry.getContent(); String uri = documentContent.getUri(); MediaContent downloadContent = new MediaContent(); downloadContent.setUri(uri); MediaSource mediaSource = docsService.getMedia(downloadContent); InputStream inputStream = mediaSource.getInputStream(); File file = // some file OutputStream output = new FileOutputStream(file); try { IOUtils.copy(inputStream, output); } finally { IOUtils.closeQuietly(output); IOUtils.closeQuietly(inputStream); } </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload