Closed GoogleCodeExporter closed 9 years ago
Made some progress on this issue, the proxy setting was causing the issue, made
changes to include "https.proxyHost" and "https.proxyPort" now the example is
able to go further but still throwing exceptions as below
Fetching request token from LinkedIn...
Request token: 69ae115e-0da9-4b00-bd8d-79e9a11c9da0
Token secret: af7b3b0d-749e-4f5e-b6d4-a16864c059eb
Expiration time: Wed Jun 23 09:33:07 IST 2010
Now visit:
https://www.linkedin.com/uas/oauth/authorize?oauth_token=69ae115e-0da9-4b00-bd8d
-79e9a11c9da0
... and grant this app authorization
Enter the PIN code and hit ENTER when you're done:
<Entered the pin obtained>
Fetching access token from LinkedIn...
Access token: 470dbafc-eecd-4ae5-aef2-543cd9ee974e
Token secret: 38fef827-669d-48d5-9c5a-f42c0c2b6871
Fetching profile for current user.
com.google.code.linkedinapi.client.LinkedInApiClientException:
java.net.ConnectException: Connection timed out: connect
at com.google.code.linkedinapi.client.impl.BaseLinkedInApiClient.callApiMethod(BaseLinkedInApiClient.java:1251)
at com.google.code.linkedinapi.client.impl.BaseLinkedInApiClient.callApiMethod(BaseLinkedInApiClient.java:1189)
at com.google.code.linkedinapi.client.impl.BaseLinkedInApiClient.getProfileForCurrentUser(BaseLinkedInApiClient.java:789)
at com.google.code.linkedinapi.client.examples.OAuthAuthenticationExample.processCommandLine(OAuthAuthenticationExample.java:108)
at com.google.code.linkedinapi.client.examples.OAuthAuthenticationExample.main(OAuthAuthenticationExample.java:60)
Caused by: java.net.ConnectException: Connection timed out: connect
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)
at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)
at java.net.Socket.connect(Socket.java:525)
at java.net.Socket.connect(Socket.java:475)
at sun.net.NetworkClient.doConnect(NetworkClient.java:163)
at sun.net.www.http.HttpClient.openServer(HttpClient.java:394)
at sun.net.www.http.HttpClient.openServer(HttpClient.java:529)
at sun.net.www.http.HttpClient.<init>(HttpClient.java:233)
at sun.net.www.http.HttpClient.New(HttpClient.java:306)
at sun.net.www.http.HttpClient.New(HttpClient.java:323)
at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(HttpURLConnection.java:860)
at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:801)
at sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:726)
at com.google.code.linkedinapi.client.impl.BaseLinkedInApiClient.callApiMethod(BaseLinkedInApiClient.java:1238)
... 4 more
Original comment by kkvinay1...@gmail.com
on 23 Jun 2010 at 4:38
Hi Vinay.
You will also have to include "http.proxyHost" and "http.proxyPort" (note http
instead of https). This is because while authentication uses https , other apis
use http. Let me know if you still run into issues.
Regards
Nabeel Mukhtar
Original comment by nabeelmukhtar
on 24 Jun 2010 at 6:08
Hi Nabeel,
Thank you very much that solved my problem.
Regards
-Vinay
Original comment by kkvinay1...@gmail.com
on 24 Jun 2010 at 6:12
Original comment by nabeelmukhtar
on 24 Jun 2010 at 3:00
Original issue reported on code.google.com by
kkvinay1...@gmail.com
on 23 Jun 2010 at 3:48