For some queries I receive this ServiceException after 10 seconds of
waiting for the response.
I also tried with direct http get request and the same result.
Ex: Contract%20Colectiv%20de%20Munc%C4%83
1. My code:
URL feedUrl = new URL("
https://docs.google.com/feeds/default/private/
full/folder%3A" + folderId + "/contents/-/pdf"); DocumentQuery query
= new DocumentQuery(feedUrl);
query.setFullTextQuery(searchText);
client.setConnectTimeout(0);// with or without this line I receive the
same result (I also put 30000 value - same result)
client.setReadTimeout(0);// with or without this line I receive the
same result
DocumentListFeed feed = client.getFeed(query, DocumentListFeed.class);
2. This is the stacktrace for the exception that I receive with
documentlist api query:
com.google.gdata.util.ServiceException: An unknown error has occurred.
<errors xmlns='
http://schemas.google.com/g/2005'><error><domain>GData</
domain><code>ServiceException</code><internalReason>An unknown error
has occurred.</internalReason></error></errors>
at
com.google.gdata.client.http.HttpGDataRequest.handleErrorResponse(HttpGDataRequest.java:
624)
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.getFeed(Service.java:1135)
...
3. This is the exception I receive with direct http get request:
java.io.IOException: Server returned HTTP response code: 500 for URL:
https://docs.google.com/feeds/default/private/full/folder%3[my_folder_doc-id]/contents/-/pdf?q="[query_text]"&max-results=25
at
sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:
1436)
at java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java:
379)
at
sun.net.www.protocol.https.HttpsURLConnectionImpl.getResponseCode(HttpsURLConnectionImpl.java:
318)
at GoogleDocsManager.googleSearch(GoogleDocsManager.java:281)