1

我正在尝试使用 youtube API 将视频上传到 youtube。使用以下代码段进行身份验证时收到错误消息

YouTubeService service = new YouTubeService("Oakland-YouTubeUploadClient-1", developerKey);
try {
    service.setUserCredentials(username, password);      
} catch (AuthenticationException e) {
    System.out.println("Invalid login credentials.");
    System.out.println("Auth excep. = " + e.getMessage());
    e.printStackTrace();
} catch (Exception e) {
    System.out.println("Excep. = " + e.getMessage());           
    e.printStackTrace();
}

我得到的错误信息如下:

[2/11/13 13:09:42:041 EST] 00000056 SystemErr R com.google.gdata.util.AuthenticationException:连接登录 URI 时出错
[2/11/13 13:09:42:041 EST] 00000056 SystemErr R at com.google.gdata.client.GoogleAuthTokenFactory.getAuthToken(GoogleAuthTokenFactory.java:549)
[2/11/13 13:09:42:041 EST] 00000056 SystemErr R 在 com.google.gdata.client.GoogleAuthTokenFactory.setUserCredentials(GoogleAuthTokenFactory.java:397)
[2/11/13 13:09:42:041 EST] 00000056 SystemErr R 在 com.google.gdata.client.GoogleService.setUserCredentials(GoogleService.java:364)
[2/11/13 13:09:42:041 EST] 00000056 SystemErr R 在 com.google.gdata.client.GoogleService.setUserCredentials(GoogleService.java:319)
[2/11/13 13:09:42:041 EST] 00000056 SystemErr R 在 com.google.gdata.client.GoogleService.setUserCredentials(GoogleService.java:303)
[2/11/13 13:09:42:041 EST] 00000056 SystemErr R at com.oakland.egov.videogallery.YouTubeUploadClient.execute(YouTubeUploadClient.java:188)
[2/11/13 13:09:42:041 EST] 00000056 SystemErr R at com.oakland.egov.videogallery.VideoGalleryServlet.uploadFilesFromDisk(VideoGalleryServlet.java:3502)
[2/11/13 13:09:42:041 EST] 00000056 SystemErr R 在 com.oakland.egov.videogallery.VideoGalleryServlet.performTask(VideoGalleryServlet.java:2560)
[2/11/13 13:09:42:041 EST] 00000056 SystemErr R 在 com.oakland.egov.videogallery.VideoGalleryServlet.doPost(VideoGalleryServlet.java:4440)
[2/11/13 13:09:42:041 EST] 00000056 SystemErr R at javax.servlet.http.HttpServlet.service(HttpServlet.java:738)
[2/11/13 13:09:42:041 EST] 00000056 SystemErr R at javax.servlet.http.HttpServlet.service(HttpServlet.java:831)
[2/11/13 13:09:42:041 EST] 00000056 SystemErr R 在 com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1449)
[2/11/13 13:09:42:057 EST] 00000056 SystemErr R 在 com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:790)
[2/11/13 13:09:42:057 EST] 00000056 SystemErr R 在 com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:443)
[2/11/13 13:09:42:057 EST] 00000056 SystemErr R 在 com.ibm.ws.webcontainer.servlet.ServletWrapperImpl.handleRequest(ServletWrapperImpl.java:175)
[2/11/13 13:09:42:057 EST] 00000056 SystemErr R 在 com.ibm.ws.webcontainer.servlet.CacheServletWrapper.handleRequest(CacheServletWrapper.java:91)
[2/11/13 13:09:42:057 EST] 00000056 SystemErr R 在 com.ibm.ws.webcontainer.WebContainer.handleRequest(WebContainer.java:859)
[2/11/13 13:09:42:057 EST] 00000056 SystemErr R 在 com.ibm.ws.webcontainer.WSWebContainer.handleRequest(WSWebContainer.java:1557)
[2/11/13 13:09:42:057 EST] 00000056 SystemErr R 在 com.ibm.ws.webcontainer.channel.WCChannelLink.ready(WCChannelLink.java:173)
[2/11/13 13:09:42:057 EST] 00000056 SystemErr R 在 com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleDiscrimination(HttpInboundLink.java:455)
[2/11/13 13:09:42:057 EST] 00000056 SystemErr R 在 com.ibm.ws.http.channel.inbound.impl.HttpInboundLink.handleNewInformation(HttpInboundLink.java:384)
[2/11/13 13:09:42:057 EST] 00000056 SystemErr R 在 com.ibm.ws.http.channel.inbound.impl.HttpICLReadCallback.complete(HttpICLReadCallback.java:83)
[2/11/13 13:09:42:057 EST] 00000056 SystemErr R at com.ibm.ws.tcp.channel.impl.AioReadCompletionListener.futureCompleted(AioReadCompletionListener.java:165)
[2/11/13 13:09:42:057 EST] 00000056 SystemErr R 在 com.ibm.io.async.AbstractAsyncFuture.invokeCallback(AbstractAsyncFuture.java:217)
[2/11/13 13:09:42:057 EST] 00000056 SystemErr R 在 com.ibm.io.async.AsyncChannelFuture.fireCompletionActions(AsyncChannelFuture.java:161)
[2/11/13 13:09:42:057 EST] 00000056 SystemErr R 在 com.ibm.io.async.AsyncFuture.completed(AsyncFuture.java:138)
[2/11/13 13:09:42:057 EST] 00000056 SystemErr R 在 com.ibm.io.async.ResultHandler.complete(ResultHandler.java:202)
[2/11/13 13:09:42:057 EST] 00000056 SystemErr R 在 com.ibm.io.async.ResultHandler.runEventProcessingLoop(ResultHandler.java:766)
[2/11/13 13:09:42:057 EST] 00000056 SystemErr R at com.ibm.io.async.ResultHandler$2.run(ResultHandler.java:896)
[2/11/13 13:09:42:057 EST] 00000056 SystemErr R 在 com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1527)
[2/11/13 13:09:42:057 EST] 00000056 SystemErr R 原因:javax.net.ssl.SSLHandshakeException:com.ibm.jsse2.util.g:PKIX 路径构建失败:java.security.cert。 CertPathBuilderException:PKIXCertPathBuilderImpl 无法构建有效的 CertPath。;内因是:
    java.security.cert.CertPathValidatorException: OU=Equifax Secure Certificate Authority, O=Equifax, C=US 颁发的证书不受信任;内因是:
    java.security.cert.CertPathValidatorException:证书链接错误
