3 Replies Latest reply on May 18, 2010 4:39 AM by Gary Tully

    OutOfMemory when no ActiveMQ broker Or brokerURL pointing to invalid locatn

    basheeruddin Newbie

      Hi,

      Im using Spring-JMS with Fuse Message Broker 5.3.0.5. My spring context file looks like below.. The ActiveMQConnectionFactoryImpl is an extension of ActiveMQConnectionFactory so that I can have the brokerURL set in afterPropertiesSet() reading from properties file making it dynamic configurable..

       

       

      ...

      ...

      The rest of the file is similar to any jmsTemplate based config..

       

      The problem Im seeing is that if brokerURL is not configured properly like missing IP.. Then the client runs for 8-10 hours before throwing OOM. The stack trace is below.

       

      -


      ava.lang.OutOfMemoryError: Java heap space

      Exception in thread "DefaultQueueContainer-1"      at org.apache.activemq.openwire.OpenWireFormat.(OpenWireFormat.java:67)

           at org.apache.activemq.openwire.OpenWireFormatFactory.createWireFormat(OpenWireFormatFactory.java:60)

           at org.apache.activemq.transport.TransportFactory.createWireFormat(TransportFactory.java:179)

           at org.apache.activemq.transport.TransportFactory.doConnect(TransportFactory.java:115)

           at org.apache.activemq.transport.TransportFactory.doConnect(TransportFactory.java:43)

           at org.apache.activemq.transport.TransportFactory.connect(TransportFactory.java:77)

           at org.apache.activemq.ActiveMQConnectionFactory.createTransport(ActiveMQConnectionFactory.java:227)

           at org.apache.activemq.ActiveMQConnectionFactory.createActiveMQConnection(ActiveMQConnectionFactory.java:242)

           at org.apache.activemq.ActiveMQConnectionFactory.createActiveMQConnection(ActiveMQConnectionFactory.java:211)

           at org.apache.activemq.ActiveMQConnectionFactory.createConnection(ActiveMQConnectionFactory.java:158)

           at org.springframework.jms.connection.SingleConnectionFactory.doCreateConnection(SingleConnectionFactory.java:343)

           at org.springframework.jms.connection.SingleConnectionFactory.initConnection(SingleConnectionFactory.java:290)

           at org.springframework.jms.connection.SingleConnectionFactory.createConnection(SingleConnectionFactory.java:227)

           at org.springframework.jms.support.JmsAccessor.createConnection(JmsAccessor.java:184)

           at org.springframework.jms.listener.AbstractJmsListeningContainer.createSharedConnection(AbstractJmsListeningContainer.java:378)

           at org.springframework.jms.listener.AbstractJmsListeningContainer.refreshSharedConnection(AbstractJmsListeningContainer.java:363)

           at org.springframework.jms.listener.DefaultMessageListenerContainer.refreshConnectionUntilSuccessful(DefaultMessageListenerContainer.java:785)

           at org.springframework.jms.listener.DefaultMessageListenerContainer.recoverAfterListenerSetupFailure(DefaultMessageListenerContainer.java:767)

           at org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.run(DefaultMessageListenerContainer.java:898)

           at java.lang.Thread.run(Unknown Source)

      -


       

      Any idea?. I have seen AMQ issue of OOM but thought that is for older version..

       

      Thx in Adv.