I'm reading from and writing to a few spreadsheets using the spreadsheet 
API in Java. Different spreadsheets are being written to from different 
threads. But each thread is using the same Google account. I'm using a 
strategy similar to what is provided in the examples for each thread. I 
store ListEntry's in a map. At regular intervals I request updates to each 
of the ListEntry's and and then send updates where applicable. The regular 
intervals are on the order of seconds.

This seems to work perfectly. But after a few hours or so, I get an 
exception that says:

com.google.gdata.util.ServiceForbiddenException: Forbidden
Sorry, a server error occurred. We're re-loading your spreadsheet now...
 at 
com.google.gdata.client.http.HttpGDataRequest.handleErrorResponse(HttpGDataRequest.java:605)
 at 
com.google.gdata.client.http.GoogleGDataRequest.handleErrorResponse(GoogleGDataRequest.java:564)
 at 
com.google.gdata.client.http.HttpGDataRequest.checkResponse(HttpGDataRequest.java:560)
 at 
com.google.gdata.client.http.HttpGDataRequest.execute(HttpGDataRequest.java:538)
 at 
com.google.gdata.client.http.GoogleGDataRequest.execute(GoogleGDataRequest.java:536)
 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:597)
 at com.google.gdata.data.BaseEntry.update(BaseEntry.java:639)

When this occurs, the same problem then exists on the browser if I try and 
load the spreadsheet. The browser tells me something went wrong and now 
needs to reload the spreadsheet.

If I wait a minute or so before retrying the update, then I get the same 
exception. However, if I make a couple attempts fairly soon after each 
other, then the exception changes to

com.google.gdata.util.ServiceForbiddenException: Forbidden
The action you're trying to perform is causing a fatal error and cannot 
be performed.
 at 
com.google.gdata.client.http.HttpGDataRequest.handleErrorResponse(HttpGDataRequest.java:605)
 at 
com.google.gdata.client.http.GoogleGDataRequest.handleErrorResponse(GoogleGDataRequest.java:564)
 at 
com.google.gdata.client.http.HttpGDataRequest.checkResponse(HttpGDataRequest.java:560)
 at 
com.google.gdata.client.http.HttpGDataRequest.execute(HttpGDataRequest.java:538)
 at 
com.google.gdata.client.http.GoogleGDataRequest.execute(GoogleGDataRequest.java:536)
 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:597)
 at com.google.gdata.data.BaseEntry.update(BaseEntry.java:639)

The problem is that it seems to take forever (if ever) for the spreadsheet 
to become available again. So I have a couple questions:

1. Is it possible for me to cause the spreadsheet to become unavailable? If 
so, how do I avoid this? Is there a problem with the frequency of my 
updates? Should each thread be using a different Google account? Do the 
ListEntry's expire? Could a value inside of a ListEntry be causing a 
problem?

2. Is there a way to check if the spreadsheet is available before trying to 
update?

Hopefully someone out there can give me some insight to this problem.

Thanks,
Jared

-- 
You received this message because you are subscribed to the Google Groups 
"Google Spreadsheets API" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to