camel-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Michael Chen (JIRA)" <>
Subject [jira] Created: (CAMEL-1263) MailConsumer throws exception on line 113
Date Thu, 15 Jan 2009 19:13:00 GMT
MailConsumer throws exception on line 113

                 Key: CAMEL-1263
             Project: Apache Camel
          Issue Type: Bug
          Components: camel-mail
    Affects Versions: 1.5.0
         Environment: Camel
            Reporter: Michael Chen

When the mail box is empty (no mail available), MailConsumer throws the following exception
on line 113.  It happens for both pop3 and imap protocols (Java Mail API 1.4.1 Sun implementation).

Regardless the cause, closing the folder should be enclosed in a try/catch block and ignore
any exception thrown, because it is no longer interesting to the client application.  It can
surely log the exception, but shouldn't throw it.

     [java] javax.mail.MessagingException: A6 NO Mailbox is locked by POP server;
     [java]   nested exception is:
     [java]     com.sun.mail.iap.CommandFailedException: A6 NO Mailbox is locked by POP server
     [java]     at com.sun.mail.imap.IMAPFolder.close(
     [java]     at com.sun.mail.imap.IMAPFolder.close(
     [java]     at org.apache.camel.component.mail.MailConsumer.poll(
     [java]     at
     [java]     at java.util.concurrent.Executors$
     [java]     at java.util.concurrent.FutureTask$Sync.innerRunAndReset(
     [java]     at java.util.concurrent.FutureTask.runAndReset(
     [java]     at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$101(
     [java]     at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.runPeriodic(
     [java]     at java.util.concurrent.ScheduledThreadPoolExecutor$
     [java]     at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(
     [java]     at java.util.concurrent.ThreadPoolExecutor$
     [java]     at
     [java] Caused by: com.sun.mail.iap.CommandFailedException: A6 NO Mailbox is locked by
POP server
     [java]     at com.sun.mail.iap.Protocol.handleResult(
     [java]     at com.sun.mail.iap.Protocol.simpleCommand(
     [java]     at com.sun.mail.imap.protocol.IMAPProtocol.close(
     [java]     at com.sun.mail.imap.IMAPFolder.close(
     [java]     ... 12 more

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message