[2/11/13 13:09:42:072 EST] 00000056 SystemErr R at com.ibm.jsse2.na(n.java:22)
[2/11/13 13:09:42:072 EST] 00000056 SystemErr R at com.ibm.jsse2.tc.a(tc.java:465)
[2/11/13 13:09:42:072 EST] 00000056 SystemErr R at com.ibm.jsse2.gb.a(gb.java:352)
[2/11/13 13:09:42:072 EST] 00000056 SystemErr R at com.ibm.jsse2.gb.a(gb.java:95)
[2/11/13 13:09:42:072 EST] 00000056 SystemErr R at com.ibm.jsse2.hb.a(hb.java:418)
[2/11/13 13:09:42:072 EST] 00000056 SystemErr R at com.ibm.jsse2.hb.a(hb.java:56)
[2/11/13 13:09:42:072 EST] 00000056 SystemErr R at com.ibm.jsse2.gb.n(gb.java:307)
[2/11/13 13:09:42:072 EST] 00000056 SystemErr R at com.ibm.jsse2.gb.a(gb.java:181)
[2/11/13 13:09:42:072 EST] 00000056 SystemErr R at com.ibm.jsse2.tc.a(tc.java:468)
[2/11/13 13:09:42:072 EST] 00000056 SystemErr R at com.ibm.jsse2.tc.g(tc.java:208)
[2/11/13 13:09:42:072 EST] 00000056 SystemErr R at com.ibm.jsse2.tc.a(tc.java:482)
[2/11/13 13:09:42:072 EST] 00000056 SystemErr R at com.ibm.jsse2.tc.startHandshake(tc.java:597)
[2/11/13 13:09:42:072 EST] 00000056 SystemErr R 在 com.ibm.net.ssl.www2.protocol.https.c.afterConnect(c.java:44)
[2/11/13 13:09:42:072 EST] com.ibm.net.ssl.www2.protocol.https.d.connect(d.java:36) 上的 00000056 SystemErr R
[2/11/13 13:09:42:072 EST] 00000056 SystemErr R 在 sun.net.www.protocol.http.HttpURLConnection.getOutputStream(HttpURLConnection.java:1024)
[2/11/13 13:09:42:072 EST] 00000056 SystemErr R 在 com.ibm.net.ssl.www2.protocol.https.b.getOutputStream(b.java:66)
[2/11/13 13:09:42:072 EST] 00000056 SystemErr R 在 com.google.gdata.client.GoogleAuthTokenFactory.makePostRequest(GoogleAuthTokenFactory.java:611)
[2/11/13 13:09:42:072 EST] 00000056 SystemErr R 在 com.google.gdata.client.GoogleAuthTokenFactory.getAuthToken(GoogleAuthTokenFactory.java:547)
[2/11/13 13:09:42:072 EST] 00000056 SystemErr R ... 29 更多
[2/11/13 13:09:42:072 EST] 00000056 SystemErr R 原因:com.ibm.jsse2.util.g:PKIX 路径构建失败:java.security.cert.CertPathBuilderException:PKIXCertPathBuilderImpl 无法构建有效证书路径。内因是:
    java.security.cert.CertPathValidatorException: OU=Equifax Secure Certificate Authority, O=Equifax, C=US 颁发的证书不受信任;内因是:
    java.security.cert.CertPathValidatorException:证书链接错误
