Abhijith12 / linkedin-j

Automatically exported from code.google.com/p/linkedin-j
0 stars 0 forks source link

Authentication problem: unable to find valid certification path to requested target #24

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Hi Nabeel,

I runned your application before, everything was going well.
Now, when I run it again with the same environment, there is the problem
with authentication process, with the following exception:

Fetching request token from LinkedIn...
com.google.code.linkedinapi.client.oauth.LinkedInOAuthServiceException:
oauth.signpost.exception.OAuthCommunicationException: Communication with
the service provider failed: sun.security.validator.ValidatorException:
PKIX path building failed:
sun.security.provider.certpath.SunCertPathBuilderException: unable to find
valid certification path to requested target
    at
com.google.code.linkedinapi.client.oauth.LinkedInOAuthServiceImpl.getOAuthReques
tToken(LinkedInOAuthServiceImpl.java:74)
    at
com.google.code.linkedinapi.client.examples.OAuthAuthenticationExample.processCo
mmandLine(OAuthAuthenticationExample.java:87)
    at
com.google.code.linkedinapi.client.examples.OAuthAuthenticationExample.main(OAut
hAuthenticationExample.java:58)
Caused by: oauth.signpost.exception.OAuthCommunicationException:
Communication with the service provider failed:
sun.security.validator.ValidatorException: PKIX path building failed:
sun.security.provider.certpath.SunCertPathBuilderException: unable to find
valid certification path to requested target
    at
oauth.signpost.basic.DefaultOAuthProvider.retrieveToken(DefaultOAuthProvider.jav
a:150)
    at
oauth.signpost.basic.DefaultOAuthProvider.retrieveRequestToken(DefaultOAuthProvi
der.java:66)
    at
com.google.code.linkedinapi.client.oauth.LinkedInOAuthServiceImpl.getOAuthReques
tToken(LinkedInOAuthServiceImpl.java:66)
    ... 2 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:174)
    at com.sun.net.ssl.internal.ssl.SSLSocketImpl.fatal(SSLSocketImpl.java:1611)
    at com.sun.net.ssl.internal.ssl.Handshaker.fatalSE(Handshaker.java:187)
    at com.sun.net.ssl.internal.ssl.Handshaker.fatalSE(Handshaker.java:181)
    at
com.sun.net.ssl.internal.ssl.ClientHandshaker.serverCertificate(ClientHandshaker
.java:1035)
    at
com.sun.net.ssl.internal.ssl.ClientHandshaker.processMessage(ClientHandshaker.ja
va:124)
    at com.sun.net.ssl.internal.ssl.Handshaker.processLoop(Handshaker.java:516)
    at com.sun.net.ssl.internal.ssl.Handshaker.process_record(Handshaker.java:454)
    at
com.sun.net.ssl.internal.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:884)
    at
com.sun.net.ssl.internal.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl
.java:1112)
    at
com.sun.net.ssl.internal.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:113
9)
    at
com.sun.net.ssl.internal.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:112
3)
    at sun.net.www.protocol.https.HttpsClient.afterConnect(HttpsClient.java:434)
    at
sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDe
legateHttpsURLConnection.java:166)
    at
sun.net.www.protocol.https.HttpsURLConnectionImpl.connect(HttpsURLConnectionImpl
.java:133)
    at
oauth.signpost.basic.DefaultOAuthProvider.retrieveToken(DefaultOAuthProvider.jav
a:121)
    ... 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:285)
    at sun.security.validator.PKIXValidator.engineValidate(PKIXValidator.java:191)
    at sun.security.validator.Validator.validate(Validator.java:218)
    at
com.sun.net.ssl.internal.ssl.X509TrustManagerImpl.validate(X509TrustManagerImpl.
java:126)
    at
com.sun.net.ssl.internal.ssl.X509TrustManagerImpl.checkServerTrusted(X509TrustMa
nagerImpl.java:209)
    at
