3
我的應用程序拋出這個錯誤:GAE網址提取服務爲HTTPS
[INFO] Caused by: java.lang.ClassCastException: com.google.apphosting.utils.security.urlfetch.URLFetchServiceStreamHandler$Connection cannot be cast to javax.net.ssl.HttpsURLConnection
[INFO] at info.modprobe.browserid.Verifier.verify(Verifier.java:76)
而導致錯誤的代碼是:
URL verifierURL = new URL(this.url);
String response = "";
HttpsURLConnection connection = (HttpsURLConnection) verifierURL
.openConnection(); // error here...
connection.setRequestMethod("POST");
connection.setRequestProperty("Content-Type",
"application/json; charset=utf-8");
connection.setDoOutput(true);
當嘗試使用此library做Mozilla的個人驗證。我想知道自從GAE網址提取服務支持HTTPS後會出現什麼問題。
聞起來像一個導入問題,你可以請提供該類的導入塊? – jirungaray 2015-04-06 22:18:26