Hello,
Since dec 10th, I cannot sent tweets thru jtwitter anymore - I just get errors with the following stacktrace:
winterwell.jtwitter.TwitterException$IO: javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
at winterwell.jtwitter.URLConnectionHttpClient.getPage2_ex(URLConnectionHttpClient.java:294)
at
winterwell.jtwitter.URLConnectionHttpClient.post(URLConnectionHttpClient.java:369)
at winterwell.jtwitter.Twitter.updateStatus(Twitter.java:2762)
at winterwell.jtwitter.Twitter.updateStatus(Twitter.java:2694)
at winterwell.jtwitter.Twitter.setStatus(Twitter.java:2482)
... 4 more
Caused by: javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
at com.sun.net.ssl.internal.ssl.Alerts.getSSLException(Alerts.java:150)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.fatal(SSLSocketImpl.java:1584)
at com.sun.net.ssl.internal.ssl.Handshaker.fatalSE(Handshaker.java:174)
at com.sun.net.ssl.internal.ssl.Handshaker.fatalSE(Handshaker.java:168)
at com.sun.net.ssl.internal.ssl.ClientHandshaker.serverCertificate(ClientHandshaker.java:848)
at com.sun.net.ssl.internal.ssl.ClientHandshaker.processMessage(ClientHandshaker.java:106)
at com.sun.net.ssl.internal.ssl.Handshaker.processLoop(Handshaker.java:495)
at com.sun.net.ssl.internal.ssl.Handshaker.process_record(Handshaker.java:433)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:877)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1089)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1116)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1100)
at sun.net.www.protocol.https.HttpsClient.afterConnect(HttpsClient.java:402)
at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.java:166)
at sun.net.www.protocol.http.HttpURLConnection.getOutputStream(HttpURLConnection.java:883)
at sun.net.www.protocol.https.HttpsURLConnectionImpl.getOutputStream(HttpsURLConnectionImpl.java:230)
at winterwell.jtwitter.OAuthSignpostClient.post2_connect(OAuthSignpostClient.java:394)
at winterwell.jtwitter.URLConnectionHttpClient.post2(URLConnectionHttpClient.java:378)
at
winterwell.jtwitter.URLConnectionHttpClient.post(URLConnectionHttpClient.java:347)
... 7 more
Caused by: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
at sun.security.validator.PKIXValidator.doBuild(PKIXValidator.java:221)
at sun.security.validator.PKIXValidator.engineValidate(PKIXValidator.java:145)
at sun.security.validator.Validator.validate(Validator.java:203)
at com.sun.net.ssl.internal.ssl.X509TrustManagerImpl.checkServerTrusted(X509TrustManagerImpl.java:172)
at com.sun.net.ssl.internal.ssl.JsseX509TrustManager.checkServerTrusted(SSLContextImpl.java:320)
at com.sun.net.ssl.internal.ssl.ClientHandshaker.serverCertificate(ClientHandshaker.java:841)
... 21 more
Caused by: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
at sun.security.provider.certpath.SunCertPathBuilder.engineBuild(SunCertPathBuilder.java:236)
at java.security.cert.CertPathBuilder.build(CertPathBuilder.java:194)
at sun.security.validator.PKIXValidator.doBuild(PKIXValidator.java:216)
... 26 more
Before dec 10th everything worked fine.
I'm using jtwitter version 2.8.8
The code:
void sendTwitter(String accessName, String accessToken, String accessTokenSecret, String message) throws TwitterException {
OAuthSignpostClient client = new OAuthSignpostClient(
OAuthSignpostClient.JTWITTER_OAUTH_KEY,
OAuthSignpostClient.JTWITTER_OAUTH_SECRET,
accessToken,
accessTokenSecret);
Twitter jtwit = new Twitter(accessName, client);
jtwit.setStatus(message);
}
I found an article on
twitter.com telling that
api.twitter.com has changed to a new certificate on Dec 10th, 2013https://dev.twitter.com/blog/rest-api-ssl-certificate-updatesBut the information provided there doesn't really help to solve my problem.
Does anyone know how to solve this problem?
Is it maybe possible to even switch off ssl when using jtwitter?
I don't really need ssl...
Thanks for help...