swatiswati / facebook-java-api

Automatically exported from code.google.com/p/facebook-java-api
0 stars 0 forks source link

connect time out facebook api #349

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago

Hi all
i have happen. i have get token but it alway error connect time out. 
but I still connect api.facebook.com ok
please help me
FacebookJaxbRestClient client =  new FacebookJaxbRestClient(apikey, secretkey);
        String token= client.auth_createToken();//error here

error:
Exception in thread "main" java.lang.RuntimeException: 
java.net.ConnectException: Connection timed out: connect
    at com.google.code.facebookapi.BasicClientHelper.runtimeException(BasicClientHelper.java:123)
    at com.google.code.facebookapi.ExtensibleClient.callMethod(ExtensibleClient.java:538)
    at com.google.code.facebookapi.ExtensibleClient.callMethod(ExtensibleClient.java:446)
    at com.google.code.facebookapi.ExtensibleClient.auth_createToken(ExtensibleClient.java:860)
    at com.google.code.facebookapi.SpecificReturnTypeAdapter.auth_createToken(SpecificReturnTypeAdapter.java:73)
    at javaapplication1.JavaApplication1.main(JavaApplication1.java:24)
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:519)
    at java.net.Socket.connect(Socket.java:469)
    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:837)
    at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:778)
    at sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:703)
    at com.google.code.facebookapi.ExtensibleClient.postRequest(ExtensibleClient.java:583)
    at com.google.code.facebookapi.ExtensibleClient.callMethod(ExtensibleClient.java:534)

Original issue reported on code.google.com by vantub...@gmail.com on 2 Aug 2011 at 4:12

GoogleCodeExporter commented 8 years ago
Hi,

Even I am getting the same exception always...

Any idea on how to resolve this???

Thanks
Sanjeev

Original comment by sanjeev.pk on 28 Aug 2012 at 10:43

GoogleCodeExporter commented 8 years ago
package com.sanjeevkulkarni.servlets;

import java.io.IOException;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;

import com.google.code.facebookapi.FacebookJsonRestClient;
import com.google.code.facebookapi.Permission;

public class FBConnectServlet extends HttpServlet {
    private static final long serialVersionUID = 1L;

    /**
     * @see HttpServlet#HttpServlet()
     */
    public FBConnectServlet() {
        super();
    }

    /**
     * @see HttpServlet#doGet(HttpServletRequest request, HttpServletResponse response)
     */
    protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
        //checkAndAccessFB(request,response);
        String apiKey = "213960974687";//getServletConfig().getInitParameter("API_KEY");
        String secretKey = "4618d13fb9c26d26ccda7e99a221bb80";//getServletConfig().getInitParameter("SECRET_KEY");
        HttpSession session = request.getSession();
        String sessionKey = (String) session.getAttribute("restSearchAppSession");
        String authToken = request.getParameter("auth_token");
        System.out.println("Auth key ="+authToken);

        FacebookJsonRestClient client = null;
        if (sessionKey != null) {
            client = new FacebookJsonRestClient(apiKey, secretKey, sessionKey);

        } else if (authToken != null) {
            client = new FacebookJsonRestClient(apiKey, secretKey);

            try {
                sessionKey = client.auth_getSession(authToken);
                session.setAttribute("restSearchAppSession", sessionKey);

            } catch (Exception e) {
                e.printStackTrace();
            }
        } else {
            response.sendRedirect("http://www.facebook.com/login.php?api_key="+apiKey);
            return;
        }

        updateStatus(client);
        response.getWriter().println("HelloWorld");
        request.getRequestDispatcher("../main_page.jsp").forward(request, response);
    }

    private void updateStatus(FacebookJsonRestClient client) {   
        System.out.println("In status update");
        try {
            if (client.users_hasAppPermission(Permission.STATUS_UPDATE)) {
                client.users_setStatus("Developing Facebook apps in Java because the new Java client kicks the PHP client's ***!!!", false);
            }
        } catch (Exception e) {
            System.out.println("Exception in updatng the status..");
            e.printStackTrace();
        }
    }

    /**
     * @see HttpServlet#doPost(HttpServletRequest request, HttpServletResponse response)
     */
    protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
        doGet(request,response);
    }

}

