My favorites | Sign in
Project Home Downloads Wiki Issues Source
New issue   Search
for
  Advanced search   Search tips   Subscriptions
Issue 188: Youtube Java api is not working
3 people starred this issue and may be notified of changes. Back to list
Status:  New
Owner:  ----


Sign in to add a comment
 
Reported by padmaraj...@gmail.com, Sep 15, 2009
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(YtPublicationState.java:174)
	at
com.google.gdata.data.AbstractExtension$AttributesHandler.processEndElement(AbstractExtension.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(ApplicationFilterChain.java:290)
	at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
	at
org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
	at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
	at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
	at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
	at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
	at
org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.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(CachedConnectionValve.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(Http11Protocol.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(YtPublicationState.java:174)
	at
com.google.gdata.data.AbstractExtension$AttributesHandler.processEndElement(AbstractExtension.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(ApplicationFilterChain.java:290)
	at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
	at
org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
	at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
	at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
	at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
	at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
	at
org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.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(CachedConnectionValve.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(Http11Protocol.java:583)
	at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:446)
	at java.lang.Thread.run(Unknown Source)


Sign in to add a comment

Powered by Google Project Hosting