java.util.concurrent.RejectedExecutionException

DataStax JIRA | Piotr Kołaczkowski | 3 years ago
tip
Your exception is missing from the Samebug knowledge base.
Here are the best solutions we found on the Internet.
Click on the to mark the helpful solution and get rewards for you help.
  1. 0

    {noformat} import com.datastax.driver.core.Cluster; import com.datastax.driver.core.Session; public class ConnectionTest { public static void main(String[] args) throws InterruptedException { Cluster cluster = new Cluster.Builder().addContactPoint("127.0.0.1").build(); for (int i = 0; i < 10000; i++) { Session session = cluster.connect(); session.close(); } Thread.sleep(100000); cluster.close(); } } {noformat} Attach jvisualvm when this program reaches Thread.sleep call and do a heap-dump. There will be 10000 instances of SessionManager and >10000 instances of SocketChannelImpl. The program suffers connection problems during the run: {noformat} ERROR 13:40:53,510 [Control connection] Cannot connect to any host, scheduling retry ERROR 13:40:53,510 [Control connection] Cannot connect to any host, scheduling retry ERROR 13:40:53,520 [Control connection] Cannot connect to any host, scheduling retry ERROR 13:40:53,520 [Control connection] Cannot connect to any host, scheduling retry ERROR 13:40:54,521 [Control connection] Cannot connect to any host, scheduling retry in 2000 milliseconds ERROR 13:40:56,522 [Control connection] Cannot connect to any host, scheduling retry in 4000 milliseconds ERROR 13:41:00,522 [Control connection] Cannot connect to any host, scheduling retry in 8000 milliseconds ERROR 13:41:08,523 [Control connection] Cannot connect to any host, scheduling retry in 16000 milliseconds ERROR 13:41:24,523 [Control connection] Cannot connect to any host, scheduling retry in 32000 milliseconds ERROR 13:41:56,524 [Control connection] Cannot connect to any host, scheduling retry in 64000 milliseconds 10-Jul-2014 13:42:54 org.jboss.netty.channel.DefaultChannelPipeline WARNING: An exception was thrown by a user handler while handling an exception event ([id: 0x1e3e1609] EXCEPTION: java.net.BindException: Cannot assign requested address) java.util.concurrent.RejectedExecutionException at java.util.concurrent.ThreadPoolExecutor$AbortPolicy.rejectedExecution(ThreadPoolExecutor.java:1774) at java.util.concurrent.ThreadPoolExecutor.reject(ThreadPoolExecutor.java:768) at java.util.concurrent.ThreadPoolExecutor.execute(ThreadPoolExecutor.java:656) at com.google.common.util.concurrent.MoreExecutors$ListeningDecorator.execute(MoreExecutors.java:484) at java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:78) at com.google.common.util.concurrent.AbstractListeningExecutorService.submit(AbstractListeningExecutorService.java:50) at com.datastax.driver.core.Cluster$Manager.triggerOnDown(Cluster.java:1342) at com.datastax.driver.core.Cluster$Manager.signalConnectionFailure(Cluster.java:1550) at com.datastax.driver.core.Connection.defunct(Connection.java:247) at com.datastax.driver.core.Connection$Dispatcher.exceptionCaught(Connection.java:612) at org.jboss.netty.handler.codec.oneone.OneToOneDecoder.handleUpstream(OneToOneDecoder.java:60) at org.jboss.netty.handler.codec.frame.FrameDecoder.exceptionCaught(FrameDecoder.java:377) at org.jboss.netty.channel.Channels.fireExceptionCaught(Channels.java:525) at org.jboss.netty.channel.socket.nio.NioClientSocketPipelineSink.connect(NioClientSocketPipelineSink.java:131) at org.jboss.netty.channel.socket.nio.NioClientSocketPipelineSink.eventSunk(NioClientSocketPipelineSink.java:70) at org.jboss.netty.handler.codec.oneone.OneToOneEncoder.handleDownstream(OneToOneEncoder.java:54) at org.jboss.netty.handler.codec.oneone.OneToOneEncoder.handleDownstream(OneToOneEncoder.java:54) at org.jboss.netty.channel.Channels.connect(Channels.java:634) at org.jboss.netty.channel.AbstractChannel.connect(AbstractChannel.java:207) at org.jboss.netty.bootstrap.ClientBootstrap.connect(ClientBootstrap.java:229) at org.jboss.netty.bootstrap.ClientBootstrap.connect(ClientBootstrap.java:182) at com.datastax.driver.core.Connection.<init>(Connection.java:93) at com.datastax.driver.core.PooledConnection.<init>(PooledConnection.java:28) at com.datastax.driver.core.Connection$Factory.open(Connection.java:456) at com.datastax.driver.core.HostConnectionPool.<init>(HostConnectionPool.java:85) at com.datastax.driver.core.SessionManager$2.call(SessionManager.java:190) at com.datastax.driver.core.SessionManager$2.call(SessionManager.java:186) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303) at java.util.concurrent.FutureTask.run(FutureTask.java:138) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918) at java.lang.Thread.run(Thread.java:662) 10-Jul-2014 13:42:54 org.jboss.netty.channel.DefaultChannelPipeline WARNING: An exception was thrown by a user handler while handling an exception event ([id: 0x0757b1d4] EXCEPTION: java.net.BindException: Cannot assign requested address) java.util.concurrent.RejectedExecutionException at java.util.concurrent.ThreadPoolExecutor$AbortPolicy.rejectedExecution(ThreadPoolExecutor.java:1774) at java.util.concurrent.ThreadPoolExecutor.reject(ThreadPoolExecutor.java:768) at java.util.concurrent.ThreadPoolExecutor.execute(ThreadPoolExecutor.java:656) at com.google.common.util.concurrent.MoreExecutors$ListeningDecorator.execute(MoreExecutors.java:484) at java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:78) at com.google.common.util.concurrent.AbstractListeningExecutorService.submit(AbstractListeningExecutorService.java:50) at com.datastax.driver.core.Cluster$Manager.triggerOnDown(Cluster.java:1342) at com.datastax.driver.core.Cluster$Manager.signalConnectionFailure(Cluster.java:1550) at com.datastax.driver.core.Connection.defunct(Connection.java:247) at com.datastax.driver.core.Connection$Dispatcher.exceptionCaught(Connection.java:612) at org.jboss.netty.handler.codec.oneone.OneToOneDecoder.handleUpstream(OneToOneDecoder.java:60) at org.jboss.netty.handler.codec.frame.FrameDecoder.exceptionCaught(FrameDecoder.java:377) at org.jboss.netty.channel.Channels.fireExceptionCaught(Channels.java:525) at org.jboss.netty.channel.socket.nio.NioClientSocketPipelineSink.connect(NioClientSocketPipelineSink.java:131) at org.jboss.netty.channel.socket.nio.NioClientSocketPipelineSink.eventSunk(NioClientSocketPipelineSink.java:70) at org.jboss.netty.handler.codec.oneone.OneToOneEncoder.handleDownstream(OneToOneEncoder.java:54) at org.jboss.netty.handler.codec.oneone.OneToOneEncoder.handleDownstream(OneToOneEncoder.java:54) at org.jboss.netty.channel.Channels.connect(Channels.java:634) at org.jboss.netty.channel.AbstractChannel.connect(AbstractChannel.java:207) at org.jboss.netty.bootstrap.ClientBootstrap.connect(ClientBootstrap.java:229) at org.jboss.netty.bootstrap.ClientBootstrap.connect(ClientBootstrap.java:182) at com.datastax.driver.core.Connection.<init>(Connection.java:93) at com.datastax.driver.core.PooledConnection.<init>(PooledConnection.java:28) at com.datastax.driver.core.Connection$Factory.open(Connection.java:456) at com.datastax.driver.core.HostConnectionPool.<init>(HostConnectionPool.java:85) at com.datastax.driver.core.SessionManager$2.call(SessionManager.java:190) at com.datastax.driver.core.SessionManager$2.call(SessionManager.java:186) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303) at java.util.concurrent.FutureTask.run(FutureTask.java:138) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918) at java.lang.Thread.run(Thread.java:662) 10-Jul-2014 13:42:54 org.jboss.netty.channel.DefaultChannelPipeline WARNING: An exception was thrown by a user handler while handling an exception event ([id: 0x8787bc74, /127.0.0.1:50027 :> /127.0.0.1:9042] EXCEPTION: java.lang.NullPointerException) java.lang.NullPointerException at com.datastax.driver.core.HostConnectionPool.discardAvailableConnections(HostConnectionPool.java:402) at com.datastax.driver.core.HostConnectionPool.closeAsync(HostConnectionPool.java:389) at com.datastax.driver.core.PooledConnection.notifyOwnerWhenDefunct(PooledConnection.java:48) at com.datastax.driver.core.Connection.defunct(Connection.java:248) at com.datastax.driver.core.Connection$Dispatcher.exceptionCaught(Connection.java:612) at org.jboss.netty.handler.codec.oneone.OneToOneDecoder.handleUpstream(OneToOneDecoder.java:60) at org.jboss.netty.handler.codec.frame.FrameDecoder.exceptionCaught(FrameDecoder.java:377) at org.jboss.netty.channel.Channels.fireExceptionCaught(Channels.java:525) at org.jboss.netty.channel.AbstractChannelSink.exceptionCaught(AbstractChannelSink.java:48) at org.jboss.netty.handler.codec.oneone.OneToOneDecoder.handleUpstream(OneToOneDecoder.java:60) at org.jboss.netty.handler.codec.frame.FrameDecoder.cleanup(FrameDecoder.java:493) at org.jboss.netty.handler.codec.frame.FrameDecoder.channelClosed(FrameDecoder.java:371) at org.jboss.netty.channel.Channels.fireChannelClosed(Channels.java:468) at org.jboss.netty.channel.Channels$6.run(Channels.java:457) at org.jboss.netty.channel.socket.ChannelRunnableWrapper.run(ChannelRunnableWrapper.java:40) at org.jboss.netty.channel.socket.nio.AbstractNioSelector.processTaskQueue(AbstractNioSelector.java:372) at org.jboss.netty.channel.socket.nio.AbstractNioSelector.run(AbstractNioSelector.java:296) at org.jboss.netty.channel.socket.nio.AbstractNioWorker.run(AbstractNioWorker.java:89) at org.jboss.netty.channel.socket.nio.NioWorker.run(NioWorker.java:178) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918) at java.lang.Thread.run(Thread.java:662) 10-Jul-2014 13:42:54 org.jboss.netty.channel.DefaultChannelPipeline WARNING: An exception was thrown by a user handler while handling an exception event ([id: 0xdeb37992, /127.0.0.1:55446 :> /127.0.0.1:9042] EXCEPTION: java.lang.NullPointerException) java.lang.NullPointerException at com.datastax.driver.core.HostConnectionPool.discardAvailableConnections(HostConnectionPool.java:402) at com.datastax.driver.core.HostConnectionPool.closeAsync(HostConnectionPool.java:389) at com.datastax.driver.core.PooledConnection.notifyOwnerWhenDefunct(PooledConnection.java:48) at com.datastax.driver.core.Connection.defunct(Connection.java:248) at com.datastax.driver.core.Connection$Dispatcher.exceptionCaught(Connection.java:612) at org.jboss.netty.handler.codec.oneone.OneToOneDecoder.handleUpstream(OneToOneDecoder.java:60) at org.jboss.netty.handler.codec.frame.FrameDecoder.exceptionCaught(FrameDecoder.java:377) at org.jboss.netty.channel.Channels.fireExceptionCaught(Channels.java:525) at org.jboss.netty.channel.AbstractChannelSink.exceptionCaught(AbstractChannelSink.java:48) at org.jboss.netty.handler.codec.oneone.OneToOneDecoder.handleUpstream(OneToOneDecoder.java:60) at org.jboss.netty.handler.codec.frame.FrameDecoder.cleanup(FrameDecoder.java:493) at org.jboss.netty.handler.codec.frame.FrameDecoder.channelClosed(FrameDecoder.java:371) at org.jboss.netty.channel.Channels.fireChannelClosed(Channels.java:468) at org.jboss.netty.channel.Channels$6.run(Channels.java:457) at org.jboss.netty.channel.socket.ChannelRunnableWrapper.run(ChannelRunnableWrapper.java:40) at org.jboss.netty.channel.socket.nio.AbstractNioSelector.processTaskQueue(AbstractNioSelector.java:372) at org.jboss.netty.channel.socket.nio.AbstractNioSelector.run(AbstractNioSelector.java:296) at org.jboss.netty.channel.socket.nio.AbstractNioWorker.run(AbstractNioWorker.java:89) at org.jboss.netty.channel.socket.nio.NioWorker.run(NioWorker.java:178) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918) at java.lang.Thread.run(Thread.java:662) 10-Jul-2014 13:42:54 org.jboss.netty.channel.DefaultChannelPipeline WARNING: An exception was thrown by a user handler while handling an exception event ([id: 0x87e23fce, /127.0.0.1:38588 :> /127.0.0.1:9042] EXCEPTION: java.lang.NullPointerException) java.lang.NullPointerException at com.datastax.driver.core.HostConnectionPool.discardAvailableConnections(HostConnectionPool.java:402) at com.datastax.driver.core.HostConnectionPool.closeAsync(HostConnectionPool.java:389) at com.datastax.driver.core.PooledConnection.notifyOwnerWhenDefunct(PooledConnection.java:48) at com.datastax.driver.core.Connection.defunct(Connection.java:248) at com.datastax.driver.core.Connection$Dispatcher.exceptionCaught(Connection.java:612) at org.jboss.netty.handler.codec.oneone.OneToOneDecoder.handleUpstream(OneToOneDecoder.java:60) at org.jboss.netty.handler.codec.frame.FrameDecoder.exceptionCaught(FrameDecoder.java:377) at org.jboss.netty.channel.Channels.fireExceptionCaught(Channels.java:525) at org.jboss.netty.channel.AbstractChannelSink.exceptionCaught(AbstractChannelSink.java:48) at org.jboss.netty.handler.codec.oneone.OneToOneDecoder.handleUpstream(OneToOneDecoder.java:60) at org.jboss.netty.handler.codec.frame.FrameDecoder.cleanup(FrameDecoder.java:493) at org.jboss.netty.handler.codec.frame.FrameDecoder.channelClosed(FrameDecoder.java:371) at org.jboss.netty.channel.Channels.fireChannelClosed(Channels.java:468) at org.jboss.netty.channel.Channels$6.run(Channels.java:457) at org.jboss.netty.channel.socket.ChannelRunnableWrapper.run(ChannelRunnableWrapper.java:40) at org.jboss.netty.channel.socket.nio.AbstractNioSelector.processTaskQueue(AbstractNioSelector.java:372) at org.jboss.netty.channel.socket.nio.AbstractNioSelector.run(AbstractNioSelector.java:296) at org.jboss.netty.channel.socket.nio.AbstractNioWorker.run(AbstractNioWorker.java:89) at org.jboss.netty.channel.socket.nio.NioWorker.run(NioWorker.java:178) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918) at java.lang.Thread.run(Thread.java:662) 10-Jul-2014 13:42:54 org.jboss.netty.channel.DefaultChannelPipeline WARNING: An exception was thrown by a user handler while handling an exception event ([id: 0x14b239f4, /127.0.0.1:37010 :> /127.0.0.1:9042] EXCEPTION: java.lang.NullPointerException) java.lang.NullPointerException at com.datastax.driver.core.HostConnectionPool.discardAvailableConnections(HostConnectionPool.java:402) at com.datastax.driver.core.HostConnectionPool.closeAsync(HostConnectionPool.java:389) at com.datastax.driver.core.PooledConnection.notifyOwnerWhenDefunct(PooledConnection.java:48) at com.datastax.driver.core.Connection.defunct(Connection.java:248) at com.datastax.driver.core.Connection$Dispatcher.exceptionCaught(Connection.java:612) at org.jboss.netty.handler.codec.oneone.OneToOneDecoder.handleUpstream(OneToOneDecoder.java:60) at org.jboss.netty.handler.codec.frame.FrameDecoder.exceptionCaught(FrameDecoder.java:377) at org.jboss.netty.channel.Channels.fireExceptionCaught(Channels.java:525) at org.jboss.netty.channel.AbstractChannelSink.exceptionCaught(AbstractChannelSink.java:48) at org.jboss.netty.handler.codec.oneone.OneToOneDecoder.handleUpstream(OneToOneDecoder.java:60) at org.jboss.netty.handler.codec.frame.FrameDecoder.cleanup(FrameDecoder.java:493) at org.jboss.netty.handler.codec.frame.FrameDecoder.channelClosed(FrameDecoder.java:371) at org.jboss.netty.channel.Channels.fireChannelClosed(Channels.java:468) at org.jboss.netty.channel.Channels$6.run(Channels.java:457) at org.jboss.netty.channel.socket.ChannelRunnableWrapper.run(ChannelRunnableWrapper.java:40) at org.jboss.netty.channel.socket.nio.AbstractNioSelector.processTaskQueue(AbstractNioSelector.java:372) at org.jboss.netty.channel.socket.nio.AbstractNioSelector.run(AbstractNioSelector.java:296) at org.jboss.netty.channel.socket.nio.AbstractNioWorker.run(AbstractNioWorker.java:89) at org.jboss.netty.channel.socket.nio.NioWorker.run(NioWorker.java:178) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918) at java.lang.Thread.run(Thread.java:662) {noformat}

    DataStax JIRA | 3 years ago | Piotr Kołaczkowski
    java.util.concurrent.RejectedExecutionException
  2. 0

    {noformat} import com.datastax.driver.core.Cluster; import com.datastax.driver.core.Session; public class ConnectionTest { public static void main(String[] args) throws InterruptedException { Cluster cluster = new Cluster.Builder().addContactPoint("127.0.0.1").build(); for (int i = 0; i < 10000; i++) { Session session = cluster.connect(); session.close(); } Thread.sleep(100000); cluster.close(); } } {noformat} Attach jvisualvm when this program reaches Thread.sleep call and do a heap-dump. There will be 10000 instances of SessionManager and >10000 instances of SocketChannelImpl. The program suffers connection problems during the run: {noformat} ERROR 13:40:53,510 [Control connection] Cannot connect to any host, scheduling retry ERROR 13:40:53,510 [Control connection] Cannot connect to any host, scheduling retry ERROR 13:40:53,520 [Control connection] Cannot connect to any host, scheduling retry ERROR 13:40:53,520 [Control connection] Cannot connect to any host, scheduling retry ERROR 13:40:54,521 [Control connection] Cannot connect to any host, scheduling retry in 2000 milliseconds ERROR 13:40:56,522 [Control connection] Cannot connect to any host, scheduling retry in 4000 milliseconds ERROR 13:41:00,522 [Control connection] Cannot connect to any host, scheduling retry in 8000 milliseconds ERROR 13:41:08,523 [Control connection] Cannot connect to any host, scheduling retry in 16000 milliseconds ERROR 13:41:24,523 [Control connection] Cannot connect to any host, scheduling retry in 32000 milliseconds ERROR 13:41:56,524 [Control connection] Cannot connect to any host, scheduling retry in 64000 milliseconds 10-Jul-2014 13:42:54 org.jboss.netty.channel.DefaultChannelPipeline WARNING: An exception was thrown by a user handler while handling an exception event ([id: 0x1e3e1609] EXCEPTION: java.net.BindException: Cannot assign requested address) java.util.concurrent.RejectedExecutionException at java.util.concurrent.ThreadPoolExecutor$AbortPolicy.rejectedExecution(ThreadPoolExecutor.java:1774) at java.util.concurrent.ThreadPoolExecutor.reject(ThreadPoolExecutor.java:768) at java.util.concurrent.ThreadPoolExecutor.execute(ThreadPoolExecutor.java:656) at com.google.common.util.concurrent.MoreExecutors$ListeningDecorator.execute(MoreExecutors.java:484) at java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:78) at com.google.common.util.concurrent.AbstractListeningExecutorService.submit(AbstractListeningExecutorService.java:50) at com.datastax.driver.core.Cluster$Manager.triggerOnDown(Cluster.java:1342) at com.datastax.driver.core.Cluster$Manager.signalConnectionFailure(Cluster.java:1550) at com.datastax.driver.core.Connection.defunct(Connection.java:247) at com.datastax.driver.core.Connection$Dispatcher.exceptionCaught(Connection.java:612) at org.jboss.netty.handler.codec.oneone.OneToOneDecoder.handleUpstream(OneToOneDecoder.java:60) at org.jboss.netty.handler.codec.frame.FrameDecoder.exceptionCaught(FrameDecoder.java:377) at org.jboss.netty.channel.Channels.fireExceptionCaught(Channels.java:525) at org.jboss.netty.channel.socket.nio.NioClientSocketPipelineSink.connect(NioClientSocketPipelineSink.java:131) at org.jboss.netty.channel.socket.nio.NioClientSocketPipelineSink.eventSunk(NioClientSocketPipelineSink.java:70) at org.jboss.netty.handler.codec.oneone.OneToOneEncoder.handleDownstream(OneToOneEncoder.java:54) at org.jboss.netty.handler.codec.oneone.OneToOneEncoder.handleDownstream(OneToOneEncoder.java:54) at org.jboss.netty.channel.Channels.connect(Channels.java:634) at org.jboss.netty.channel.AbstractChannel.connect(AbstractChannel.java:207) at org.jboss.netty.bootstrap.ClientBootstrap.connect(ClientBootstrap.java:229) at org.jboss.netty.bootstrap.ClientBootstrap.connect(ClientBootstrap.java:182) at com.datastax.driver.core.Connection.<init>(Connection.java:93) at com.datastax.driver.core.PooledConnection.<init>(PooledConnection.java:28) at com.datastax.driver.core.Connection$Factory.open(Connection.java:456) at com.datastax.driver.core.HostConnectionPool.<init>(HostConnectionPool.java:85) at com.datastax.driver.core.SessionManager$2.call(SessionManager.java:190) at com.datastax.driver.core.SessionManager$2.call(SessionManager.java:186) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303) at java.util.concurrent.FutureTask.run(FutureTask.java:138) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918) at java.lang.Thread.run(Thread.java:662) 10-Jul-2014 13:42:54 org.jboss.netty.channel.DefaultChannelPipeline WARNING: An exception was thrown by a user handler while handling an exception event ([id: 0x0757b1d4] EXCEPTION: java.net.BindException: Cannot assign requested address) java.util.concurrent.RejectedExecutionException at java.util.concurrent.ThreadPoolExecutor$AbortPolicy.rejectedExecution(ThreadPoolExecutor.java:1774) at java.util.concurrent.ThreadPoolExecutor.reject(ThreadPoolExecutor.java:768) at java.util.concurrent.ThreadPoolExecutor.execute(ThreadPoolExecutor.java:656) at com.google.common.util.concurrent.MoreExecutors$ListeningDecorator.execute(MoreExecutors.java:484) at java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:78) at com.google.common.util.concurrent.AbstractListeningExecutorService.submit(AbstractListeningExecutorService.java:50) at com.datastax.driver.core.Cluster$Manager.triggerOnDown(Cluster.java:1342) at com.datastax.driver.core.Cluster$Manager.signalConnectionFailure(Cluster.java:1550) at com.datastax.driver.core.Connection.defunct(Connection.java:247) at com.datastax.driver.core.Connection$Dispatcher.exceptionCaught(Connection.java:612) at org.jboss.netty.handler.codec.oneone.OneToOneDecoder.handleUpstream(OneToOneDecoder.java:60) at org.jboss.netty.handler.codec.frame.FrameDecoder.exceptionCaught(FrameDecoder.java:377) at org.jboss.netty.channel.Channels.fireExceptionCaught(Channels.java:525) at org.jboss.netty.channel.socket.nio.NioClientSocketPipelineSink.connect(NioClientSocketPipelineSink.java:131) at org.jboss.netty.channel.socket.nio.NioClientSocketPipelineSink.eventSunk(NioClientSocketPipelineSink.java:70) at org.jboss.netty.handler.codec.oneone.OneToOneEncoder.handleDownstream(OneToOneEncoder.java:54) at org.jboss.netty.handler.codec.oneone.OneToOneEncoder.handleDownstream(OneToOneEncoder.java:54) at org.jboss.netty.channel.Channels.connect(Channels.java:634) at org.jboss.netty.channel.AbstractChannel.connect(AbstractChannel.java:207) at org.jboss.netty.bootstrap.ClientBootstrap.connect(ClientBootstrap.java:229) at org.jboss.netty.bootstrap.ClientBootstrap.connect(ClientBootstrap.java:182) at com.datastax.driver.core.Connection.<init>(Connection.java:93) at com.datastax.driver.core.PooledConnection.<init>(PooledConnection.java:28) at com.datastax.driver.core.Connection$Factory.open(Connection.java:456) at com.datastax.driver.core.HostConnectionPool.<init>(HostConnectionPool.java:85) at com.datastax.driver.core.SessionManager$2.call(SessionManager.java:190) at com.datastax.driver.core.SessionManager$2.call(SessionManager.java:186) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303) at java.util.concurrent.FutureTask.run(FutureTask.java:138) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918) at java.lang.Thread.run(Thread.java:662) 10-Jul-2014 13:42:54 org.jboss.netty.channel.DefaultChannelPipeline WARNING: An exception was thrown by a user handler while handling an exception event ([id: 0x8787bc74, /127.0.0.1:50027 :> /127.0.0.1:9042] EXCEPTION: java.lang.NullPointerException) java.lang.NullPointerException at com.datastax.driver.core.HostConnectionPool.discardAvailableConnections(HostConnectionPool.java:402) at com.datastax.driver.core.HostConnectionPool.closeAsync(HostConnectionPool.java:389) at com.datastax.driver.core.PooledConnection.notifyOwnerWhenDefunct(PooledConnection.java:48) at com.datastax.driver.core.Connection.defunct(Connection.java:248) at com.datastax.driver.core.Connection$Dispatcher.exceptionCaught(Connection.java:612) at org.jboss.netty.handler.codec.oneone.OneToOneDecoder.handleUpstream(OneToOneDecoder.java:60) at org.jboss.netty.handler.codec.frame.FrameDecoder.exceptionCaught(FrameDecoder.java:377) at org.jboss.netty.channel.Channels.fireExceptionCaught(Channels.java:525) at org.jboss.netty.channel.AbstractChannelSink.exceptionCaught(AbstractChannelSink.java:48) at org.jboss.netty.handler.codec.oneone.OneToOneDecoder.handleUpstream(OneToOneDecoder.java:60) at org.jboss.netty.handler.codec.frame.FrameDecoder.cleanup(FrameDecoder.java:493) at org.jboss.netty.handler.codec.frame.FrameDecoder.channelClosed(FrameDecoder.java:371) at org.jboss.netty.channel.Channels.fireChannelClosed(Channels.java:468) at org.jboss.netty.channel.Channels$6.run(Channels.java:457) at org.jboss.netty.channel.socket.ChannelRunnableWrapper.run(ChannelRunnableWrapper.java:40) at org.jboss.netty.channel.socket.nio.AbstractNioSelector.processTaskQueue(AbstractNioSelector.java:372) at org.jboss.netty.channel.socket.nio.AbstractNioSelector.run(AbstractNioSelector.java:296) at org.jboss.netty.channel.socket.nio.AbstractNioWorker.run(AbstractNioWorker.java:89) at org.jboss.netty.channel.socket.nio.NioWorker.run(NioWorker.java:178) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918) at java.lang.Thread.run(Thread.java:662) 10-Jul-2014 13:42:54 org.jboss.netty.channel.DefaultChannelPipeline WARNING: An exception was thrown by a user handler while handling an exception event ([id: 0xdeb37992, /127.0.0.1:55446 :> /127.0.0.1:9042] EXCEPTION: java.lang.NullPointerException) java.lang.NullPointerException at com.datastax.driver.core.HostConnectionPool.discardAvailableConnections(HostConnectionPool.java:402) at com.datastax.driver.core.HostConnectionPool.closeAsync(HostConnectionPool.java:389) at com.datastax.driver.core.PooledConnection.notifyOwnerWhenDefunct(PooledConnection.java:48) at com.datastax.driver.core.Connection.defunct(Connection.java:248) at com.datastax.driver.core.Connection$Dispatcher.exceptionCaught(Connection.java:612) at org.jboss.netty.handler.codec.oneone.OneToOneDecoder.handleUpstream(OneToOneDecoder.java:60) at org.jboss.netty.handler.codec.frame.FrameDecoder.exceptionCaught(FrameDecoder.java:377) at org.jboss.netty.channel.Channels.fireExceptionCaught(Channels.java:525) at org.jboss.netty.channel.AbstractChannelSink.exceptionCaught(AbstractChannelSink.java:48) at org.jboss.netty.handler.codec.oneone.OneToOneDecoder.handleUpstream(OneToOneDecoder.java:60) at org.jboss.netty.handler.codec.frame.FrameDecoder.cleanup(FrameDecoder.java:493) at org.jboss.netty.handler.codec.frame.FrameDecoder.channelClosed(FrameDecoder.java:371) at org.jboss.netty.channel.Channels.fireChannelClosed(Channels.java:468) at org.jboss.netty.channel.Channels$6.run(Channels.java:457) at org.jboss.netty.channel.socket.ChannelRunnableWrapper.run(ChannelRunnableWrapper.java:40) at org.jboss.netty.channel.socket.nio.AbstractNioSelector.processTaskQueue(AbstractNioSelector.java:372) at org.jboss.netty.channel.socket.nio.AbstractNioSelector.run(AbstractNioSelector.java:296) at org.jboss.netty.channel.socket.nio.AbstractNioWorker.run(AbstractNioWorker.java:89) at org.jboss.netty.channel.socket.nio.NioWorker.run(NioWorker.java:178) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918) at java.lang.Thread.run(Thread.java:662) 10-Jul-2014 13:42:54 org.jboss.netty.channel.DefaultChannelPipeline WARNING: An exception was thrown by a user handler while handling an exception event ([id: 0x87e23fce, /127.0.0.1:38588 :> /127.0.0.1:9042] EXCEPTION: java.lang.NullPointerException) java.lang.NullPointerException at com.datastax.driver.core.HostConnectionPool.discardAvailableConnections(HostConnectionPool.java:402) at com.datastax.driver.core.HostConnectionPool.closeAsync(HostConnectionPool.java:389) at com.datastax.driver.core.PooledConnection.notifyOwnerWhenDefunct(PooledConnection.java:48) at com.datastax.driver.core.Connection.defunct(Connection.java:248) at com.datastax.driver.core.Connection$Dispatcher.exceptionCaught(Connection.java:612) at org.jboss.netty.handler.codec.oneone.OneToOneDecoder.handleUpstream(OneToOneDecoder.java:60) at org.jboss.netty.handler.codec.frame.FrameDecoder.exceptionCaught(FrameDecoder.java:377) at org.jboss.netty.channel.Channels.fireExceptionCaught(Channels.java:525) at org.jboss.netty.channel.AbstractChannelSink.exceptionCaught(AbstractChannelSink.java:48) at org.jboss.netty.handler.codec.oneone.OneToOneDecoder.handleUpstream(OneToOneDecoder.java:60) at org.jboss.netty.handler.codec.frame.FrameDecoder.cleanup(FrameDecoder.java:493) at org.jboss.netty.handler.codec.frame.FrameDecoder.channelClosed(FrameDecoder.java:371) at org.jboss.netty.channel.Channels.fireChannelClosed(Channels.java:468) at org.jboss.netty.channel.Channels$6.run(Channels.java:457) at org.jboss.netty.channel.socket.ChannelRunnableWrapper.run(ChannelRunnableWrapper.java:40) at org.jboss.netty.channel.socket.nio.AbstractNioSelector.processTaskQueue(AbstractNioSelector.java:372) at org.jboss.netty.channel.socket.nio.AbstractNioSelector.run(AbstractNioSelector.java:296) at org.jboss.netty.channel.socket.nio.AbstractNioWorker.run(AbstractNioWorker.java:89) at org.jboss.netty.channel.socket.nio.NioWorker.run(NioWorker.java:178) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918) at java.lang.Thread.run(Thread.java:662) 10-Jul-2014 13:42:54 org.jboss.netty.channel.DefaultChannelPipeline WARNING: An exception was thrown by a user handler while handling an exception event ([id: 0x14b239f4, /127.0.0.1:37010 :> /127.0.0.1:9042] EXCEPTION: java.lang.NullPointerException) java.lang.NullPointerException at com.datastax.driver.core.HostConnectionPool.discardAvailableConnections(HostConnectionPool.java:402) at com.datastax.driver.core.HostConnectionPool.closeAsync(HostConnectionPool.java:389) at com.datastax.driver.core.PooledConnection.notifyOwnerWhenDefunct(PooledConnection.java:48) at com.datastax.driver.core.Connection.defunct(Connection.java:248) at com.datastax.driver.core.Connection$Dispatcher.exceptionCaught(Connection.java:612) at org.jboss.netty.handler.codec.oneone.OneToOneDecoder.handleUpstream(OneToOneDecoder.java:60) at org.jboss.netty.handler.codec.frame.FrameDecoder.exceptionCaught(FrameDecoder.java:377) at org.jboss.netty.channel.Channels.fireExceptionCaught(Channels.java:525) at org.jboss.netty.channel.AbstractChannelSink.exceptionCaught(AbstractChannelSink.java:48) at org.jboss.netty.handler.codec.oneone.OneToOneDecoder.handleUpstream(OneToOneDecoder.java:60) at org.jboss.netty.handler.codec.frame.FrameDecoder.cleanup(FrameDecoder.java:493) at org.jboss.netty.handler.codec.frame.FrameDecoder.channelClosed(FrameDecoder.java:371) at org.jboss.netty.channel.Channels.fireChannelClosed(Channels.java:468) at org.jboss.netty.channel.Channels$6.run(Channels.java:457) at org.jboss.netty.channel.socket.ChannelRunnableWrapper.run(ChannelRunnableWrapper.java:40) at org.jboss.netty.channel.socket.nio.AbstractNioSelector.processTaskQueue(AbstractNioSelector.java:372) at org.jboss.netty.channel.socket.nio.AbstractNioSelector.run(AbstractNioSelector.java:296) at org.jboss.netty.channel.socket.nio.AbstractNioWorker.run(AbstractNioWorker.java:89) at org.jboss.netty.channel.socket.nio.NioWorker.run(NioWorker.java:178) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918) at java.lang.Thread.run(Thread.java:662) {noformat}

    DataStax JIRA | 3 years ago | Piotr Kołaczkowski
    java.util.concurrent.RejectedExecutionException
  3. Speed up your debug routine!

    Automated exception search integrated into your IDE

  4. 0

    EmbeddedCassandraServerHelper.cleanEmbeddedCassandra() hangs forever

    Stack Overflow | 1 year ago | gigi2
    java.util.concurrent.RejectedExecutionException: Task com.google.common.util.concurrent.ListenableFutureTask@9a7dd20 rejected from java.util.concurrent.ThreadPoolExecutor@6dc825bd[Terminated, pool size = 0, active threads = 0, queued tasks = 0, completed tasks = 3]
  5. 0

    With the spark-cassandra-connector, branch b1.1, using java driver version 2.1.2 and cassandra 2.1.0 I see this: {noformat}14/11/03 13:09:15 ERROR ExceptionCatchingRunnable: Unexpected error while executing task java.util.concurrent.RejectedExecutionException: Task com.google.common.util.concurrent.ListenableFutureTask@3c61ee53 rejected from java.util.concurrent.ThreadPoolExecutor@4165aa1d[Terminated, pool size = 0, active threads = 0, queued tasks = 0, completed tasks = 0] at java.util.concurrent.ThreadPoolExecutor$AbortPolicy.rejectedExecution(ThreadPoolExecutor.java:2048) at java.util.concurrent.ThreadPoolExecutor.reject(ThreadPoolExecutor.java:821) at java.util.concurrent.ThreadPoolExecutor.execute(ThreadPoolExecutor.java:1372) at com.google.common.util.concurrent.MoreExecutors$ListeningDecorator.execute(MoreExecutors.java:484) at java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:132) at com.google.common.util.concurrent.AbstractListeningExecutorService.submit(AbstractListeningExecutorService.java:58) at com.datastax.driver.core.SessionManager.maybeAddPool(SessionManager.java:264) at com.datastax.driver.core.Cluster$Manager.onAdd(Cluster.java:1639) at com.datastax.driver.core.Cluster$Manager.access$1100(Cluster.java:1110) at com.datastax.driver.core.Cluster$Manager$6.runMayThrow(Cluster.java:1588) at com.datastax.driver.core.ExceptionCatchingRunnable.run(ExceptionCatchingRunnable.java:32) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) at java.util.concurrent.FutureTask.run(FutureTask.java:262) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at java.lang.Thread.run(Thread.java:745) 14/11/03 13:09:15 INFO LocalNodeFirstLoadBalancingPolicy: Adding host 127.0.0.1 (datacenter1) 14/11/03 13:09:15 INFO LocalNodeFirstLoadBalancingPolicy: Adding host 127.0.0.1 (datacenter1) 14/11/03 13:09:15 INFO TableWriter: Wrote 0 rows in 0 batches to twitter_stream.hashtags_by_interval in 0.005 s. 14/11/03 13:09:15 INFO CassandraConnector: Connected to Cassandra cluster: Test Cluster 14/11/03 13:09:15 INFO LocalNodeFirstLoadBalancingPolicy: Adding host 127.0.0.1 (datacenter1) 14/11/03 13:09:15 INFO Cluster: New Cassandra host /127.0.0.1:9042 added 14/11/03 13:09:15 INFO LocalNodeFirstLoadBalancingPolicy: Adding host 127.0.0.1 (datacenter1) 14/11/03 13:09:15 INFO LocalNodeFirstLoadBalancingPolicy: Adding host 127.0.0.1 (datacenter1) 14/11/03 13:09:15 ERROR ExceptionCatchingRunnable: Unexpected error while executing task java.util.concurrent.RejectedExecutionException: Task com.google.common.util.concurrent.ListenableFutureTask@5bdbbf3a rejected from java.util.concurrent.ThreadPoolExecutor@37e7a7f3[Terminated, pool size = 0, active threads = 0, queued tasks = 0, completed tasks = 0] at java.util.concurrent.ThreadPoolExecutor$AbortPolicy.rejectedExecution(ThreadPoolExecutor.java:2048) at java.util.concurrent.ThreadPoolExecutor.reject(ThreadPoolExecutor.java:821) at java.util.concurrent.ThreadPoolExecutor.execute(ThreadPoolExecutor.java:1372) at com.google.common.util.concurrent.MoreExecutors$ListeningDecorator.execute(MoreExecutors.java:484) at java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:132) at com.google.common.util.concurrent.AbstractListeningExecutorService.submit(AbstractListeningExecutorService.java:58) at com.datastax.driver.core.SessionManager.maybeAddPool(SessionManager.java:264) at com.datastax.driver.core.Cluster$Manager.onAdd(Cluster.java:1639) at com.datastax.driver.core.Cluster$Manager.access$1100(Cluster.java:1110) at com.datastax.driver.core.Cluster$Manager$6.runMayThrow(Cluster.java:1588) at com.datastax.driver.core.ExceptionCatchingRunnable.run(ExceptionCatchingRunnable.java:32) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) at java.util.concurrent.FutureTask.run(FutureTask.java:262) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at java.lang.Thread.run(Thread.java:745) 14/11/03 13:09:15 INFO LocalNodeFirstLoadBalancingPolicy: Adding host 127.0.0.1 (datacenter1) 14/11/03 13:09:15 INFO LocalNodeFirstLoadBalancingPolicy: Adding host 127.0.0.1 (datacenter1){noformat} And with the same connector and driver against cassandra 2.1.1: {noformat}14/11/03 13:31:40 ERROR ExceptionCatchingRunnable: Unexpected error while executing task java.util.concurrent.RejectedExecutionException: Task com.google.common.util.concurrent.ListenableFutureTask@41c7f034 rejected from java.util.concurrent.ThreadPoolExecutor@2d6b07a9[Terminated, pool size = 0, active threads = 0, queued tasks = 0, completed tasks = 0] at java.util.concurrent.ThreadPoolExecutor$AbortPolicy.rejectedExecution(ThreadPoolExecutor.java:2048) at java.util.concurrent.ThreadPoolExecutor.reject(ThreadPoolExecutor.java:821) at java.util.concurrent.ThreadPoolExecutor.execute(ThreadPoolExecutor.java:1372) at com.google.common.util.concurrent.MoreExecutors$ListeningDecorator.execute(MoreExecutors.java:484) at java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:132) at com.google.common.util.concurrent.AbstractListeningExecutorService.submit(AbstractListeningExecutorService.java:58) at com.datastax.driver.core.SessionManager.maybeAddPool(SessionManager.java:264) at com.datastax.driver.core.Cluster$Manager.onAdd(Cluster.java:1639) at com.datastax.driver.core.Cluster$Manager.access$1100(Cluster.java:1110) at com.datastax.driver.core.Cluster$Manager$6.runMayThrow(Cluster.java:1588) at com.datastax.driver.core.ExceptionCatchingRunnable.run(ExceptionCatchingRunnable.java:32) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) at java.util.concurrent.FutureTask.run(FutureTask.java:262) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at java.lang.Thread.run(Thread.java:745){noformat}

    DataStax JIRA | 2 years ago | Helena Edelson
    java.util.concurrent.RejectedExecutionException: Task com.google.common.util.concurrent.ListenableFutureTask@5bdbbf3a rejected from java.util.concurrent.ThreadPoolExecutor@37e7a7f3[Terminated, pool size = 0, active threads = 0, queued tasks = 0, completed tasks = 0]
