Hello,

It looks like we were getting empty strings from the Backend and not 
sanitizing those. I've pushed a change to fix this, and should be working 
now.

Let me know if you see anything else askew.

Thanks,
-Mike

On Monday, March 26, 2012 5:22:25 AM UTC-7, Alexander Kachkaev wrote:
>
> Dear all,
>
> Trying to work with Picasa API I have faced an issue that seems not to be 
> related to my code, but is caused by java library/API response stack.
>
> Here is my code:
>         picasaService = new PicasawebService("exampleCo-exampleApp-1.0");
>         picasaService.setUserCredentials(picasaUser, picasaPassword);
>         baseSearchUrl = new URL("
> https://picasaweb.google.com/data/feed/api/all";);
>        
>         URL baseSearchUrl = new URL("
> https://picasaweb.google.com/data/feed/api/all";);
>         Query myQuery = new com.google.gdata.client.Query(baseSearchUrl);
>         myQuery.setStringCustomParameter("kind", "photo");
>         myQuery.setMaxResults(1000);
>         // No additional parameters - just asking for any first 1000 photos
>
>         AlbumFeed searchResultsFeed = picasaService.query(myQuery, 
> AlbumFeed.class);
>
> Here is the url that is requested:
> https://picasaweb.google.com/data/feed/api/all?max-results=1000&kind=photo
>
> And here is the Exception:
> Exception in thread "main" com.google.gdata.util.ParseException: [Line 1, 
> Column 531149, element name] name must have a value
>     at 
> com.google.gdata.util.XmlParser.throwParseException(XmlParser.java:730)
>     at com.google.gdata.util.XmlParser.parse(XmlParser.java:693)
>     at com.google.gdata.util.XmlParser.parse(XmlParser.java:576)
>     at com.google.gdata.data.BaseFeed.parseAtom(BaseFeed.java:867)
>     ...
> Caused by: com.google.gdata.util.ParseException: name must have a value
>     at 
> com.google.gdata.data.Person$AtomHandler$NameHandler.processEndElement(
> Person.java:251)
>     at com.google.gdata.util.XmlParser.endElement(XmlParser.java:1004)
>     at org.xml.sax.helpers.ParserAdapter.endElement(ParserAdapter.java:626)
>     at 
> com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.endElement(AbstractSAXParser.java:593)
>     ...
>
> Looks like the exception fires, because the parser does not expect to see 
> an empty node name like this:
> ...<author type='owner'>*<name/>*<uri>
> https://picasaweb.google.com/107435654944616411853</uri><email>1074356...
>
> The problem has been there for about 2 years. I have found a blog article 
> dated June 2010 
> http://www.curiousattemptbunny.com/2010/07/comgooglegdatautilparseexception-name.htmlwhere
>  it is suggested to build own gdata-core-1.0.jar replacing just one 
> line of code in Person.NameHandler class, but that's too time-consuming 
> for everyone to do. What other ways of overcoming such issue could be 
> suggested? Is there a particular reason why google still has not fixed it?
>
> Kind regards
> Alexander
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google Picasa Web Albums API" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/google-picasa-data-api/-/A0rVUR1LTCQJ.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-picasa-data-api?hl=en.

Reply via email to