JTwitter icon indicating copy to clipboard operation
JTwitter copied to clipboard

Run jtwitter.jar can not work

Open CharmyCoder opened this issue 8 years ago • 2 comments

Command Line: java -jar jtwitter.jar {username} {password} tweet Console Display:

Exception in thread "main" 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:317) at winterwell.jtwitter.URLConnectionHttpClient.post(URLConnectionHttpClient.java:392) at winterwell.jtwitter.Twitter.updateStatus(Twitter.java:2910) at winterwell.jtwitter.Twitter.updateStatus(Twitter.java:2845) at winterwell.jtwitter.Twitter.setStatus(Twitter.java:2633) at winterwell.jtwitter.Twitter.main(Twitter.java:719) 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 sun.security.ssl.Alerts.getSSLException(Alerts.java:192) at sun.security.ssl.SSLSocketImpl.fatal(SSLSocketImpl.java:1949) at sun.security.ssl.Handshaker.fatalSE(Handshaker.java:302) at sun.security.ssl.Handshaker.fatalSE(Handshaker.java:296) at sun.security.ssl.ClientHandshaker.serverCertificate(ClientHandshaker.java:1514) at sun.security.ssl.ClientHandshaker.processMessage(ClientHandshaker.java:216) at sun.security.ssl.Handshaker.processLoop(Handshaker.java:1026) at sun.security.ssl.Handshaker.process_record(Handshaker.java:961) at sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:1062) at sun.security.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1375) at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1403) at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1387) at sun.net.www.protocol.https.HttpsClient.afterConnect(HttpsClient.java:559) at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.java:185) at sun.net.www.protocol.http.HttpURLConnection.getOutputStream0(HttpURLConnection.java:1316) at sun.net.www.protocol.http.HttpURLConnection.getOutputStream(HttpURLConnection.java:1291) at sun.net.www.protocol.https.HttpsURLConnectionImpl.getOutputStream(HttpsURLConnectionImpl.java:250) at winterwell.jtwitter.URLConnectionHttpClient.post2_connect(URLConnectionHttpClient.java:432) at winterwell.jtwitter.URLConnectionHttpClient.post2(URLConnectionHttpClient.java:402) at winterwell.jtwitter.URLConnectionHttpClient.post(URLConnectionHttpClient.java:370) ... 4 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:387) at sun.security.validator.PKIXValidator.engineValidate(PKIXValidator.java:292) at sun.security.validator.Validator.validate(Validator.java:260) at sun.security.ssl.X509TrustManagerImpl.validate(X509TrustManagerImpl.java:324) at sun.security.ssl.X509TrustManagerImpl.checkTrusted(X509TrustManagerImpl.java:229) at sun.security.ssl.X509TrustManagerImpl.checkServerTrusted(X509TrustManagerImpl.java:124) at sun.security.ssl.ClientHandshaker.serverCertificate(ClientHandshaker.java:1496) ... 19 more Caused by: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target at sun.security.provider.certpath.SunCertPathBuilder.build(SunCertPathBuilder.java:141) at sun.security.provider.certpath.SunCertPathBuilder.engineBuild(SunCertPathBuilder.java:126) at java.security.cert.CertPathBuilder.build(CertPathBuilder.java:280) at sun.security.validator.PKIXValidator.doBuild(PKIXValidator.java:382) ... 25 more

CharmyCoder avatar May 15 '17 05:05 CharmyCoder

I have a glimpse of your source code. It was not https request, so we can not use it access Twitter API at this monment. Because Twitter Server degree the secure authenticate. Does it right?

CharmyCoder avatar May 15 '17 07:05 CharmyCoder

Hello

That method is out of date. Sorry. Twitter no longer support password based API. It has to be oauth, which can't be done from the command line.

Daniel

On 15 May 2017 08:31, "Mr.Hacker" [email protected] wrote:

I have a glimpse of your source code. It was not https request, so we can not use it access Twitter API at this monment. Because Twitter Server degree the secure authenticate. Does it right?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/winterstein/JTwitter/issues/10#issuecomment-301398071, or mute the thread https://github.com/notifications/unsubscribe-auth/AAPmsNLy4uIYJQENE0ZQq3vtmP5cdbypks5r5_9UgaJpZM4NasHv .

winterstein avatar May 15 '17 07:05 winterstein