java - Twitter4j: getUserTimeline method sometimes returns http status code 405 when I call user timeline api continuously -


i trying recent 1000 tweets of 2000 twitter users using rest api's getusertimeline() method. works fine of times times stops executing returning http status code 405. respose code follows

failed timeline: server returned http response code: 405 url:   https://api.twitter.com/1.1/application/rate_limit_status.json?include_entities=1&include_rts=1 

the full stack trace is:

server returned http response code: 405 url: https://api.twitter.com/1.1/application/rate_limit_status.json?include_entities=1&include_rts=1     relevant discussions can found on internet at:             http://www.google.co.jp/search?q=f68ccb24 or             http://www.google.co.jp/search?q=6c2d1c77     twitterexception{exceptioncode=[f68ccb24-6c2d1c77 8612d0f1-19766e3f 8612d0f1-19766e30], statuscode=-1, message=null, code=-1, retryafter=-1, ratelimitstatus=null, version=3.0.6-snapshot(build: afd755d42f0c2fd7a2a87cedf1e91e123de2d754)}             @ twitter4j.internal.http.httpclientimpl.request(httpclientimpl.java:177)             @ twitter4j.internal.http.httpclientwrapper.request(httpclientwrapper.java:61)             @ twitter4j.internal.http.httpclientwrapper.get(httpclientwrapper.java:89)             @ twitter4j.twitterimpl.get(twitterimpl.java:1987)             @ twitter4j.twitterimpl.getratelimitstatus(twitterimpl.java:1901)             @ com.twitter4j.search.getusertimeline.main(getusertimeline.java:97)             @ sun.reflect.nativemethodaccessorimpl.invoke0(native method)             @ sun.reflect.nativemethodaccessorimpl.invoke(nativemethodaccessorimpl.java:57)             @ sun.reflect.delegatingmethodaccessorimpl.invoke(delegatingmethodaccessorimpl.java:43)             @ java.lang.reflect.method.invoke(method.java:606)             @ org.eclipse.jdt.internal.jarinjarloader.jarrsrcloader.main(jarrsrcloader.java:58)     caused by: java.io.ioexception: server returned http response code: 405 url: https://api.twitter.com/1.1/application/rate_limit_status.json?include_entities=1&include_rts=1             @ sun.reflect.nativeconstructoraccessorimpl.newinstance0(native method)             @ sun.reflect.nativeconstructoraccessorimpl.newinstance(nativeconstructoraccessorimpl.java:57)             @ sun.reflect.delegatingconstructoraccessorimpl.newinstance(delegatingconstructoraccessorimpl.java:45)             @ java.lang.reflect.constructor.newinstance(constructor.java:526)             @ sun.net.www.protocol.http.httpurlconnection$6.run(httpurlconnection.java:1674)             @ sun.net.www.protocol.http.httpurlconnection$6.run(httpurlconnection.java:1672)             @ java.security.accesscontroller.doprivileged(native method)             @ sun.net.www.protocol.http.httpurlconnection.getchainedexception(httpurlconnection.java:1670)             @ sun.net.www.protocol.http.httpurlconnection.getinputstream(httpurlconnection.java:1243)             @ sun.net.www.protocol.https.httpsurlconnectionimpl.getinputstream(httpsurlconnectionimpl.java:254)             @ twitter4j.internal.http.httpresponseimpl.<init>(httpresponseimpl.java:50)             @ twitter4j.internal.http.httpclientimpl.request(httpclientimpl.java:141)             ... 10 more     caused by: java.io.ioexception: server returned http response code: 405 url: https://api.twitter.com/1.1/application/rate_limit_status.json?include_entities=1&include_rts=1             @ sun.net.www.protocol.http.httpurlconnection.getinputstream(httpurlconnection.java:1625)             @ java.net.httpurlconnection.getresponsecode(httpurlconnection.java:468)             @ sun.net.www.protocol.https.httpsurlconnectionimpl.getresponsecode(httpsurlconnectionimpl.java:338)             @ twitter4j.internal.http.httpresponseimpl.<init>(httpresponseimpl.java:35)             ... 11 more     failed timeline: server returned http response code: 405 url: https://api.twitter.com/1.1/application/rate_limit_status.json?include_entities=1&include_rts=1 


Comments

Popular posts from this blog

java - Intellij Synchronizing output directories .. -

git - Initial Commit: "fatal: could not create leading directories of ..." -