errror while executing code

29 views
Skip to first unread message

pranay

unread,
Jun 22, 2010, 11:40:54 AM6/22/10
to Twitter4J
[Tue Jun 22 11:38:04 EDT 2010]Using class
twitter4j.internal.logging.StdOutLoggerFactory as logging factory.
[Tue Jun 22 11:38:04 EDT 2010]Use
twitter4j.internal.http.HttpClientImpl as HttpClient implementation.
Exception in thread "main" TwitterException{statusCode=400,
retryAfter=0, rateLimitStatus=RateLimitStatusJSONImpl{remainingHits=0,
hourlyLimit=150, resetTimeInSeconds=1277224, secondsUntilReset=2914,
resetTime=Tue Jun 22 12:26:56 EDT 2010}}
at twitter4j.internal.http.HttpClientImpl.request(HttpClientImpl.java:
301)
at
twitter4j.internal.http.HttpClientWrapper.request(HttpClientWrapper.java:
68)
at
twitter4j.internal.http.HttpClientWrapper.get(HttpClientWrapper.java:
90)
at twitter4j.Twitter.verifyCredentials(Twitter.java:1136)
at twitter4j.Twitter.getId(Twitter.java:181)
at twitter4j.examples.Demo.main(Demo.java:18)


can u pls explain what does it mn?.............

Iván López

unread,
Jun 23, 2010, 3:47:28 AM6/23/10
to Twitter4J
Hello,

I think the problem is that you have reached the maximum number of
request per hour. In the log you can see:

{statusCode=400, retryAfter=0,
rateLimitStatus=RateLimitStatusJSONImpl{remainingHits=0,
hourlyLimit=150, resetTimeInSeconds=1277224, secondsUntilReset=2914,
resetTime=Tue Jun 22 12:26:56 EDT 2010}}

remainingHits = 0
hourlyLimit = 150
secondsUntilReset = 2914 --> 48.5 minutes

You have to wait 48.5 minutes until the counter is reset and you have
150 hits for the next hour.

I think you should move your authentication schema to oauth and you
will have 350 hits per hour.

Regards, Iván.

pranay godha

unread,
Jun 23, 2010, 9:38:29 AM6/23/10
to twit...@googlegroups.com
Thank you Ivan. Can you tell me how can I move to authorization schema to oauth?......



--
Follow the latest updates: http://twitter.com/t4j_news
Currently Version 2.1.3 is in active development:
http://twitter4j.org/jira/secure/IssueNavigator.jspa?requestId=10030
Issue tracker: http://twitter4j.org/jira/browse/TFJ

You received this message because you are subscribed to the Google Groups "Twitter4J" group.
To post to this group, send email to twit...@googlegroups.com
To unsubscribe from this group, send email to twitter4j-...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/twitter4j?hl=en



--
PRANAY GODHA
STONY BROOK UNIVERSITY
COMPUTER SCIENCE
STUDENT ID 107533799

Iván López

unread,
Jun 24, 2010, 2:13:42 AM6/24/10
to Twitter4J
You have all the information here: http://apiwiki.twitter.com/OAuth-FAQ

pranay godha

unread,
Jun 24, 2010, 2:36:51 AM6/24/10
to twit...@googlegroups.com
thans ivan

--
Follow the latest updates: http://twitter.com/t4j_news
Currently Version 2.1.3 is in active development:
http://twitter4j.org/jira/secure/IssueNavigator.jspa?requestId=10030
Issue tracker: http://twitter4j.org/jira/browse/TFJ

You received this message because you are subscribed to the Google Groups "Twitter4J" group.
To post to this group, send email to twit...@googlegroups.com
To unsubscribe from this group, send email to twitter4j-...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/twitter4j?hl=en

pranay godha

unread,
Jun 27, 2010, 9:55:44 PM6/27/10
to twit...@googlegroups.com
Hello guys,
                 I tried to run a code and I got this error . Can anybody tell me what is this for?....

[Sun Jun 27 21:47:21 EDT 2010]Using class twitter4j.internal.logging.StdOutLoggerFactory as logging factory.
[Sun Jun 27 21:47:21 EDT 2010]Use twitter4j.internal.http.HttpClientImpl as HttpClient implementation.
Exception in thread "main" TwitterException{statusCode=-1, retryAfter=0, rateLimitStatus=null}
at twitter4j.internal.http.HttpClientImpl.request(HttpClientImpl.java:316)
at twitter4j.internal.http.HttpClientWrapper.request(HttpClientWrapper.java:68)
at twitter4j.internal.http.HttpClientWrapper.get(HttpClientWrapper.java:90)
at twitter4j.Twitter.getFriendsIDs(Twitter.java:1068)
at twitter4j.Twitter.getFriendsIDs(Twitter.java:1061)
at twitter4j.examples.Crawl.addList(Crawl.java:45)
at twitter4j.examples.Crawl.main(Crawl.java:26)
Caused by: java.net.SocketTimeoutException: connect timed out
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(Unknown Source)
at java.net.PlainSocketImpl.connectToAddress(Unknown Source)
at java.net.PlainSocketImpl.connect(Unknown Source)
at java.net.SocksSocketImpl.connect(Unknown Source)
at java.net.Socket.connect(Unknown Source)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.connect(Unknown Source)
at sun.net.NetworkClient.doConnect(Unknown Source)
at sun.net.www.http.HttpClient.openServer(Unknown Source)
at sun.net.www.http.HttpClient.openServer(Unknown Source)
at sun.net.www.protocol.https.HttpsClient.<init>(Unknown Source)
at sun.net.www.protocol.https.HttpsClient.New(Unknown Source)
at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.getNewHttpClient(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.plainConnect(Unknown Source)
at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(Unknown Source)
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 twitter4j.internal.http.HttpResponseImpl.<init>(HttpResponseImpl.java:42)
at twitter4j.internal.http.HttpClientImpl.request(HttpClientImpl.java:279)
... 6 more
Reply all
Reply to author
Forward
0 new messages