Announcement Announcement Module
Collapse
No announcement yet.
java.lang.OutOfMemoryError in SimpleAsyncTaskExecutor Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • java.lang.OutOfMemoryError in SimpleAsyncTaskExecutor

    Hello, please help !

    We are using Spring with WebLogic 9.2. We send messages to a service that inserts them into a WL JMS queue. It has worked before when we sent messages one by one.
    Yesterday I sent a few one after the other. Four of them were taken off the queue. Then I got an exception after 4 of them were taken off the queue. Now I can't even get it to work with even one message.

    The exception is
    ERROR [org.springframework.jms.listener.DefaultMessageLis tenerContainer102] - <Setup of JMS message listener invoker failed - trying to recover>
    java.lang.OutOfMemoryError
    .....
    .....
    at org.springframework.core.task.SimpleAsyncTaskExecu tor$ConcurrencyThrottlingRunnable.run(SimpleAsyncT askExecutor.java:203)

    I'm attaching the full stack trace in a separate file.

    I would appreciate the help very much.

  • #2
    Just a little more detail regarding above post. We are using

    jmsTemplate.send(new MessageCreator() {
    public Message createMessage(Session session)
    throws JMSException {
    ObjectMessage message = session.createObjectMessage(activityEvent);
    return message;
    }
    });

    The message is of type String.
    The listener implements MessageListener and the onMessage method.

    Do we need to close any sessions, etc... or does everything happen behind the scene.

    I would appreciate any feedback. We're really stuck at this point.

    Thanks

    Comment


    • #3
      Hi,
      I dont know on the OOM error but regarding the closing of the sessions etc, it depends on how you configure the JmsTemplate. By default for each message it craetes and closes down a connection session and producer which is very inefficient. View this for info....

      http://activemq.apache.org/jmstemplate-gotchas.html

      /Tom

      Comment


      • #4
        WebLogic 9.2 Should Use DefaultMessageListenerContainer

        The exception is
        ERROR [org.springframework.jms.listener.DefaultMessageLis tenerContainer102] - <Setup of JMS message listener invoker failed - trying to recover>
        java.lang.OutOfMemoryError
        .....
        .....
        at org.springframework.core.task.SimpleAsyncTaskExecu tor$ConcurrencyThrottlingRunnable.run(SimpleAsyncT askExecutor.java:203)

        I'm attaching the full stack trace in a separate file.

        I would appreciate the help very much.

        I don't know if this is the solution, but WebLogic 9.2 should use DefaultMessageListenerContainer, not DefaultMessageListenerContainer102. That's the earlier JMS version for WebLogic 8.1.

        I've used both without OOM error. Are you sure that JMS is causing it?

        %

        Comment


        • #5
          Thanks for the responses.
          I found the problem. We are using drools as the rule engine. Drools has a StatefulSession, and there is a dispose() method on the session that releases the resources. Once I added the dispose() the memory issue was resolved.

          Thanks again and regards

          Comment

          Working...
          X