3

過去数年間、Google Contacts API を使用しています。今日まで、すべてが正常に機能しているようです..突然、すべての Contacts API が、ヘッダーに正しいトークンを渡したにもかかわらず、「認証ヘッダーが見つかりません」というエラーをスローし始めました。

このエラーの完全なスタック トレースは次のとおりです。

java.lang.NullPointerException: 認証ヘッダー情報がありません| com.google.gdata.util.AuthenticationException.initFromAuthHeader(AuthenticationException.java:96)| で com.google.gdata.util.AuthenticationException.(AuthenticationException.java:67)| で com.google.gdata.client.http.HttpGDataRequest.handleErrorResponse(HttpGDataRequest.java:608)| で com.google.gdata.client.http.GoogleGDataRequest.handleErrorResponse(GoogleGDataRequest.java:564)| で com.google.gdata.client.http.HttpGDataRequest.checkResponse(HttpGDataRequest.java:560)| で com.google.gdata.client.http.HttpGDataRequest.execute(HttpGDataRequest.java:538)| で com.google.gdata.client.http.GoogleGDataRequest.execute(GoogleGDataRequest.java:536)| で com.google.gdata.client.Service.getFeed(Service.java:1135)| で com.google.gdata.client.Service で。getFeed(Service.java:1077)| com.google.gdata.client.GoogleService.getFeed(GoogleService.java:676)| で com.google.gdata.client.Service.query(Service.java:1237)| で com.google.gdata.client.Service.query(Service.java:1178)| で

誰かが同じ問題に直面していますか?? 何かを変更する必要がある場合はお知らせください..

TIA、
ヴィジャイラージ

4

1 に答える 1

1

AuthenticationException によって NPE がスローされる原因となっている認証中のエラーのようです。AuthenticationException は 2011 年 9 月に変更され、例外に認証ヘッダー情報が設定されていない場合に NPE をスローしなくなりました。

2 つのアプローチ:

  1. 使用している gdata クライアント ライブラリのバージョンはいくつですか? 2011 年 9 月に行われた修正を反映するために、より新しいものに更新できますか?

  2. どの oauth スコープを使用していますか? 認証が失敗し始めた理由を突き止めることができれば、認証を成功させて、gdata クライアント ライブラリを更新できない場合の NPE バグを回避できます。

于 2013-05-03T17:54:31.710 に答える