刚发现一个异常:
Exception in thread "sfb_QuartzSchedulerThread" java.lang.OutOfMemoryError: Java heap space
at java.util.TreeMap.key(TreeMap.java:1206)
at java.util.TreeMap.firstKey(TreeMap.java:267)
at java.util.TreeSet.first(TreeSet.java:377)
at org.quartz.simpl.RAMJobStore.acquireNextTrigger(RAMJobStore.java:1209)
at org.quartz.core.QuartzSchedulerThread.run(QuartzSchedulerThread.java:266)
看这个信息,就是quartz引起了内存溢出问题。
网上资料都说IntrospectorCleanupListener能解决这种问题,但我的web.xml中是配置了这个监听器的。
网上的资料:
Listener that flushes the JDK's JavaBeans Introspector cache on web app shutdown. Register this listener in your web.xml to guarantee proper release of the web application class loader and its loaded classes.
If the JavaBeans Introspector has been used to analyze application classes, the system-level Introspector cache will hold a hard reference to those classes. Consequently, those classes and the web application class loader will not be garbage-collected on web app shutdown! This listener performs proper cleanup, to allow for garbage collection to take effect.
本文探讨了Quartz任务调度器引起Java堆空间内存溢出的异常,介绍了IntrospectorCleanupListener的作用及使用方法,并解释了其在web应用关闭时清除缓存的原因。
194

被折叠的 条评论
为什么被折叠?



