SilverHoodCorp / gdata-java-client

Automatically exported from code.google.com/p/gdata-java-client
Apache License 2.0
0 stars 0 forks source link

Parse Exception : Duplicate extension element http://schemas.google.com/photos/2007:streamId #393

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. On some user accounts trying to get their feed causes a parse exception to 
be thrown.
Code:

...
picasaClient = new PicasawebService(applicationId);
...
feedUrl = new URL(PicasaService.picasaEndPoint + "albumid/"
            + remoteAlbumId + "/photoid/" + itemId + "?imgmax=d");
picasaClient.setStrictValidation(false);
PhotoFeed   photoFeed = picasaClient.getFeed(feedUrl, PhotoFeed.class);
....

What is the expected output? What do you see instead?
Expected output: able to programmatically handle getFeed
Actual Output:
Caused by: com.google.gdata.util.ParseException: [Line 1, Column 2702, element 
feed] Duplicate extension element http://schemas.google.com/photos/2007:streamId
        at com.google.gdata.util.XmlParser.throwParseException(XmlParser.java:739)
        at com.google.gdata.util.XmlParser.parse(XmlParser.java:702)
        at com.google.gdata.util.XmlParser.parse(XmlParser.java:585)
        at com.google.gdata.data.BaseFeed.parseAtom(BaseFeed.java:867)
        at com.google.gdata.wireformats.input.AtomDataParser.parse(AtomDataParser.java:68)
        at com.google.gdata.wireformats.input.AtomDataParser.parse(AtomDataParser.java:39)
        at com.google.gdata.wireformats.input.CharacterParser.parse(CharacterParser.java:100)
        at com.google.gdata.wireformats.input.XmlInputParser.parse(XmlInputParser.java:52)
        at com.google.gdata.wireformats.input.AtomDualParser.parse(AtomDualParser.java:66)
        at com.google.gdata.wireformats.input.AtomDualParser.parse(AtomDualParser.java:34)
        at com.google.gdata.client.Service.parseResponseData(Service.java:2165)
        at com.google.gdata.client.Service.parseResponseData(Service.java:2098)
        at com.google.gdata.client.Service.getFeed(Service.java:1136)
        at com.google.gdata.client.Service.getFeed(Service.java:998)
        at com.google.gdata.client.GoogleService.getFeed(GoogleService.java:645)
        at com.google.gdata.client.Service.getFeed(Service.java:1017)
        at pipe.service.picasa.request.PicasaImportPhotoRequest.execute(PicasaImportPhotoRequest.java:108)
        ... 8 more
Caused by: com.google.gdata.util.ParseException: Duplicate extension element 
http://schemas.google.com/photos/2007:streamId
        at com.google.gdata.data.ExtensionPoint.getExtensionHandler(ExtensionPoint.java:643)
        at com.google.gdata.data.BaseFeed$FeedHandler.getChildHandler(BaseFeed.java:928)
        at com.google.gdata.util.XmlParser$ElementHandler.getChildHandler(XmlParser.java:249)
        at com.google.gdata.util.XmlParser.startElement(XmlParser.java:825)
        at org.xml.sax.helpers.ParserAdapter.startElement(ParserAdapter.java:597)
        at org.apache.xerces.parsers.AbstractSAXParser.startElement(Unknown Source)
        at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown Source)
        at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
        at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
        at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
        at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
        at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
        at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
        at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
        at org.xml.sax.helpers.ParserAdapter.parse(ParserAdapter.java:405)
        at com.google.gdata.util.XmlParser.parse(XmlParser.java:694)
        ... 23 more

What version of the product are you using? On what operating system?
1.47.1 on Centos

Please provide any additional information below.

We have encountered this particularly with 

picasa user id: 111553092428703612818
picasa photo id: 5711057203327137490
picasa album id: 5711057201749088401

Original issue reported on code.google.com by matt.c.w...@gmail.com on 20 Jun 2012 at 2:27

GoogleCodeExporter commented 9 years ago
It seems as though the data returned violates the defined dtd. It complains of 
having multiple elements where the dtd defines 1 element.

Original comment by matt.c.w...@gmail.com on 20 Jun 2012 at 2:28