com.sun.net.ssl.internal.ssl.X509TrustManagerImpl.checkServerTrusted(X509TrustMa
nagerImpl.java:249)
    at
com.sun.net.ssl.internal.ssl.ClientHandshaker.serverCertificate(ClientHandshaker
.java:1014)
    ... 15 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:174)
    at java.security.cert.CertPathBuilder.build(CertPathBuilder.java:238)
    at sun.security.validator.PKIXValidator.doBuild(PKIXValidator.java:280)
    ... 21 more

I did some research on the exception but still couldnt find the solution.
Do you have any solution or hint on the problem?

Thank you in advance,
Quyen

Original issue reported on code.google.com by thucquye...@gmail.com on 28 Feb 2010 at 5:08

GoogleCodeExporter commented 8 years ago
Could be related to a recent LinkedIn issue. See
http://developer.linkedin.com/message/3917. It has been resolved by LinkedIn. 
Please
check now to see if its working.

Thanks
Nabeel Mukhtar

Original comment by nabeelmukhtar on 1 Mar 2010 at 4:54

GoogleCodeExporter commented 8 years ago
Yes, you are right. It is working now 

Thanks,
Quyen

Original comment by thucquye...@gmail.com on 1 Mar 2010 at 6:01

GoogleCodeExporter commented 8 years ago

Original comment by nabeelmukhtar on 1 Mar 2010 at 6:42

GoogleCodeExporter commented 8 years ago
i run the linkedinj OAuthAuthenticationExample.. but i had error..
com.google.code.linkedinapi.client.oauth.LinkedInOAuthServiceException: 
oauth.signpost.exception.OAuthCommunicationException: Communication with the 
service provider failed: Server returned HTTP response code: 401 for URL: 
https://api.linkedin.com/uas/oauth/requestToken
    at com.google.code.linkedinapi.client.oauth.LinkedInOAuthServiceImpl.getOAuthRequestToken(LinkedInOAuthServiceImpl.java:159)
    at linkedapi.OAuthAuthenticationExample.processCommandLine(OAuthAuthenticationExample.java:100)
    at linkedapi.OAuthAuthenticationExample.main(OAuthAuthenticationExample.java:71)
Caused by: oauth.signpost.exception.OAuthCommunicationException: Communication 
with the service provider failed: Server returned HTTP response code: 401 for 
URL: https://api.linkedin.com/uas/oauth/requestToken
    at oauth.signpost.AbstractOAuthProvider.retrieveToken(AbstractOAuthProvider.java:214)
    at oauth.signpost.AbstractOAuthProvider.retrieveRequestToken(AbstractOAuthProvider.java:69)
    at com.google.code.linkedinapi.client.oauth.LinkedInOAuthServiceImpl.getOAuthRequestToken(LinkedInOAuthServiceImpl.java:148)
    ... 2 more
Caused by: java.io.IOException: Server returned HTTP response code: 401 for 
URL: https://api.linkedin.com/uas/oauth/requestToken
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
    at java.lang.reflect.Constructor.newInstance(Unknown Source)
    at sun.net.www.protocol.http.HttpURLConnection$6.run(Unknown Source)
    at java.security.AccessController.doPrivileged(Native Method)
    at sun.net.www.protocol.http.HttpURLConnection.getChainedException(Unknown Source)
    at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source)
    at sun.net.www.protocol.https.HttpsURLConnectionImpl.getInputStream(Unknown Source)
    at oauth.signpost.basic.HttpURLConnectionResponseAdapter.getContent(HttpURLConnectionResponseAdapter.java:18)
    at oauth.signpost.AbstractOAuthProvider.handleUnexpectedResponse(AbstractOAuthProvider.java:228)
    at oauth.signpost.AbstractOAuthProvider.retrieveToken(AbstractOAuthProvider.java:189)
    ... 4 more