-------------------------------Output-------------------------------------------
----

28 Aug, 2012 5:01:43 PM org.apache.catalina.core.AprLifecycleListener init
INFO: The APR based Apache Tomcat Native library which allows optimal 
performance in production environments was not found on the java.library.path: 
C:\Oracle\Middleware\jdk160_18\jre\bin;.;C:\Windows\Sun\Java\bin;C:\Windows\syst
em32;C:\Windows;C:/Program Files (x86)/Java/jre6/bin/client;C:/Program Files 
(x86)/Java/jre6/bin;C:/Program Files (x86)/Java/jre6/lib/i386;C:\Program Files 
(x86)\RSA SecurID Token 
Common;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System
32\WindowsPowerShell\v1.0;D:\NSNSoftwares\apache-maven-3.0.3\bin;C:\Oracle\Middl
eware\jdk160_18\bin;C:\Program Files\TortoiseSVN\bin;C:\Program 
Files\Mercurial;D:\NSNSoftwares\eclipse;
28 Aug, 2012 5:01:43 PM org.apache.tomcat.util.digester.SetPropertiesRule begin
WARNING: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting 
property 'source' to 'org.eclipse.jst.jee.server:sanjeevkulkarni' did not find 
a matching property.
28 Aug, 2012 5:01:43 PM org.apache.tomcat.util.digester.SetPropertiesRule begin
WARNING: [SetPropertiesRule]{Server/Service/Engine/Host/Context} Setting 
property 'source' to 'org.eclipse.jst.jee.server:LearningFacebook' did not find 
a matching property.
28 Aug, 2012 5:01:43 PM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["http-bio-8080"]
28 Aug, 2012 5:01:43 PM org.apache.coyote.AbstractProtocol init
INFO: Initializing ProtocolHandler ["ajp-bio-8009"]
28 Aug, 2012 5:01:43 PM org.apache.catalina.startup.Catalina load
INFO: Initialization processed in 704 ms
28 Aug, 2012 5:01:43 PM org.apache.catalina.core.StandardService startInternal
INFO: Starting service Catalina
28 Aug, 2012 5:01:43 PM org.apache.catalina.core.StandardEngine startInternal
INFO: Starting Servlet Engine: Apache Tomcat/7.0.29
28 Aug, 2012 5:01:43 PM org.apache.catalina.util.SessionIdGenerator 
createSecureRandom
INFO: Creation of SecureRandom instance for session ID generation using 
[SHA1PRNG] took [118] milliseconds.
28 Aug, 2012 5:01:44 PM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["http-bio-8080"]
28 Aug, 2012 5:01:44 PM org.apache.coyote.AbstractProtocol start
INFO: Starting ProtocolHandler ["ajp-bio-8009"]
28 Aug, 2012 5:01:44 PM org.apache.catalina.startup.Catalina start
INFO: Server startup in 1083 ms
Auth key =null
Auth key =577b6f17d36735196eed30b4ab03689a
java.lang.RuntimeException: java.net.ConnectException: Connection timed out: 
connect
    at com.google.code.facebookapi.BasicClientHelper.runtimeException(BasicClientHelper.java:110)
    at com.google.code.facebookapi.ExtensibleClient.callMethod(ExtensibleClient.java:545)
    at com.google.code.facebookapi.ExtensibleClient.callMethod(ExtensibleClient.java:471)
    at com.google.code.facebookapi.ExtensibleClient.auth_getSession(ExtensibleClient.java:337)
    at com.google.code.facebookapi.ExtensibleClient.auth_getSession(ExtensibleClient.java:328)
    at com.google.code.facebookapi.SpecificReturnTypeAdapter.auth_getSession(SpecificReturnTypeAdapter.java:81)
    at com.sanjeevkulkarni.servlets.FBConnectServlet.doGet(FBConnectServlet.java:43)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:621)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:225)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)
    at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:168)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:98)
    at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:927)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)
    at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1001)
    at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:585)
    at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:312)
    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
    at java.lang.Thread.run(Thread.java:619)
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.facebookapi.ExtensibleClient.postRequest(ExtensibleClient.java:590)
    at com.google.code.facebookapi.ExtensibleClient.callMethod(ExtensibleClient.java:541)
    ... 23 more
