GData Error: Intermittent "Invalid Root Element"

I am sending GData requests to create traffic diagrams for Instructables.com users using the Java GData package. However, this exception is sometimes thrown:

[Line 1, Column 0] Invalid root element, expected (namespace uri:local name) of (http://www.w3.org/2005 Atom:feed), found (:feed 

The only mention of this error that I can find on the Internet is here , but I am pretty sure that our feed URL is correctly configured. For example, here is a URL we can send:

 https://www.google.com/analytics/feeds/data?ids=ga:472899&metrics=ga:uniquePageviews&dimensions=ga:date&start-date=2009-10-12&end-date=2009-11-11&filters=ga:pagePath==/id/Inverted_Bookshelf/,ga:pagePath==/id/Munny-Speakers/,ga:pagePath==/id/Zippo-Trick%253a-The-Twilight-Zone/,ga:pagePath==/id/Firefox-Pranks/,ga:pagePath==/id/Guitar-Hero-LED-Mod/ 

Strange, this same request will work locally, but fail on our intermediate server, and then work during the production process. And even if this request fails in one context, other requests will be good in the same context. I know that these requests must be part of authenticated HTTP requests. Could this be a problem? I use the same Google account (same username / password) to send requests in each case.

+4
source share
1 answer

Read what the error code tells you: it tells you that it expects the feed element in the Atom namespace, but sees the feed element in the namespace.

This is unlikely to occur due to an authorization failure (Google, at least, sends a document with an error whose root is not feed in this case); it will more likely occur if the feed element you receive does not have an declaration for the default namespace.

0
source

All Articles