Caused by: java.io.IOException: Server returned HTTP response code: 401 for 
URL: https://api.linkedin.com/uas/oauth/requestToken
    at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source)
    at java.net.HttpURLConnection.getResponseCode(Unknown Source)
    at sun.net.www.protocol.https.HttpsURLConnectionImpl.getResponseCode(Unknown Source)
    at oauth.signpost.basic.HttpURLConnectionResponseAdapter.getStatusCode(HttpURLConnectionResponseAdapter.java:22)
    at oauth.signpost.AbstractOAuthProvider.retrieveToken(AbstractOAuthProvider.java:178)
    ... 4 more

please help me.. 

Original comment by lingadur...@gmail.com on 17 Jul 2011 at 3:25

GoogleCodeExporter commented 8 years ago
i run the linkedinj OAuthAuthenticationExample.. but i had error..
com.google.code.linkedinapi.client.oauth.LinkedInOAuthServiceException: 
oauth.signpost.exception.OAuthCommunicationException: Communication with the 
service provider failed: Server returned HTTP response code: 401 for URL: 
https://api.linkedin.com/uas/oauth/requestToken
    at com.google.code.linkedinapi.client.oauth.LinkedInOAuthServiceImpl.getOAuthRequestToken(LinkedInOAuthServiceImpl.java:159)
    at linkedapi.OAuthAuthenticationExample.processCommandLine(OAuthAuthenticationExample.java:100)
    at linkedapi.OAuthAuthenticationExample.main(OAuthAuthenticationExample.java:71)
Caused by: oauth.signpost.exception.OAuthCommunicationException: Communication 
with the service provider failed: Server returned HTTP response code: 401 for 
URL: https://api.linkedin.com/uas/oauth/requestToken
    at oauth.signpost.AbstractOAuthProvider.retrieveToken(AbstractOAuthProvider.java:214)
    at oauth.signpost.AbstractOAuthProvider.retrieveRequestToken(AbstractOAuthProvider.java:69)
    at com.google.code.linkedinapi.client.oauth.LinkedInOAuthServiceImpl.getOAuthRequestToken(LinkedInOAuthServiceImpl.java:148)
    ... 2 more
Caused by: java.io.IOException: Server returned HTTP response code: 401 for 
URL: https://api.linkedin.com/uas/oauth/requestToken
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
    at java.lang.reflect.Constructor.newInstance(Unknown Source)
    at sun.net.www.protocol.http.HttpURLConnection$6.run(Unknown Source)
    at java.security.AccessController.doPrivileged(Native Method)
    at sun.net.www.protocol.http.HttpURLConnection.getChainedException(Unknown Source)
    at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source)
    at sun.net.www.protocol.https.HttpsURLConnectionImpl.getInputStream(Unknown Source)
    at oauth.signpost.basic.HttpURLConnectionResponseAdapter.getContent(HttpURLConnectionResponseAdapter.java:18)
    at oauth.signpost.AbstractOAuthProvider.handleUnexpectedResponse(AbstractOAuthProvider.java:228)
    at oauth.signpost.AbstractOAuthProvider.retrieveToken(AbstractOAuthProvider.java:189)
    ... 4 more
Caused by: java.io.IOException: Server returned HTTP response code: 401 for 
URL: https://api.linkedin.com/uas/oauth/requestToken
    at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source)
    at java.net.HttpURLConnection.getResponseCode(Unknown Source)
    at sun.net.www.protocol.https.HttpsURLConnectionImpl.getResponseCode(Unknown Source)
    at oauth.signpost.basic.HttpURLConnectionResponseAdapter.getStatusCode(HttpURLConnectionResponseAdapter.java:22)
    at oauth.signpost.AbstractOAuthProvider.retrieveToken(AbstractOAuthProvider.java:178)
    ... 4 more

please help me.. 

Original comment by lingadur...@gmail.com on 17 Jul 2011 at 3:26

Attachments: