0
當使用的SoundCloud Java包裝的API,的SoundCloud的Java API包裝:SSLPeerUnverifiedException
ApiWrapper wrapper = new ApiWrapper("id","secret", null, null, Env.SANDBOX);
try {
wrapper.login("user", "pw"); // fail here
} catch (IOException e) {
e.printStackTrace();
}
我得到以下SSL異常錯誤:
SSLPeerUnverifiedException
完整的異常詳細信息:
javax.net.ssl.SSLPeerUnverifiedException: peer not authenticated
at com.sun.net.ssl.internal.ssl.SSLSessionImpl.getPeerCertificates(SSLSessionImpl.java:352)
at org.apache.http.conn.ssl.AbstractVerifier.verify(AbstractVerifier.java:128)
at org.apache.http.conn.ssl.SSLSocketFactory.createSocket(SSLSocketFactory.java:399)
at org.apache.http.impl.conn.DefaultClientConnectionOperator.openConnection(DefaultClientConnectionOperator.java:143)
at org.apache.http.impl.conn.AbstractPoolEntry.open(AbstractPoolEntry.java:149)
at org.apache.http.impl.conn.AbstractPooledConnAdapter.open(AbstractPooledConnAdapter.java:108)
at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:415)
at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:641)
at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:597)
at com.soundcloud.api.ApiWrapper.safeExecute(ApiWrapper.java:550)
at com.soundcloud.api.ApiWrapper.requestToken(ApiWrapper.java:266)
at com.soundcloud.api.ApiWrapper.login(ApiWrapper.java:143)
at de.voidplus.soundcloud.Sketch.setup(Sketch.java:23)
at processing.core.PApplet.handleDraw(PApplet.java:2103)
at processing.core.PGraphicsJava2D.requestDraw(PGraphicsJava2D.java:190)
at processing.core.PApplet.run(PApplet.java:2006)
at java.lang.Thread.run(Thread.java:680)
我用java-api-wrapper-1.1.2-all.jar
來處理所有的依賴關係。我用Java 1.6編譯它。我也使用processing核心庫,但它不應該是問題。
任何想法?
是啊,非常感謝!我正在學習圖書館...所以我不知道,現場模式很重要。是的,我之前看到過這個線程。現在,我刪除了所有JSON加Apache的手動類,並且我沒有麻煩地使用java-api-wrapper-1.1.2-all.jar。 –
Env.SANDBOX現已棄用 - 包裝的1.2.0版默認爲實時環境。 –
如何在android project.its中導入java-wrapper-api git項目不是庫,也不能導入到我的項目中。 –