Not finding the right solution?
Take a tour to get the most out of Samebug.

Tired of useless tips?

Automated exception search integrated into your IDE

Root Cause Analysis

  1. java.util.concurrent.RejectedExecutionException

    No message provided

    at java.util.concurrent.ThreadPoolExecutor$AbortPolicy.rejectedExecution()
  2. Java RT
    ThreadPoolExecutor.execute
    1. java.util.concurrent.ThreadPoolExecutor$AbortPolicy.rejectedExecution(ThreadPoolExecutor.java:1774)
    2. java.util.concurrent.ThreadPoolExecutor.reject(ThreadPoolExecutor.java:768)
    3. java.util.concurrent.ThreadPoolExecutor.execute(ThreadPoolExecutor.java:656)
    3 frames
  3. Guava
    MoreExecutors$ListeningDecorator.execute
    1. com.google.common.util.concurrent.MoreExecutors$ListeningDecorator.execute(MoreExecutors.java:484)
    1 frame
  4. Java RT
    AbstractExecutorService.submit
    1. java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:78)
    1 frame
  5. Guava
    AbstractListeningExecutorService.submit
    1. com.google.common.util.concurrent.AbstractListeningExecutorService.submit(AbstractListeningExecutorService.java:50)
    1 frame
  6. DataStax Java Driver for Apache Cassandra - Core
    Connection$Dispatcher.exceptionCaught
    1. com.datastax.driver.core.Cluster$Manager.triggerOnDown(Cluster.java:1342)
    2. com.datastax.driver.core.Cluster$Manager.signalConnectionFailure(Cluster.java:1550)
    3. com.datastax.driver.core.Connection.defunct(Connection.java:247)
    4. com.datastax.driver.core.Connection$Dispatcher.exceptionCaught(Connection.java:612)
    4 frames
  7. Netty
    ClientBootstrap.connect
    1. org.jboss.netty.handler.codec.oneone.OneToOneDecoder.handleUpstream(OneToOneDecoder.java:60)
    2. org.jboss.netty.handler.codec.frame.FrameDecoder.exceptionCaught(FrameDecoder.java:377)
    3. org.jboss.netty.channel.Channels.fireExceptionCaught(Channels.java:525)
    4. org.jboss.netty.channel.socket.nio.NioClientSocketPipelineSink.connect(NioClientSocketPipelineSink.java:131)
    5. org.jboss.netty.channel.socket.nio.NioClientSocketPipelineSink.eventSunk(NioClientSocketPipelineSink.java:70)
    6. org.jboss.netty.handler.codec.oneone.OneToOneEncoder.handleDownstream(OneToOneEncoder.java:54)
    7. org.jboss.netty.handler.codec.oneone.OneToOneEncoder.handleDownstream(OneToOneEncoder.java:54)
    8. org.jboss.netty.channel.Channels.connect(Channels.java:634)
    9. org.jboss.netty.channel.AbstractChannel.connect(AbstractChannel.java:207)
    10. org.jboss.netty.bootstrap.ClientBootstrap.connect(ClientBootstrap.java:229)
    11. org.jboss.netty.bootstrap.ClientBootstrap.connect(ClientBootstrap.java:182)
    11 frames
  8. DataStax Java Driver for Apache Cassandra - Core
    SessionManager$2.call
    1. com.datastax.driver.core.Connection.<init>(Connection.java:93)
    2. com.datastax.driver.core.PooledConnection.<init>(PooledConnection.java:28)
    3. com.datastax.driver.core.Connection$Factory.open(Connection.java:456)
    4. com.datastax.driver.core.HostConnectionPool.<init>(HostConnectionPool.java:85)
    5. com.datastax.driver.core.SessionManager$2.call(SessionManager.java:190)
    6. com.datastax.driver.core.SessionManager$2.call(SessionManager.java:186)
    6 frames
  9. Java RT
    Thread.run
    1. java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
    2. java.util.concurrent.FutureTask.run(FutureTask.java:138)
    3. java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895)
    4. java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918)
    5. java.lang.Thread.run(Thread.java:662)
    5 frames