Julian Stöttinger

Google API ParseException

If you are trying to get some date using the Feed class of the Google API similar to this Picasa example

AlbumFeed searchResultsFeed = myService.query(myQuery, AlbumFeed.class);

sometimes, for certain queries, for certain times, I have honestly no idea why, the feed returns no <atom:name> tag. Most probably you do not need it at all, and there is an easy workaround (I got it from here).

  1. Download the source of the Google API
  2. Find person.java in gdata/java/src/com/google/gdata/data
  3. in line 250, change
    if (value == null) {
              throw new ParseException(CoreErrorDomain.ERR.nameValueRequired);}   
    if (value == null) {
              //throw new ParseException(CoreErrorDomain.ERR.nameValueRequired);
    name = "curiousattemptbunny.com"; }
  4. run ant -f build-src.xml in gdata/java
  5. In case there are any build errors, just make sure gdata-core-1.0.jar is built successfully. Replace it with your original gdata-core-1.0.jar.
  6. Enjoy nameless feeds from Google ;)