well, if it ends at some time, it is not 'infinite', isn't it? The best is to open a JIRA and describe there the issue: does it always happen...?

On 08/01/2013 07:15 AM, Johnny Minty wrote:
Hi Eric,

Im running the TRUNK, It is an infinite loop  after a while the exception 
changes to an IOException. (below)



ERROR 18:40:36 | JamesMailetContext | Exception caught in OutboundDelivery.run()
org.apache.james.queue.api.MailQueue$MailQueueException: Unable to dequeue next 
message;
   nested exception is:
  javax.jms.JMSException: Could not create Transport. Reason: 
java.io.IOException: Broker named 'james' does not exist.
  at org.apache.james.queue.jms.JMSMailQueue.deQueue(JMSMailQueue.java:171)
  at 
com.liverton.seemail.transport.OutboundDelivery.run(OutboundDelivery.java:655)
  at java.lang.Thread.run(Thread.java:722)
Caused by: javax.jms.JMSException: Could not create Transport. Reason: 
java.io.IOException: Broker named 'james' does not exist.
  at 
org.apache.activemq.util.JMSExceptionSupport.create(JMSExceptionSupport.java:35)
  at 
org.apache.activemq.ActiveMQConnectionFactory.createTransport(ActiveMQConnectionFactory.java:252)
  at 
org.apache.activemq.ActiveMQConnectionFactory.createActiveMQConnection(ActiveMQConnectionFactory.java:265)
  at 
org.apache.activemq.ActiveMQConnectionFactory.createActiveMQConnection(ActiveMQConnectionFactory.java:238)
  at 
org.apache.activemq.ActiveMQConnectionFactory.createConnection(ActiveMQConnectionFactory.java:184)
  at 
org.springframework.jms.connection.SingleConnectionFactory.doCreateConnection(SingleConnectionFactory.java:342)
  at 
org.springframework.jms.connection.SingleConnectionFactory.initConnection(SingleConnectionFactory.java:288)
  at 
org.springframework.jms.connection.SingleConnectionFactory.createConnection(SingleConnectionFactory.java:225)
  at org.apache.james.queue.jms.JMSMailQueue.deQueue(JMSMailQueue.java:104)
  ... 2 more
Caused by: java.io.IOException: Broker named 'james' does not exist.
  at 
org.apache.activemq.transport.vm.VMTransportFactory.doCompositeConnect(VMTransportFactory.java:116)
  at 
org.apache.activemq.transport.vm.VMTransportFactory.doConnect(VMTransportFactory.java:54)
  at 
org.apache.activemq.transport.TransportFactory.connect(TransportFactory.java:67)
  at 
org.apache.activemq.ActiveMQConnectionFactory.createTransport(ActiveMQConnectionFactory.java:250)
  ... 9 more
ERROR 18:40:36 | JamesMailetContext | Exception caught in OutboundDelivery.run()
org.apache.james.queue.api.MailQueue$MailQueueException: Unable to dequeue next 
message;
   nested exception is:
  javax.jms.JMSException: Could not create Transport. Reason: 
java.io.IOException: Broker named 'james' does not exist.
  at org.apache.james.queue.jms.JMSMailQueue.deQueue(JMSMailQueue.java:171)
  at 
com.liverton.seemail.transport.OutboundDelivery.run(OutboundDelivery.java:655)
  at java.lang.Thread.run(Thread.java:722)
Caused by: javax.jms.JMSException: Could not create Transport. Reason: 
java.io.IOException: Broker named 'james' does not exist.
  at 
org.apache.activemq.util.JMSExceptionSupport.create(JMSExceptionSupport.java:35)
  at 
org.apache.activemq.ActiveMQConnectionFactory.createTransport(ActiveMQConnectionFactory.java:252)
  at 
org.apache.activemq.ActiveMQConnectionFactory.createActiveMQConnection(ActiveMQConnectionFactory.java:265)
  at 
org.apache.activemq.ActiveMQConnectionFactory.createActiveMQConnection(ActiveMQConnectionFactory.java:238)
  at 
org.apache.activemq.ActiveMQConnectionFactory.createConnection(ActiveMQConnectionFactory.java:184)
  at 
org.springframework.jms.connection.SingleConnectionFactory.doCreateConnection(SingleConnectionFactory.java:342)
  at 
org.springframework.jms.connection.SingleConnectionFactory.initConnection(SingleConnectionFactory.java:288)
  at 
org.springframework.jms.connection.SingleConnectionFactory.createConnection(SingleConnectionFactory.java:225)
  at org.apache.james.queue.jms.JMSMailQueue.deQueue(JMSMailQueue.java:104)
  ... 2 more
Caused by: java.io.IOException: Broker named 'james' does not exist.
  at 
org.apache.activemq.transport.vm.VMTransportFactory.doCompositeConnect(VMTransportFactory.java:116)
  at 
org.apache.activemq.transport.vm.VMTransportFactory.doConnect(VMTransportFactory.java:54)
  at 
org.apache.activemq.transport.TransportFactory.connect(TransportFactory.java:67)
  at 
org.apache.activemq.ActiveMQConnectionFactory.createTransport(ActiveMQConnectionFactory.java:250)
  ... 9 more
ERROR 18:40:36 | JamesMailetContext | Exception caught in OutboundDelivery.run()
org.apache.james.queue.api.MailQueue$MailQueueException: Unable to dequeue next 
message;
   nested exception is:
  javax.jms.JMSException: Could not create Transport. Reason: 
java.io.IOException: Broker named 'james' does not exist.
  at org.apache.james.queue.jms.JMSMailQueue.deQueue(JMSMailQueue.java:171)
  at 
com.liverton.seemail.transport.OutboundDelivery.run(OutboundDelivery.java:655)
  at java.lang.Thread.run(Thread.java:722)
