2012-08-24 320 views
1

問題描述問題com.google.gdata.util.ResourceNotFoundException:與谷歌分析

未找到我使用谷歌分析作秀訪問/跳出率的網站。在昨天功能正常工作。但現在我得到一個錯誤

com.google.gdata.util.ResourceNotFoundException: Not Found 
<!DOCTYPE html> 
<html lang=en> 
    <meta charset=utf-8> 
    <meta name=viewport content="initial-scale=1, minimum-scale=1, width=device-width"> 
    <title>Error 404 (Not Found)!!1</title> 
    <style> 
    *{margin:0;padding:0}html,code{font:15px/22px arial,sans-serif}html{background:#fff;color:#222;padding:15px}body{margin:7% auto 0;max-width:390px;min-height:180px;padding:30px 0 15px}* > body{background:url(//www.google.com/images/errors/robot.png) 100% 5px no-repeat;padding-right:205px}p{margin:11px 0 22px;overflow:hidden}ins{color:#777;text-decoration:none}a img{border:0}@media screen and (max-width:772px){body{background:none;margin-top:0;max-width:none;padding-right:0}} 
    </style> 
    <a href=//www.google.com/><img src=//www.google.com/images/errors/logo_sm.gif alt=Google></a> 
    <p><b>404.</b> <ins>That’s an error.</ins> 
    <p>The requested URL <code>/analytics/feeds/accounts/default</code> was not found on this server. <ins>That’s all we know.</ins> 

    at com.google.gdata.client.http.HttpGDataRequest.handleErrorResponse(HttpGDataRequest.java:599) 
    at com.google.gdata.client.http.GoogleGDataRequest.handleErrorResponse(GoogleGDataRequest.java:564) 
    at com.google.gdata.client.http.HttpGDataRequest.checkResponse(HttpGDataRequest.java:560) 
    at com.google.gdata.client.http.HttpGDataRequest.execute(HttpGDataRequest.java:538) 
    at com.google.gdata.client.http.GoogleGDataRequest.execute(GoogleGDataRequest.java:536) 
    at com.google.gdata.client.Service.getFeed(Service.java:1135) 
    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 com.report.utils.GoogleAnlytics.getAvailableAccounts(GoogleAnlytics.java:41) 
    at com.report.utils.GoogleAnlytics.run(GoogleAnlytics.java:113) 
    at com.report.utils.GoogleAnlytics.main(GoogleAnlytics.java:164) 

我做

我所使用的帳戶URL

"https://www.google.com/analytics/feeds/accounts/default" 

我搜索關於互聯網上的這個問題,但找不到任何解決辦法。 什麼問題,我該如何解決?

+2

就消失了,寶貝,走了。請參閱http://stackoverflow.com/questions/12104801/gapi-account-data-url-goes-to-404 – 2012-08-24 16:18:28

回答

3

Feed已被Google關閉。請參閱Account Feed Shutdown

Data Export API v2.3 migration已完成且API已關閉。如果您的應用程序嘗試訪問帳戶Feed,它現在將收到404錯誤響應。要解決此錯誤,migrateManagement API要訪問配置數據。

+1

感謝您的回覆,我已按照給定的鏈接進行了相應的更改,如下所示https:// www .googleapis.com/analytics/v2.4/management/accounts?start-index = 1&max-results = 100&key = API_KEY和Data URL to https://www.googleapis.com/analytics/v2.4/data still i am獲取com.google.gdata.util.ParseException:[Line 1,Column 1567,element entry]找不到擴展元素http://schemas.google.com/analytics/2009:tableId。 –

+0

在做了一些Rnd之後,我得到了一個新的錯誤:com.google.gdata.util.ServiceForbiddenException:Forbidden <?xml version =「1.0」encoding =「UTF-8」?> GDatainsufficientPermissions用戶沒有執行此操作的權限我不知道代碼中出了什麼問題? –

0

關注該https://developers.google.com/analytics/devguides/config/mgmt/v2/mgmtJava變化帳戶資料網址https://www.googleapis.com/analytics/v2.4/management/accounts/~all/webproperties/~all/profiles,並且使用ManagementFeed/ManagementEntry代替AccountFeed和AccountEntry 我已經解決了我的問題:))