rejected from java.util.concurrent.ThreadPoolExe错误

2019独角兽企业重金招聘Python工程师标准>>> hot3.png

java.util.concurrent.RejectedExecutionException: Task com.dangdang.product.cron.job.JobRun$2@6e9764d4 rejected from java.util.concurrent.ThreadPoolExecutor@740642a9[Shutting down, pool size = 10, a ctive threads = 10, queued tasks = 3579, completed tasks = 384] at java.util.concurrent.ThreadPoolExecutor$AbortPolicy.rejectedExecution(ThreadPoolExecutor.java:2048) ~[na:1.7.0_21] at java.util.concurrent.ThreadPoolExecutor.reject(ThreadPoolExecutor.java:821) [na:1.7.0_21] at java.util.concurrent.ThreadPoolExecutor.execute(ThreadPoolExecutor.java:1372) [na:1.7.0_21] at com.dangdang.product.cron.job.JobRun.start(JobRun.java:98) ~[product-cron-stock-0.0.1-SNAPSHOT.jar:na] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.7.0_21] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) ~[na:1.7.0_21] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.7.0_21] at java.lang.reflect.Method.invoke(Method.java:601) ~[na:1.7.0_21] at org.springframework.scheduling.support.ScheduledMethodRunnable.run(ScheduledMethodRunnable.java:64) [spring-context-3.2.4.RELEASE.jar:3.2.4.RELEASE] at org.springframework.scheduling.support.DelegatingErrorHandlingRunnable.run(DelegatingErrorHandlingRunnable.java:53) [spring-context-3.2.4.RELEASE.jar:3.2.4.RELEASE] at org.springframework.scheduling.concurrent.ReschedulingRunnable.run(ReschedulingRunnable.java:81) [spring-context-3.2.4.RELEASE.jar:3.2.4.RELEASE] at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) [na:1.7.0_21] at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334) [na:1.7.0_21] at java.util.concurrent.FutureTask.run(FutureTask.java:166) [na:1.7.0_21] at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:178) [na:1.7.0_21] at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:292) [na:1.7.0_21] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [na:1.7.0_21] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [na:1.7.0_21] at java.lang.Thread.run(Thread.java:722) [na:1.7.0_21]

原因:线程池被关闭 解决:在调用是判断是开着

转载于:https://my.oschina.net/u/242853/blog/194462

你可能感兴趣的:(rejected from java.util.concurrent.ThreadPoolExe错误)