I created dynamic web project in eclipse(Kepler).In my application, I used Spring,Hibernate, JSF,JMS & Quartz sheduler. What I wanted to do is, I want to run a shedule to send database values to ActiveMQ
& listen by implementing MessageListener
. My app shedule to send values every 5 seconds & it works fine. But after sending 15500 messages to the ActiveMQ
, It raised following error. Any reason why this can happen?
Exception in thread "ActiveMQ InactivityMonitor Worker" java.lang.OutOfMemoryError: Java heap space
at java.lang.AbstractStringBuilder.<init>(Unknown Source)
at java.lang.StringBuffer.<init>(Unknown Source)
at org.slf4j.helpers.MessageFormatter.arrayFormat(MessageFormatter.java:194)
at org.slf4j.helpers.MessageFormatter.format(MessageFormatter.java:124)
at org.slf4j.impl.Log4jLoggerAdapter.debug(Log4jLoggerAdapter.java:228)
at org.apache.activemq.transport.AbstractInactivityMonitor$3.run(AbstractInactivityMonitor.java:161)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Exception in thread:
"org.springframework.jms.listener.DefaultMessageListenerContainer#0-2" java.lang.OutOfMemoryError: Java heap space Exception in thread "DefaultQuartzScheduler_QuartzSchedulerThread" java.lang.OutOfMemoryError: Java heap space