In status update
Exception in updatng the status..
java.lang.RuntimeException: java.net.ConnectException: Connection timed out: 
connect
    at com.google.code.facebookapi.BasicClientHelper.runtimeException(BasicClientHelper.java:110)
    at com.google.code.facebookapi.ExtensibleClient.callMethod(ExtensibleClient.java:545)
    at com.google.code.facebookapi.ExtensibleClient.callMethod(ExtensibleClient.java:457)
    at com.google.code.facebookapi.ExtensibleClient.users_hasAppPermission(ExtensibleClient.java:1128)
    at com.google.code.facebookapi.ExtensibleClient.users_hasAppPermission(ExtensibleClient.java:1120)
    at com.google.code.facebookapi.SpecificReturnTypeAdapter.users_hasAppPermission(SpecificReturnTypeAdapter.java:583)
    at com.sanjeevkulkarni.servlets.FBConnectServlet.updateStatus(FBConnectServlet.java:62)
    at com.sanjeevkulkarni.servlets.FBConnectServlet.doGet(FBConnectServlet.java:54)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:621)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:225)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)
    at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:168)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:98)
    at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:927)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)
    at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1001)
    at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:585)
    at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:312)
    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
    at java.lang.Thread.run(Thread.java:619)
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.facebookapi.ExtensibleClient.postRequest(ExtensibleClient.java:590)
    at com.google.code.facebookapi.ExtensibleClient.callMethod(ExtensibleClient.java:541)
    ... 24 more
Auth key =null
Auth key =e3b6830cdb39e5adfc5cdade7ce4f32a
java.lang.RuntimeException: java.net.ConnectException: Connection timed out: 
connect
    at com.google.code.facebookapi.BasicClientHelper.runtimeException(BasicClientHelper.java:110)
    at com.google.code.facebookapi.ExtensibleClient.callMethod(ExtensibleClient.java:545)
    at com.google.code.facebookapi.ExtensibleClient.callMethod(ExtensibleClient.java:471)
    at com.google.code.facebookapi.ExtensibleClient.auth_getSession(ExtensibleClient.java:337)
    at com.google.code.facebookapi.ExtensibleClient.auth_getSession(ExtensibleClient.java:328)
    at com.google.code.facebookapi.SpecificReturnTypeAdapter.auth_getSession(SpecificReturnTypeAdapter.java:81)
    at com.sanjeevkulkarni.servlets.FBConnectServlet.doGet(FBConnectServlet.java:43)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:621)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:225)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)
    at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:168)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:98)
    at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:927)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)
    at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1001)
    at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:585)
    at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:312)
    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
    at java.lang.Thread.run(Thread.java:619)
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.facebookapi.ExtensibleClient.postRequest(ExtensibleClient.java:590)
    at com.google.code.facebookapi.ExtensibleClient.callMethod(ExtensibleClient.java:541)
    ... 23 more