Caused by: javax.jms.JMSException: Could not create Transport. Reason: 
java.io.IOException: Broker named 'james' does not exist.
  at 
org.apache.activemq.util.JMSExceptionSupport.create(JMSExceptionSupport.java:35)
  at 
org.apache.activemq.ActiveMQConnectionFactory.createTransport(ActiveMQConnectionFactory.java:252)
  at 
org.apache.activemq.ActiveMQConnectionFactory.createActiveMQConnection(ActiveMQConnectionFactory.java:265)
  at 
org.apache.activemq.ActiveMQConnectionFactory.createActiveMQConnection(ActiveMQConnectionFactory.java:238)
  at 
org.apache.activemq.ActiveMQConnectionFactory.createConnection(ActiveMQConnectionFactory.java:184)
  at 
org.springframework.jms.connection.SingleConnectionFactory.doCreateConnection(SingleConnectionFactory.java:342)
  at 
org.springframework.jms.connection.SingleConnectionFactory.initConnection(SingleConnectionFactory.java:288)
  at 
org.springframework.jms.connection.SingleConnectionFactory.createConnection(SingleConnectionFactory.java:225)
  at org.apache.james.queue.jms.JMSMailQueue.deQueue(JMSMailQueue.java:104)
  ... 2 more
Caused by: java.io.IOException: Broker named 'james' does not exist.
  at 
org.apache.activemq.transport.vm.VMTransportFactory.doCompositeConnect(VMTransportFactory.java:116)
  at 
org.apache.activemq.transport.vm.VMTransportFactory.doConnect(VMTransportFactory.java:54)
  at 
org.apache.activemq.transport.TransportFactory.connect(TransportFactory.java:67)
  at 
org.apache.activemq.ActiveMQConnectionFactory.createTransport(ActiveMQConnectionFactory.java:250)
  ... 9 more





Kind regards,

Johnny Minty




From: Eric Charles
Sent: ‎Thursday‎, ‎1‎ ‎August‎ ‎2013 ‎5‎:‎44‎ ‎p.m.
To: James Users List


Is it really an infinite loop (server never ending) or a ungraceful
shutdown? Which version do you run? I usually see graceful shutdowns here.

On 08/01/2013 05:24 AM, Johnny Minty wrote:
Hi Guys,

It looks like I'm able to put the mail server in to an infinite loop if I call 
close on the root application context. (Stack and cause below)

The shutdown is failing on the destroy method on the 'mailqueuefactorybean' :
<bean id="mailqueuefactory" class="org.apache.james.queue.activemq.ActiveMQMailQueueFactory" 
depends-on="broker"/>

    @PreDestroy    public void destroy() {        for (String mbean : mbeans) {    
        unregisterMBean(mbean); <-- throws 
java.util.ConcurrentModificationException here        }
          for (MailQueue mailQueue : queues.values()) {            
LifecycleUtil.dispose(mailQueue);        }
      }

WARN  16:10:48 | InitDestroyAnnotationBeanPostProcessor | Invocation of destroy 
method failed on bean with name 'mailqueuefactory': 
java.util.ConcurrentModificationExceptionERROR 16:10:48 | JamesMailetContext | 
Exception caught in 
OutboundDelivery.run()org.apache.james.queue.api.MailQueue$MailQueueException: 
Unable to dequeue next message;  nested exception is:   
javax.jms.IllegalStateException: The Session is closed  at 
org.apache.james.queue.jms.JMSMailQueue.deQueue(JMSMailQueue.java:171)       at 
com.liverton.seemail.transport.OutboundDelivery.run(OutboundDelivery.java:655)  
     at java.lang.Thread.run(Thread.java:722)Caused by: 
javax.jms.IllegalStateException: The Session is closed       at 
org.apache.activemq.ActiveMQSession.checkClosed(ActiveMQSession.java:731)    at 
org.apache.activemq.ActiveMQSession.commit(ActiveMQSession.java:554) at 
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)  at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:5
7)        at sun.reflect.Delegat
  i
ngMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)       at 
java.lang.reflect.Method.invoke(Method.java:601)     at 
org.springframework.jms.connection.CachingConnectionFactory$CachedSessionInvocationHandler.invoke(CachingConnectionFactory.java:348)
 at com.sun.proxy.$Proxy96.commit(Unknown Source)        at 
org.apache.james.queue.jms.JMSMailQueue.deQueue(JMSMailQueue.java:116)       
... 2 moreERROR 16:10:48 | JamesMailetContext | Exception caught in 
OutboundDelivery.run()org.apache.james.queue.api.MailQueue$MailQueueException: 
Unable to dequeue next message;  nested exception is:        
javax.jms.IllegalStateException: The Session is closed  at 
org.apache.james.queue.jms.JMSMailQueue.deQueue(JMSMailQueue.java:171)       at 
com.liverton.seemail.transport.OutboundDelivery.run(OutboundDelivery.java:655)  
     at java.lang.Thread.run(Thread.java:722)Caused by: 
javax.jms.IllegalStateException: The Session is closed       at 
org.apache.activemq.ActiveMQSession.checkClosed(Ac
tiveMQSession.java:731)    at org.apache.activemq.Act
  i
veMQSession.commit(ActiveMQSession.java:554)    at 
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)  at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)   
     at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:601)     at 
org.springframework.jms.connection.CachingConnectionFactory$CachedSessionInvocationHandler.invoke(CachingConnectionFactory.java:348)
 at com.sun.proxy.$Proxy96.commit(Unknown Source)        at 
org.apache.james.queue.jms.JMSMailQueue.deQueue(JMSMailQueue.java:116)       
... 2 more
Regards,

Johnny Minty



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to