SilverHoodCorp / gdata-java-client

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

Youtube Java api is not working #188

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Use the latest Java API 1.36
2. Use the following lines:

YouTubeQuery query = new YouTubeQuery(new URL(VIDEOS_FEED));
query.setOrderBy(YouTubeQuery.OrderBy.RELEVANCE);
query.setSafeSearch(YouTubeQuery.SafeSearch.NONE);
query.setFullTextQuery(searchTerms);
VideoFeed videoFeed = (VideoFeed)myService.query(query, VideoFeed.class);
List ve = videoFeed.getEntries();.

What is the expected output? What do you see instead?
 I see an exception

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

Windows, 1.36

Please provide any additional information below.

ERROR [STDERR] Sep 16, 2009 1:10:08 AM com.google.gdata.util.LogUtils
logException
WARNING: [Line 1, Column 21749, element yt:state] 
com.google.gdata.util.ParseException: Invalid value for attribute : 'name'
Message: Invalid value for attribute : 'name'

    at com.google.gdata.data.AttributeHelper.consumeEnum(AttributeHelper.java:425)
    at
com.google.gdata.data.youtube.YtPublicationState.consumeAttributes(YtPublication
State.java:174)
    at
com.google.gdata.data.AbstractExtension$AttributesHandler.processEndElement(Abst
ractExtension.java:243)
    at com.google.gdata.util.XmlParser.endElement(XmlParser.java:996)
    at org.xml.sax.helpers.ParserAdapter.endElement(Unknown Source)
    at org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown Source)
    at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanEndElement(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(Unknown Source)
    at com.google.gdata.util.XmlParser.parse(XmlParser.java:677)
    at com.google.gdata.util.XmlParser.parse(XmlParser.java:608)
    at com.google.gdata.data.BaseFeed.parseAtom(BaseFeed.java:759)
    at com.google.gdata.util.ParseUtil.parseFeed(ParseUtil.java:200)
    at com.google.gdata.util.ParseUtil.readFeed(ParseUtil.java:168)
    at com.google.gdata.data.BaseFeed.readFeed(BaseFeed.java:741)
    at com.google.gdata.client.Service.getFeed(Service.java:965)
    at com.google.gdata.client.Service.getFeed(Service.java:898)
    at com.google.gdata.client.GoogleService.getFeed(GoogleService.java:624)
    at com.google.gdata.client.Service.query(Service.java:1202)
    at com.google.gdata.client.Service.query(Service.java:1145)
    at com.common.app.YouTubeClient.searchVideo(YouTubeClient.java:274)
    at com.awa.action.VideoAction.execute(VideoAction.java:48)
    at
org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.
java:419)
    at
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:224)
    at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1194)
    at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:432)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
    at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilt
erChain.java:290)
    at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.
java:206)
    at
org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:9
6)
    at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilt
erChain.java:235)
    at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.
java:206)
    at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:2
30)
    at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:1
75)
    at
org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociatio
nValve.java:179)
    at
org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
    at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
    at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
    at
org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionVa
lve.java:157)
    at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109
)
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:262)
    at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
    at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Pr
otocol.java:583)
    at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:446)
    at java.lang.Thread.run(Unknown Source)
01:10:08,023 WARN  [RequestProcessor] Unhandled Exception thrown: class
com.google.gdata.util.ParseException
01:10:08,027 ERROR [[action]] Servlet.service() for servlet action threw
exception
com.google.gdata.util.ParseException: Invalid value for attribute : 'name'
    at com.google.gdata.data.AttributeHelper.consumeEnum(AttributeHelper.java:425)
    at
com.google.gdata.data.youtube.YtPublicationState.consumeAttributes(YtPublication
State.java:174)
    at
com.google.gdata.data.AbstractExtension$AttributesHandler.processEndElement(Abst
ractExtension.java:243)
    at com.google.gdata.util.XmlParser.endElement(XmlParser.java:996)
    at org.xml.sax.helpers.ParserAdapter.endElement(Unknown Source)
    at org.apache.xerces.parsers.AbstractSAXParser.endElement(Unknown Source)
    at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanEndElement(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(Unknown Source)
    at com.google.gdata.util.XmlParser.parse(XmlParser.java:677)
    at com.google.gdata.util.XmlParser.parse(XmlParser.java:608)
    at com.google.gdata.data.BaseFeed.parseAtom(BaseFeed.java:759)
    at com.google.gdata.util.ParseUtil.parseFeed(ParseUtil.java:200)
    at com.google.gdata.util.ParseUtil.readFeed(ParseUtil.java:168)
    at com.google.gdata.data.BaseFeed.readFeed(BaseFeed.java:741)
    at com.google.gdata.client.Service.getFeed(Service.java:965)
    at com.google.gdata.client.Service.getFeed(Service.java:898)
    at com.google.gdata.client.GoogleService.getFeed(GoogleService.java:624)
    at com.google.gdata.client.Service.query(Service.java:1202)
    at com.google.gdata.client.Service.query(Service.java:1145)
    at com.common.app.YouTubeClient.searchVideo(YouTubeClient.java:274)
    at com.awa.action.VideoAction.execute(VideoAction.java:48)
    at
org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.
java:419)
    at
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:224)
    at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1194)
    at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:432)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
    at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilt
erChain.java:290)
    at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.
java:206)
    at
org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:9
6)
    at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilt
erChain.java:235)
    at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.
java:206)
    at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:2
30)
    at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:1
75)
    at
org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociatio
nValve.java:179)
    at
org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
    at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
    at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
    at
org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionVa
lve.java:157)
    at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109
)
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:262)
    at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
    at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Pr
otocol.java:583)
    at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:446)
    at java.lang.Thread.run(Unknown Source)

Original issue reported on code.google.com by padmaraj...@gmail.com on 16 Sep 2009 at 6:37