In status update
Exception in updatng the status..
java.lang.RuntimeException: java.net.ConnectException: Connection timed out: 
connect
    at com.google.code.facebookapi.BasicClientHelper.runtimeException(BasicClientHelper.java:110)
    at com.google.code.facebookapi.ExtensibleClient.callMethod(ExtensibleClient.java:545)
    at com.google.code.facebookapi.ExtensibleClient.callMethod(ExtensibleClient.java:457)
    at com.google.code.facebookapi.ExtensibleClient.users_hasAppPermission(ExtensibleClient.java:1128)
    at com.google.code.facebookapi.ExtensibleClient.users_hasAppPermission(ExtensibleClient.java:1120)
    at com.google.code.facebookapi.SpecificReturnTypeAdapter.users_hasAppPermission(SpecificReturnTypeAdapter.java:583)
    at com.sanjeevkulkarni.servlets.FBConnectServlet.updateStatus(FBConnectServlet.java:62)
    at com.sanjeevkulkarni.servlets.FBConnectServlet.doGet(FBConnectServlet.java:54)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:621)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:225)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)
    at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:168)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:98)
    at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:927)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)
    at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1001)
    at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:585)
    at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:312)
    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
    at java.lang.Thread.run(Thread.java:619)
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.facebookapi.ExtensibleClient.postRequest(ExtensibleClient.java:590)
    at com.google.code.facebookapi.ExtensibleClient.callMethod(ExtensibleClient.java:541)
    ... 24 more
Auth key =577b6f17d36735196eed30b4ab03689a
java.lang.RuntimeException: java.net.ConnectException: Connection timed out: 
connect
    at com.google.code.facebookapi.BasicClientHelper.runtimeException(BasicClientHelper.java:110)
    at com.google.code.facebookapi.ExtensibleClient.callMethod(ExtensibleClient.java:545)
    at com.google.code.facebookapi.ExtensibleClient.callMethod(ExtensibleClient.java:471)
    at com.google.code.facebookapi.ExtensibleClient.auth_getSession(ExtensibleClient.java:337)
    at com.google.code.facebookapi.ExtensibleClient.auth_getSession(ExtensibleClient.java:328)
    at com.google.code.facebookapi.SpecificReturnTypeAdapter.auth_getSession(SpecificReturnTypeAdapter.java:81)
    at com.sanjeevkulkarni.servlets.FBConnectServlet.doGet(FBConnectServlet.java:43)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:621)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:225)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)
    at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:168)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:98)
    at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:927)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)
    at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1001)
    at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:585)
    at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:310)
    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
    at java.lang.Thread.run(Thread.java:619)
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.facebookapi.ExtensibleClient.postRequest(ExtensibleClient.java:590)
    at com.google.code.facebookapi.ExtensibleClient.callMethod(ExtensibleClient.java:541)
    ... 23 more
In status update
Exception in updatng the status..
java.lang.RuntimeException: java.net.ConnectException: Connection timed out: 
connect
    at com.google.code.facebookapi.BasicClientHelper.runtimeException(BasicClientHelper.java:110)
    at com.google.code.facebookapi.ExtensibleClient.callMethod(ExtensibleClient.java:545)
    at com.google.code.facebookapi.ExtensibleClient.callMethod(ExtensibleClient.java:457)
    at com.google.code.facebookapi.ExtensibleClient.users_hasAppPermission(ExtensibleClient.java:1128)
    at com.google.code.facebookapi.ExtensibleClient.users_hasAppPermission(ExtensibleClient.java:1120)
    at com.google.code.facebookapi.SpecificReturnTypeAdapter.users_hasAppPermission(SpecificReturnTypeAdapter.java:583)
    at com.sanjeevkulkarni.servlets.FBConnectServlet.updateStatus(FBConnectServlet.java:62)
    at com.sanjeevkulkarni.servlets.FBConnectServlet.doGet(FBConnectServlet.java:54)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:621)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:225)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)
    at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:168)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:98)
    at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:927)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)
    at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1001)
    at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:585)
    at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:310)
    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
    at java.lang.Thread.run(Thread.java:619)
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.facebookapi.ExtensibleClient.postRequest(ExtensibleClient.java:590)
    at com.google.code.facebookapi.ExtensibleClient.callMethod(ExtensibleClient.java:541)
    ... 24 more

Original comment by sanjeev.pk on 28 Aug 2012 at 11:41

GoogleCodeExporter commented 8 years ago
Hi Is there anyone who can reply for this issue???

Original comment by sanjeev.pk on 30 Aug 2012 at 7:12