Exception in thread "Thread-0" java.lang.NullPointerException
 at org.apache.http.impl.nio.reactor.AbstractIOReactor.closeActiveChannels(AbstractIOReactor.java:532)
 at org.apache.http.impl.nio.reactor.AbstractIOReactor.hardShutdown(AbstractIOReactor.java:564)
 at org.apache.http.impl.nio.reactor.AbstractMultiworkerIOReactor.doShutdown(AbstractMultiworkerIOReactor.java:411)
 at org.apache.http.impl.nio.reactor.AbstractMultiworkerIOReactor.execute(AbstractMultiworkerIOReactor.java:340)
 at com.***.clawer.Clawer$1.run(Clawer.java:81)
 at java.lang.Thread.run(Unknown Source)
    Exception in thread "Thread-1" java.lang.IllegalStateException: I/O reactor has been shut down
 at org.apache.http.impl.nio.reactor.DefaultConnectingIOReactor.connect(DefaultConnectingIOReactor.java:190)
 at com.***.clawer.Run.run(Run.java:29)
views:
55answers:
2
                
                A: 
                
                
              You're using a NIO Reactor that is closed by the time you try to use it ( connect to it )
See:
java.lang.IllegalStateException: I/O reactor has been shut down
                  OscarRyz
                   2010-03-08 02:38:22
                
              Possible, but before that, a NullPointerException occurs during doShutdown.
                  Thilo
                   2010-03-08 02:42:54
                I think the worker thread stopped caused this exception, but i do not know why.
                  bruce dou
                   2010-03-09 02:30:31
                @Thilo: Yes, during the shutdown, the method `AbstractIOReactor.closeActiveChannels` tries to close the reactor but it is null because that is already closed. That's the root cause.
                  OscarRyz
                   2010-03-12 01:40:24
                
                
                A: 
                
                
              
            I had a look at the code, and I think that NPE is happening because getSession() is returning null.
                  Stephen C
                   2010-03-08 07:06:10