java.lang.IllegalStateException

There are no available Samebug tips for this exception. Do you have an idea how to solve this issue? A short tip would help users who saw this issue last week.

  • If I try to cancel a just created HttpClient request (eg on a input onchange search), I got the below errors. With SDK 3.4.1 I got this error: {noformat} [ERROR] : TiHttpClient: (TiHttpClient-3) [0,4790] HTTP Error (java.lang.IllegalStateException): Connection pool shut down. [ERROR] : TiHttpClient: java.lang.IllegalStateException: Connection pool shut down. [ERROR] : TiHttpClient: at org.apache.http.impl.conn.tsccm.ConnPoolByRoute.getEntryBlocking(ConnPoolByRoute.java:289) [ERROR] : TiHttpClient: at org.apache.http.impl.conn.tsccm.ConnPoolByRoute$1.getPoolEntry(ConnPoolByRoute.java:243) [ERROR] : TiHttpClient: at org.apache.http.impl.conn.tsccm.ThreadSafeClientConnManager$1.getConnection(ThreadSafeClientConnManager.java:181) [ERROR] : TiHttpClient: at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:331) [ERROR] : TiHttpClient: at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:560) [ERROR] : TiHttpClient: at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:658) [ERROR] : TiHttpClient: at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:642) [ERROR] : TiHttpClient: at ti.modules.titanium.network.TiHTTPClient$ClientRunnable.run(TiHTTPClient.java:1341) [ERROR] : TiHttpClient: at java.lang.Thread.run(Thread.java:818) {noformat} With SDK 5.0.0 instead: {noformat} [ERROR] : TiHttpClient: (TiHttpClient-7) [0,9478] HTTP Error (java.lang.NullPointerException): Attempt to invoke interface method 'int org.apache.http.StatusLine.getStatusCode()' on a null object reference [ERROR] : TiHttpClient: java.lang.NullPointerException: Attempt to invoke interface method 'int org.apache.http.StatusLine.getStatusCode()' on a null object reference [ERROR] : TiHttpClient: at ti.modules.titanium.network.TiHTTPClient$ClientRunnable.run(TiHTTPClient.java:1354) [ERROR] : TiHttpClient: at java.lang.Thread.run(Thread.java:818) {noformat} I'm pretty sure this don't happen with 3.1 or 3.2 but I can't test it at the moment. Test apps here: https://www.dropbox.com/sh/g7a7n9emtu36fzc/AADrFBNZ8UthezDd0vmKGjM1a?dl=0 Test code: {code:java} var win = Titanium.UI.createWindow({layout:'vertical', height:Titanium.UI.FILL, backgroundColor:"#FFF"}); var button = Titanium.UI.createButton({top:50,title:"create new request and cancel it after 50ms (will often throw error on logcat)"}); button.addEventListener('click', function(){ var n = Ti.Network.createHTTPClient(); n.open("GET", "http://www.google.com"); n.send(); setInterval(function(){ n.abort(); },50); }); win.add(button); win.open(); {code}
    via by carlo,
  • If I try to cancel a just created HttpClient request (eg on a input onchange search), I got the below errors. With SDK 3.4.1 I got this error: {noformat} [ERROR] : TiHttpClient: (TiHttpClient-3) [0,4790] HTTP Error (java.lang.IllegalStateException): Connection pool shut down. [ERROR] : TiHttpClient: java.lang.IllegalStateException: Connection pool shut down. [ERROR] : TiHttpClient: at org.apache.http.impl.conn.tsccm.ConnPoolByRoute.getEntryBlocking(ConnPoolByRoute.java:289) [ERROR] : TiHttpClient: at org.apache.http.impl.conn.tsccm.ConnPoolByRoute$1.getPoolEntry(ConnPoolByRoute.java:243) [ERROR] : TiHttpClient: at org.apache.http.impl.conn.tsccm.ThreadSafeClientConnManager$1.getConnection(ThreadSafeClientConnManager.java:181) [ERROR] : TiHttpClient: at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:331) [ERROR] : TiHttpClient: at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:560) [ERROR] : TiHttpClient: at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:658) [ERROR] : TiHttpClient: at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:642) [ERROR] : TiHttpClient: at ti.modules.titanium.network.TiHTTPClient$ClientRunnable.run(TiHTTPClient.java:1341) [ERROR] : TiHttpClient: at java.lang.Thread.run(Thread.java:818) {noformat} With SDK 5.0.0 instead: {noformat} [ERROR] : TiHttpClient: (TiHttpClient-7) [0,9478] HTTP Error (java.lang.NullPointerException): Attempt to invoke interface method 'int org.apache.http.StatusLine.getStatusCode()' on a null object reference [ERROR] : TiHttpClient: java.lang.NullPointerException: Attempt to invoke interface method 'int org.apache.http.StatusLine.getStatusCode()' on a null object reference [ERROR] : TiHttpClient: at ti.modules.titanium.network.TiHTTPClient$ClientRunnable.run(TiHTTPClient.java:1354) [ERROR] : TiHttpClient: at java.lang.Thread.run(Thread.java:818) {noformat} I'm pretty sure this don't happen with 3.1 or 3.2 but I can't test it at the moment. Test apps here: https://www.dropbox.com/sh/g7a7n9emtu36fzc/AADrFBNZ8UthezDd0vmKGjM1a?dl=0 Test code: {code:java} var win = Titanium.UI.createWindow({layout:'vertical', height:Titanium.UI.FILL, backgroundColor:"#FFF"}); var button = Titanium.UI.createButton({top:50,title:"create new request and cancel it after 50ms (will often throw error on logcat)"}); button.addEventListener('click', function(){ var n = Ti.Network.createHTTPClient(); n.open("GET", "http://www.google.com"); n.send(); setInterval(function(){ n.abort(); },50); }); win.add(button); win.open(); {code}
    via by carlo,
  • Trying to load the mapview in emulator or phone
    via Stack Overflow by VaaS
    ,
  • How to get JSON from URL
    via Stack Overflow by Malaika Khan
    ,
    • java.lang.IllegalStateException: Connection pool shut down. at org.apache.http.impl.conn.tsccm.ConnPoolByRoute.getEntryBlocking(ConnPoolByRoute.java:289) at org.apache.http.impl.conn.tsccm.ConnPoolByRoute$1.getPoolEntry(ConnPoolByRoute.java:243) at org.apache.http.impl.conn.tsccm.ThreadSafeClientConnManager$1.getConnection(ThreadSafeClientConnManager.java:181) at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:331) at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:560) at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:658) at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:642) at ti.modules.titanium.network.TiHTTPClient$ClientRunnable.run(TiHTTPClient.java:1341) at java.lang.Thread.run(Thread.java:818)

    Users with the same issue

    Unknown visitor
    Unknown visitor1 times, last one,
    jessejesse
    8 times, last one,
    Unknown visitor
    Unknown visitor1 times, last one,
    Unknown visitor
    Unknown visitor1 times, last one,
    adawolfsadawolfs
    1 times, last one,
    10 more bugmates