You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by awillia <an...@fronde.com> on 2011/12/01 23:07:38 UTC
Mail consumer not able to delete a message
I am using imap to read messages from a folder and am getting the following
two exceptions for some messages.
I saw another thread that referred to this and suggested that use the
disconnect option that was put into 2.8.3. I have moved to this version but
it doesn't fix the problem.
does anybody have any suggestion for what might cause this?
Error occurred during flagging message as DELETED/SEEN
javax.mail.MessagingException: A3 BAD Error in IMAP command STORE: Invalid
messageset;
nested exception is:
com.sun.mail.iap.BadCommandException: A3 BAD Error in IMAP command
STORE: Invalid messageset
at com.sun.mail.imap.IMAPMessage.setFlags(IMAPMessage.java:884)
at javax.mail.Message.setFlag(Message.java:578)
at
org.apache.camel.component.mail.MailConsumer.processCommit(MailConsumer.java:339)
Error occurred during flagging message as DELETED/SEEN
javax.mail.FolderClosedException
at com.sun.mail.imap.IMAPMessage.getProtocol(IMAPMessage.java:145)
at com.sun.mail.imap.IMAPMessage.setFlags(IMAPMessage.java:878)
at javax.mail.Message.setFlag(Message.java:578)
at
org.apache.camel.component.mail.MailConsumer.processCommit(MailConsumer.java:314)
regards
Antony
--
View this message in context: http://camel.465427.n5.nabble.com/Mail-consumer-not-able-to-delete-a-message-tp5040057p5040057.html
Sent from the Camel - Users mailing list archive at Nabble.com.
Re: Mail consumer not able to delete a message
Posted by awillia <an...@fronde.com>.
Hi, the route is like the following. In answer to your question, no we
quickly put it on a queue and then return. For now we have changed it to use
pop3 for now which resolved this problem, but still appears to repeat some
messages sometimes.
from("imap://user@ipaddress") // from IMAP
.process(emailProcessor)
.to("seda://mails");
from("seda://mails")
.routeId("Receive - IMAP " + channel.getName())
.setHeader(DATE_RECEIVED, bean(applicationService,
"getCurrentSystemTime"))
.setHeader(CHANNEL, constant(channel.getName())) // Set the name of the
channel
.process(loadGuid) // Set our internal message ID
.setHeader(MESSAGE_TYPE, constant(INCOMING_EMAIL))
.to(RECEIVING_DIRECT); // forward to receiving route
thanks
Antony
--
View this message in context: http://camel.465427.n5.nabble.com/Mail-consumer-not-able-to-delete-a-message-tp5040057p5066844.html
Sent from the Camel - Users mailing list archive at Nabble.com.
Re: Mail consumer not able to delete a message
Posted by Claus Ibsen <cl...@gmail.com>.
Hi
Can you post details of the Camel route? Does processing the mail take
a long time, so when the DELETE flag is to be set, the mail session
could eventually have timed out, and closed ?
On Thu, Dec 1, 2011 at 11:07 PM, awillia <an...@fronde.com> wrote:
> I am using imap to read messages from a folder and am getting the following
> two exceptions for some messages.
>
> I saw another thread that referred to this and suggested that use the
> disconnect option that was put into 2.8.3. I have moved to this version but
> it doesn't fix the problem.
>
> does anybody have any suggestion for what might cause this?
>
> Error occurred during flagging message as DELETED/SEEN
> javax.mail.MessagingException: A3 BAD Error in IMAP command STORE: Invalid
> messageset;
> nested exception is:
> com.sun.mail.iap.BadCommandException: A3 BAD Error in IMAP command
> STORE: Invalid messageset
> at com.sun.mail.imap.IMAPMessage.setFlags(IMAPMessage.java:884)
> at javax.mail.Message.setFlag(Message.java:578)
> at
> org.apache.camel.component.mail.MailConsumer.processCommit(MailConsumer.java:339)
>
> Error occurred during flagging message as DELETED/SEEN
> javax.mail.FolderClosedException
> at com.sun.mail.imap.IMAPMessage.getProtocol(IMAPMessage.java:145)
> at com.sun.mail.imap.IMAPMessage.setFlags(IMAPMessage.java:878)
> at javax.mail.Message.setFlag(Message.java:578)
> at
> org.apache.camel.component.mail.MailConsumer.processCommit(MailConsumer.java:314)
>
>
> regards
> Antony
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/Mail-consumer-not-able-to-delete-a-message-tp5040057p5040057.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
--
Claus Ibsen
-----------------
FuseSource
Email: cibsen@fusesource.com
Web: http://fusesource.com
Twitter: davsclaus, fusenews
Blog: http://davsclaus.blogspot.com/
Author of Camel in Action: http://www.manning.com/ibsen/