camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kevin707 <wenbo...@vip.sina.com>
Subject camel mail imap :javax.mail.FolderClosedException
Date Tue, 13 Sep 2011 00:55:06 GMT
Hi,

We are using imap to consume mail with route:
   
from("imap://username@host?password=pass&consumer.delay=5000&unseen=true&fetchSize=100&delete=true").process(new
OrderQueryProcessor()).to("seda:email_process")

private class OrderQueryProcessor implements Processor {
  public void process(Exchange exchange) throws Exception {
    String id = exchange.getIn().getHeader("from", String.class);
    exchange.getIn().setBody((id + "   " +
exchange.getIn().getBody(String.class)).encodeAsBase64());
  }
}


All is fine and except for :javax.mail.FolderClosedException

 Caused by: [javax.mail.FolderClosedException - null]
javax.mail.FolderClosedException
	at com.sun.mail.imap.IMAPMessage.getProtocol(IMAPMessage.java:133)
	at com.sun.mail.imap.IMAPMessage.setFlags(IMAPMessage.java:843)
	at javax.mail.Message.setFlag(Message.java:565)
	at
org.apache.camel.component.mail.MailConsumer.processCommit(MailConsumer.java:268)
	at
org.apache.camel.component.mail.MailConsumer$1.onComplete(MailConsumer.java:172)
	at
org.apache.camel.util.UnitOfWorkHelper.doneSynchronizations(UnitOfWorkHelper.java:55)
	at org.apache.camel.impl.DefaultUnitOfWork.done(DefaultUnitOfWork.java:172)
	at
org.apache.camel.processor.UnitOfWorkProcessor.doneUow(UnitOfWorkProcessor.java:121)
	at
org.apache.camel.processor.UnitOfWorkProcessor.access$000(UnitOfWorkProcessor.java:36)
	at
org.apache.camel.processor.UnitOfWorkProcessor$1.done(UnitOfWorkProcessor.java:106)
	at
org.apache.camel.processor.DefaultChannel$1.done(DefaultChannel.java:262)
	at
org.apache.camel.processor.RedeliveryErrorHandler.processErrorHandler(RedeliveryErrorHandler.java:330)
	at
org.apache.camel.processor.RedeliveryErrorHandler.process(RedeliveryErrorHandler.java:208)
	at
org.apache.camel.processor.DefaultChannel.process(DefaultChannel.java:256)
	at
org.apache.camel.processor.UnitOfWorkProcessor.process(UnitOfWorkProcessor.java:99)
	at
org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:70)
	at
org.apache.camel.processor.DelegateAsyncProcessor.processNext(DelegateAsyncProcessor.java:98)
	at
org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:89)
	at
org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:68)
	at
org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:70)
	at
org.apache.camel.component.seda.SedaConsumer.sendToConsumers(SedaConsumer.java:169)
	at org.apache.camel.component.seda.SedaConsumer.run(SedaConsumer.java:111)
	at
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
	at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
	at java.lang.Thread.run(Thread.java:662)


Please advice.

kevin



--
View this message in context: http://camel.465427.n5.nabble.com/camel-mail-imap-javax-mail-FolderClosedException-tp4796608p4796608.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Mime
View raw message