[2/11/13 13:09:42:103 EST] 00000056 SystemErr R at com.ibm.jsse2.util.eb(e.java:45)
[2/11/13 13:09:42:103 EST] 00000056 SystemErr R at com.ibm.jsse2.util.eb(e.java:106)
[2/11/13 13:09:42:103 EST] 00000056 SystemErr R at com.ibm.jsse2.util.da(d.java:5)
[2/11/13 13:09:42:103 EST] 00000056 SystemErr R at com.ibm.jsse2.hc.a(hc.java:61)
[2/11/13 13:09:42:103 EST] 00000056 SystemErr R 在 com.ibm.jsse2.hc.checkServerTrusted(hc.java:10)
[2/11/13 13:09:42:103 EST] 00000056 SystemErr R 在 com.ibm.ws.ssl.core.WSX509TrustManager.checkServerTrusted(WSX509TrustManager.java:310)
[2/11/13 13:09:42:103 EST] 00000056 SystemErr R at com.ibm.jsse2.hb.a(hb.java:103)
[2/11/13 13:09:42:103 EST] 00000056 SystemErr R ... 42 更多
[2/11/13 13:09:42:103 EST] 00000056 SystemErr R 原因:java.security.cert.CertPathBuilderException:PKIXCertPathBuilderImpl 无法构建有效的 CertPath。;内因是:
    java.security.cert.CertPathValidatorException: OU=Equifax Secure Certificate Authority, O=Equifax, C=US 颁发的证书不受信任;内因是:
    java.security.cert.CertPathValidatorException:证书链接错误
[2/11/13 13:09:42:103 EST] 00000056 SystemErr R 在 com.ibm.security.cert.PKIXCertPathBuilderImpl.engineBuild(PKIXCertPathBuilderImpl.java:411)
[2/11/13 13:09:42:103 EST] 00000056 SystemErr R at java.security.cert.CertPathBuilder.build(CertPathBuilder.java:258)
[2/11/13 13:09:42:103 EST] 00000056 SystemErr R at com.ibm.jsse2.util.eb(e.java:70)
[2/11/13 13:09:42:103 EST] 00000056 SystemErr R ... 还有 48 个
[2/11/13 13:09:42:103 EST] 00000056 SystemErr R 原因:java.security.cert.CertPathValidatorException:OU=Equifax Secure Certificate Authority、O=Equifax、C=US 颁发的证书不受信任; 内因是:
    java.security.cert.CertPathValidatorException:证书链接错误
[2/11/13 13:09:42:103 EST] 00000056 SystemErr R 在 com.ibm.security.cert.BasicChecker.(BasicChecker.java:111)
[2/11/13 13:09:42:103 EST] 00000056 SystemErr R 在 com.ibm.security.cert.PKIXCertPathValidatorImpl.engineValidate(PKIXCertPathValidatorImpl.java:176)
[2/11/13 13:09:42:103 EST] 00000056 SystemErr R 在 com.ibm.security.cert.PKIXCertPathBuilderImpl.myValidator(PKIXCertPathBuilderImpl.java:737)
[2/11/13 13:09:42:103 EST] 00000056 SystemErr R 在 com.ibm.security.cert.PKIXCertPathBuilderImpl.buildCertPath(PKIXCertPathBuilderImpl.java:649)
[2/11/13 13:09:42:103 EST] 00000056 SystemErr R 在 com.ibm.security.cert.PKIXCertPathBuilderImpl.buildCertPath(PKIXCertPathBuilderImpl.java:595)
[2/11/13 13:09:42:103 EST] 00000056 SystemErr R 在 com.ibm.security.cert.PKIXCertPathBuilderImpl.engineBuild(PKIXCertPathBuilderImpl.java:357)
[2/11/13 13:09:42:103 EST] 00000056 SystemErr R ... 50 更多
[2/11/13 13:09:42:103 EST] 00000056 SystemErr R 原因:java.security.cert.CertPathValidatorException:证书链接错误
[2/11/13 13:09:42:103 EST] 00000056 SystemErr R 在 com.ibm.security.cert.CertPathUtil.findIssuer(CertPathUtil.java:298)
[2/11/13 13:09:42:103 EST] 00000056 SystemErr R 在 com.ibm.security.cert.BasicChecker.(BasicChecker.java:108)
[2/11/13 13:09:42:103 EST] 00000056 SystemErr R ... 55 更多

任何想法、帮助或建议将不胜感激。

4

0 回答 0