2010-03-08 89 views
-1
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) 
+2

發佈你的調用這個代碼可能是有用的 – 2010-03-08 02:24:39

+0

I/O錯誤:I/O調度工作異常終止 線程「Thread-1」中的異常java.lang.IllegalStateException:I/O reactor已被關閉 \t at org.apache.http.impl.nio.reactor.DefaultConnectingIOReactor.connect(DefaultConnectingIOReactor.java:190) – 2010-03-09 07:56:07

回答

0

您使用的是由您嘗試使用它的時候關閉了反應堆NIO奇特異常(連接到它)

參見:

java.lang.IllegalStateException: I/O reactor has been shut down 
+0

可能的,但在此之前,在doShutdown期間發生NullPointerException。 – Thilo 2010-03-08 02:42:54

+0

我認爲工作線程停止導致這個異常,但我不知道爲什麼。 – 2010-03-09 02:30:31

+0

@Thilo:是的,在關閉過程中,AbstractIOReactor.closeActiveChannels方法試圖關閉反應堆,但它是空的,因爲它已經關閉。這是根本原因。 – OscarRyz 2010-03-12 01:40:24

0

我看看代碼,我認爲NPE正在發生,因爲getSession()返回null。