1

有时我的 glassfish 服务器在控制台中显示以下错误,你知道吗?

SEVERE:     at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.signal(AbstractQueuedSynchronizer.java:1941)
SEVERE:     at java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(ScheduledThreadPoolExecutor.java:1100)
SEVERE:     at java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(ScheduledThreadPoolExecutor.java:807)
SEVERE:     at java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1068)
SEVERE:     at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1130)
SEVERE:     at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
SEVERE:     at java.lang.Thread.run(Thread.java:722)
SEVERE: Exception in thread "pool-89-thread-1" 
SEVERE: java.lang.IllegalMonitorStateException
    at java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.signal(AbstractQueuedSynchronizer.java:1941)
    at java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(ScheduledThreadPoolExecutor.java:1100)
    at java.util.concurrent.ScheduledThreadPoolExecutor$DelayedWorkQueue.take(ScheduledThreadPoolExecutor.java:807)
    at java.util.concurrent.ThreadPoolExecutor.getTask(ThreadPoolExecutor.java:1068)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1130)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
    at java.lang.Thread.run(Thread.java:722)
4

1 回答 1

0

仅通过提供的堆栈跟踪,我们可以看到这显然是一种多线程类型的异常。根据文档

(IllegalMonitorStateException) 抛出以指示线程已尝试在对象的监视器上等待,或通知其他线程在对象的监视器上等待但不拥有指定的监视器。

请参阅了解 Java 等待和通知方法以及 Jon Skeet 的答案。

如果您需要更多帮助,请尝试发布一些代码...

于 2013-07-10T05:56:09.513 回答