1. 程式人生 > >求解答新浪微博api報錯

求解答新浪微博api報錯

Caused by: javax.net.ssl.SSLKeyException: RSA premaster secret error
	at sun.security.ssl.RSAClientKeyExchange.<init>(RSAClientKeyExchange.java:114)
	at sun.security.ssl.ClientHandshaker.serverHelloDone(ClientHandshaker.java:812)
	at sun.security.ssl.ClientHandshaker.processMessage(ClientHandshaker.java:282)
	at sun.security.ssl.Handshaker.processLoop(Handshaker.java:868)
	at sun.security.ssl.Handshaker.process_record(Handshaker.java:804)
	at sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:966)
	at sun.security.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1262)
	at sun.security.ssl.SSLSocketImpl.writeRecord(SSLSocketImpl.java:680)
	at sun.security.ssl.AppOutputStream.write(AppOutputStream.java:85)
	at java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:82)
	at java.io.BufferedOutputStream.flush(BufferedOutputStream.java:140)
	at org.apache.commons.httpclient.methods.EntityEnclosingMethod.writeRequestBody(EntityEnclosingMethod.java:506)
	at org.apache.commons.httpclient.HttpMethodBase.writeRequest(HttpMethodBase.java:2114)
	at org.apache.commons.httpclient.HttpMethodBase.execute(HttpMethodBase.java:1096)
	at org.apache.commons.httpclient.HttpMethodDirector.executeWithRetry(HttpMethodDirector.java:398)
	at org.apache.commons.httpclient.HttpMethodDirector.executeMethod(HttpMethodDirector.java:171)
	at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:397)
	at org.apache.commons.httpclient.HttpClient.executeMethod(HttpClient.java:323)
	at weibo4j.http.HttpClient.httpRequest(HttpClient.java:397)
	... 81 more
Caused by: java.security.NoSuchAlgorithmException: SunTlsRsaPremasterSecret KeyGenerator not available
	at javax.crypto.KeyGenerator.<init>(KeyGenerator.java:158)
	at javax.crypto.KeyGenerator.getInstance(KeyGenerator.java:207)
	at sun.security.ssl.JsseJce.getKeyGenerator(JsseJce.java:267)
	at sun.security.ssl.RSAClientKeyExchange.<init>(RSAClientKeyExchange.java:105)
	... 99 more
在本地執行獲取access_token的時候不會報錯,但是在貓裡面包這樣的錯,求解?