SilverHoodCorp / gdata-java-client

Automatically exported from code.google.com/p/gdata-java-client
Apache License 2.0
0 stars 0 forks source link

Parellel Fetches of Entries Results in ConcurrentModificationException #341

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
We are running 1.45.0 of the java client on GAE and encounter the following 
problem:

When attempting to retrieve entries using a 2LO-authorized gdata service for 
either the Docs List API or Calendar API for a large number of users in 
parallel, we receive frequently encounter this stack trace:

java.util.ConcurrentModificationException
    at java.util.HashMap$HashIterator.nextEntry(HashMap.java:810)
    at java.util.HashMap$EntryIterator.next(HashMap.java:851)
    at java.util.HashMap$EntryIterator.next(HashMap.java:849)
    at java.util.Collections$UnmodifiableMap$UnmodifiableEntrySet$1.next(Collections.java:1403)
    at java.util.Collections$UnmodifiableMap$UnmodifiableEntrySet$1.next(Collections.java:1396)
    at com.google.gdata.client.authn.oauth.TwoLeggedOAuthHelper.addParametersAndRetrieveHeader(TwoLeggedOAuthHelper.java:133)
    at com.google.gdata.client.authn.oauth.TwoLeggedOAuthHelper.getAuthorizationHeader(TwoLeggedOAuthHelper.java:112)
    at com.google.gdata.client.GoogleAuthTokenFactory$OAuthToken.getAuthorizationHeader(GoogleAuthTokenFactory.java:204)
    at com.google.gdata.client.http.HttpGDataRequest.<init>(HttpGDataRequest.java:331)
    at com.google.gdata.client.http.GoogleGDataRequest.<init>(GoogleGDataRequest.java:456)
    at com.google.gdata.client.http.GoogleGDataRequest$Factory.createRequest(GoogleGDataRequest.java:93)
    at com.google.gdata.client.http.HttpGDataRequest$Factory.getRequest(HttpGDataRequest.java:165)
    at com.google.gdata.client.http.HttpGDataRequest$Factory.getRequest(HttpGDataRequest.java:171)
    at com.google.gdata.client.Service.createRequest(Service.java:776)
    at com.google.gdata.client.GoogleService.createRequest(GoogleService.java:535)
    at com.google.gdata.client.Service.createFeedRequest(Service.java:1256)
    at com.google.gdata.client.Service.getFeed(Service.java:1076)
    at com.google.gdata.client.GoogleService.getFeed(GoogleService.java:662)
    at com.google.gdata.client.Service.query(Service.java:1237)
    at com.google.gdata.client.Service.query(Service.java:1178)
...

Original issue reported on code.google.com by szieg...@cloudsherpas.com on 27 May 2011 at 3:32