Note that there are some explanatory texts on larger screens.

plurals
  1. POTrouble with GData API while using "DocumentListEntry.updateMedia()" method
    primarykey
    data
    text
    <p>I'm using the updateMedia(boolean) method of DocumentListEntry from GData API. Sometimes this command worked, but in the most times an exception is threw.</p> <p>The code (documentList is an DocumentListEntry object):</p> <pre><code>public void flush() throws IOException { try { if(((ByteArrayOutputStream)os).size()&gt;0){ documentList.setMediaSource( new MediaByteArraySource(((ByteArrayOutputStream)os).toByteArray(), mimeType)); documentList.updateMedia(true); ((ByteArrayOutputStream)os).reset(); } } catch (ServiceException ex) { throw new IOException(ex); } } </code></pre> <p>The command "documentList.updateMedia(true);" throw's this exception: </p> <pre><code>java.lang.reflect.InvocationTargetException at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.apache.commons.beanutils.MethodUtils.invokeMethod(MethodUtils.java:216) at org.apache.commons.beanutils.MethodUtils.invokeMethod(MethodUtils.java:162) at com.ralph.agente.Agent.run(Agent.java:191) at com.ralph.agente.Agent.run(Agent.java:134) at company.google.conexao.RecebeObjetoThread.geraSinaisVitaisAgent(RecebeObjetoThread.java:61) at company.google.conexao.RecebeObjetoThread.run(RecebeObjetoThread.java:133) at java.lang.Thread.run(Thread.java:662) Caused by: java.io.IOException: com.google.gdata.util.InvalidEntryException: Unexpected resource version ID &lt;errors xmlns='http://schemas.google.com/g/2005'&gt;&lt;error&gt;&lt;domain&gt;GData&lt;/domain&gt;&lt;code&gt;invalidResourceVersion&lt;/code&gt;&lt;internalReason&gt;Unexpected resource version ID&lt;/internalReason&gt;&lt;/error&gt;&lt;/errors&gt; at com.company.google.io.GoogleDocsOutputStream.flush(GoogleDocsOutputStream.java:142) at com.company.google.io.GoogleDocsOutputStream.close(GoogleDocsOutputStream.java:148) at br.edu.company.google.processo.GeraSinaisVitaisAgent.bodyAgent(GeraSinaisVitaisAgent.java:133) ... 11 more Caused by: com.google.gdata.util.InvalidEntryException: Unexpected resource version ID &lt;errors xmlns='http://schemas.google.com/g/2005'&gt;&lt;error&gt;&lt;domain&gt;GData&lt;/domain&gt;&lt;code&gt;invalidResourceVersion&lt;/code&gt;&lt;internalReason&gt;Unexpected resource version ID&lt;/internalReason&gt;&lt;/error&gt;&lt;/errors&gt; at com.google.gdata.client.http.HttpGDataRequest.handleErrorResponse(HttpGDataRequest.java:594) 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.Service.update(Service.java:1563) at com.google.gdata.client.Service.update(Service.java:1530) at com.google.gdata.client.GoogleService.update(GoogleService.java:583) at com.google.gdata.client.media.MediaService.update(MediaService.java:484) at com.company.google.io.GoogleDocsOutputStream.flush(GoogleDocsOutputStream.java:137) </code></pre> <p>Someone can help me?</p>
    singulars
    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.
 

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