FullTextQuery ServiceException - An unknown error has occured

55 views
Skip to first unread message

Alexandru Farcaş

unread,
Oct 24, 2011, 11:03:40 AM10/24/11
to Google Documents List API

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)
Message has been deleted

Alexandru Farcaş

unread,
Oct 26, 2011, 5:40:12 AM10/26/11
to Google Documents List API
Additional information:
1. My folder contains almost 100k files. Could be this a problem?
2. In ~95% of searches I get the correct response
3. In browser the same interogation returns "The server encountered
an
error. Please try again later", but after refresh works fine.
Can anyone help me to get a "workaround" for this problem? Or how to
avoid it?

On Oct 24, 6:03 pm, Alexandru Farcaş <alex.far...@expert-group.biz>
wrote:
> sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection....
> 1436)
>         at java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java:
> 379)
>         at
> sun.net.www.protocol.https.HttpsURLConnectionImpl.getResponseCode(HttpsURLCon...
> 318)
>         at GoogleDocsManager.googleSearch(GoogleDocsManager.java:281)

Ali Afshar

unread,
Oct 27, 2011, 6:49:23 PM10/27/11
to google-docum...@googlegroups.com
Hi Alexandru,

This certainly seems a possible bug if the query usually works (95%).
Could you make some recent requests, and give me a username or domain
name so I can find and debug the errors?

Regards

--
Ali Afshar | www.googplus.org/ali | Google Developer Relations

Alexandru Farcaş

unread,
Oct 28, 2011, 5:10:02 AM10/28/11
to Google Documents List API
Hi Ali,

I've send you the information you need on private.

Regards
-Alexandru

Ali Afshar

unread,
Oct 28, 2011, 5:10:50 AM10/28/11
to google-docum...@googlegroups.com
Thanks, I've received it, and I'll get back to you on this thread.

Alexandru Farcaş

unread,
Oct 28, 2011, 5:17:55 AM10/28/11
to Google Documents List API
Thanks, I'm waiting for your response.

Ali Afshar

unread,
Oct 28, 2011, 5:30:27 AM10/28/11
to google-docum...@googlegroups.com
Thanks for the additional information, yes, this certainly looks like
a bug, possibly caused by the large size of the collection. I have
raised a bug report and will keep you updated as to the progress.

Regards

Alexandru Farcaş

unread,
Oct 28, 2011, 6:28:32 AM10/28/11
to Google Documents List API
Thanks Ali,

I hope that this bug will be fix soon.

Regards,
-Alexandru

Andrei F

unread,
Nov 12, 2011, 6:50:27 AM11/12/11
to Google Documents List API
Hi, any progress on this issue ? Queries still behave very unusual:
some work, and the next day (or after a few hours) they throw "An
unknown error has occurred" (after 10 sec). After 2-3 retries it
works, but that's rare...

On Oct 28, 12:28 pm, Alexandru Farcaş <alex.far...@expert-group.biz>

Vic Fryzel

unread,
Dec 20, 2011, 4:03:21 PM12/20/11
to google-docum...@googlegroups.com
I bumped our internal bug for this issue.

-Vic
Reply all
Reply to author
Forward
0 new messages