You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@camel.apache.org by "Michael Chen (JIRA)" <ji...@apache.org> on 2009/01/15 20:13:00 UTC

[jira] Created: (CAMEL-1263) MailConsumer throws exception on line 113

MailConsumer throws exception on line 113
-----------------------------------------

                 Key: CAMEL-1263
                 URL: https://issues.apache.org/activemq/browse/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(IMAPFolder.java:1128)
     [java]     at com.sun.mail.imap.IMAPFolder.close(IMAPFolder.java:1055)
     [java]     at org.apache.camel.component.mail.MailConsumer.poll(MailConsumer.java:113)
     [java]     at org.apache.camel.impl.ScheduledPollConsumer.run(ScheduledPollConsumer.java:66)
     [java]     at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
     [java]     at java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:317)
     [java]     at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:150)
     [java]     at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$101(ScheduledThreadPoolExecutor.java:98)
     [java]     at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.runPeriodic(ScheduledThreadPoolExecutor.java:181)
     [java]     at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:205)
     [java]     at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
     [java]     at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
     [java]     at java.lang.Thread.run(Thread.java:619)
     [java] Caused by: com.sun.mail.iap.CommandFailedException: A6 NO Mailbox is locked by POP server
     [java]     at com.sun.mail.iap.Protocol.handleResult(Protocol.java:341)
     [java]     at com.sun.mail.iap.Protocol.simpleCommand(Protocol.java:363)
     [java]     at com.sun.mail.imap.protocol.IMAPProtocol.close(IMAPProtocol.java:976)
     [java]     at com.sun.mail.imap.IMAPFolder.close(IMAPFolder.java:1125)
     [java]     ... 12 more


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


[jira] Commented: (CAMEL-1263) MailConsumer throws exception on line 113

Posted by "Claus Ibsen (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/CAMEL-1263?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=48741#action_48741 ] 

Claus Ibsen commented on CAMEL-1263:
------------------------------------

Do you know which Mail Server you connect to?

This is the first time we hear about this. 

> MailConsumer throws exception on line 113
> -----------------------------------------
>
>                 Key: CAMEL-1263
>                 URL: https://issues.apache.org/activemq/browse/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.
> {code}
> [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(IMAPFolder.java:1128)
> [java]     at com.sun.mail.imap.IMAPFolder.close(IMAPFolder.java:1055)
> [java]     at org.apache.camel.component.mail.MailConsumer.poll(MailConsumer.java:113)
> [java]     at org.apache.camel.impl.ScheduledPollConsumer.run(ScheduledPollConsumer.java:66)
> [java]     at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
> [java]     at java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:317)
> [java]     at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:150)
> [java]     at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$101(ScheduledThreadPoolExecutor.java:98)
> [java]     at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.runPeriodic(ScheduledThreadPoolExecutor.java:181)
> [java]     at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:205)
> [java]     at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
> [java]     at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
> [java]     at java.lang.Thread.run(Thread.java:619)
> [java] Caused by: com.sun.mail.iap.CommandFailedException: A6 NO Mailbox is locked by POP server
> [java]     at com.sun.mail.iap.Protocol.handleResult(Protocol.java:341)
> [java]     at com.sun.mail.iap.Protocol.simpleCommand(Protocol.java:363)
> [java]     at com.sun.mail.imap.protocol.IMAPProtocol.close(IMAPProtocol.java:976)
> [java]     at com.sun.mail.imap.IMAPFolder.close(IMAPFolder.java:1125)
> [java]     ... 12 more
> {code}

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


[jira] Issue Comment Edited: (CAMEL-1263) MailConsumer throws exception on line 113

Posted by "Michael Chen (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/CAMEL-1263?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=48738#action_48738 ] 

mwc_tonesoft edited comment on CAMEL-1263 at 1/15/09 11:20 AM:
---------------------------------------------------------------

Note that there was no exception thrown inside the matching try block above line 113 of MailConsumer.  The processing of the mail (empty) folder was successful.

      was (Author: mwc_tonesoft):
    Note that there were no exception thrown inside the matching try block above line 113 of MailConsumer.  The processing of the mail (empty) folder was successful.
  
> MailConsumer throws exception on line 113
> -----------------------------------------
>
>                 Key: CAMEL-1263
>                 URL: https://issues.apache.org/activemq/browse/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.
> {code}
> [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(IMAPFolder.java:1128)
> [java]     at com.sun.mail.imap.IMAPFolder.close(IMAPFolder.java:1055)
> [java]     at org.apache.camel.component.mail.MailConsumer.poll(MailConsumer.java:113)
> [java]     at org.apache.camel.impl.ScheduledPollConsumer.run(ScheduledPollConsumer.java:66)
> [java]     at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
> [java]     at java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:317)
> [java]     at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:150)
> [java]     at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$101(ScheduledThreadPoolExecutor.java:98)
> [java]     at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.runPeriodic(ScheduledThreadPoolExecutor.java:181)
> [java]     at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:205)
> [java]     at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
> [java]     at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
> [java]     at java.lang.Thread.run(Thread.java:619)
> [java] Caused by: com.sun.mail.iap.CommandFailedException: A6 NO Mailbox is locked by POP server
> [java]     at com.sun.mail.iap.Protocol.handleResult(Protocol.java:341)
> [java]     at com.sun.mail.iap.Protocol.simpleCommand(Protocol.java:363)
> [java]     at com.sun.mail.imap.protocol.IMAPProtocol.close(IMAPProtocol.java:976)
> [java]     at com.sun.mail.imap.IMAPFolder.close(IMAPFolder.java:1125)
> [java]     ... 12 more
> {code}

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


[jira] Updated: (CAMEL-1263) MailConsumer throws exception on line 113

Posted by "Michael Chen (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/activemq/browse/CAMEL-1263?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Michael Chen updated CAMEL-1263:
--------------------------------

    Description: 
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.
{code}
[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(IMAPFolder.java:1128)
[java]     at com.sun.mail.imap.IMAPFolder.close(IMAPFolder.java:1055)
[java]     at org.apache.camel.component.mail.MailConsumer.poll(MailConsumer.java:113)
[java]     at org.apache.camel.impl.ScheduledPollConsumer.run(ScheduledPollConsumer.java:66)
[java]     at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
[java]     at java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:317)
[java]     at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:150)
[java]     at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$101(ScheduledThreadPoolExecutor.java:98)
[java]     at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.runPeriodic(ScheduledThreadPoolExecutor.java:181)
[java]     at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:205)
[java]     at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
[java]     at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
[java]     at java.lang.Thread.run(Thread.java:619)
[java] Caused by: com.sun.mail.iap.CommandFailedException: A6 NO Mailbox is locked by POP server
[java]     at com.sun.mail.iap.Protocol.handleResult(Protocol.java:341)
[java]     at com.sun.mail.iap.Protocol.simpleCommand(Protocol.java:363)
[java]     at com.sun.mail.imap.protocol.IMAPProtocol.close(IMAPProtocol.java:976)
[java]     at com.sun.mail.imap.IMAPFolder.close(IMAPFolder.java:1125)
[java]     ... 12 more
{code}

  was:
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.
{code}
     [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(IMAPFolder.java:1128)
     [java]     at com.sun.mail.imap.IMAPFolder.close(IMAPFolder.java:1055)
     [java]     at org.apache.camel.component.mail.MailConsumer.poll(MailConsumer.java:113)
     [java]     at org.apache.camel.impl.ScheduledPollConsumer.run(ScheduledPollConsumer.java:66)
     [java]     at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
     [java]     at java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:317)
     [java]     at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:150)
     [java]     at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$101(ScheduledThreadPoolExecutor.java:98)
     [java]     at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.runPeriodic(ScheduledThreadPoolExecutor.java:181)
     [java]     at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:205)
     [java]     at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
     [java]     at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
     [java]     at java.lang.Thread.run(Thread.java:619)
     [java] Caused by: com.sun.mail.iap.CommandFailedException: A6 NO Mailbox is locked by POP server
     [java]     at com.sun.mail.iap.Protocol.handleResult(Protocol.java:341)
     [java]     at com.sun.mail.iap.Protocol.simpleCommand(Protocol.java:363)
     [java]     at com.sun.mail.imap.protocol.IMAPProtocol.close(IMAPProtocol.java:976)
     [java]     at com.sun.mail.imap.IMAPFolder.close(IMAPFolder.java:1125)
     [java]     ... 12 more
{code}


> MailConsumer throws exception on line 113
> -----------------------------------------
>
>                 Key: CAMEL-1263
>                 URL: https://issues.apache.org/activemq/browse/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.
> {code}
> [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(IMAPFolder.java:1128)
> [java]     at com.sun.mail.imap.IMAPFolder.close(IMAPFolder.java:1055)
> [java]     at org.apache.camel.component.mail.MailConsumer.poll(MailConsumer.java:113)
> [java]     at org.apache.camel.impl.ScheduledPollConsumer.run(ScheduledPollConsumer.java:66)
> [java]     at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
> [java]     at java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:317)
> [java]     at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:150)
> [java]     at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$101(ScheduledThreadPoolExecutor.java:98)
> [java]     at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.runPeriodic(ScheduledThreadPoolExecutor.java:181)
> [java]     at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:205)
> [java]     at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
> [java]     at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
> [java]     at java.lang.Thread.run(Thread.java:619)
> [java] Caused by: com.sun.mail.iap.CommandFailedException: A6 NO Mailbox is locked by POP server
> [java]     at com.sun.mail.iap.Protocol.handleResult(Protocol.java:341)
> [java]     at com.sun.mail.iap.Protocol.simpleCommand(Protocol.java:363)
> [java]     at com.sun.mail.imap.protocol.IMAPProtocol.close(IMAPProtocol.java:976)
> [java]     at com.sun.mail.imap.IMAPFolder.close(IMAPFolder.java:1125)
> [java]     ... 12 more
> {code}

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


[jira] Resolved: (CAMEL-1263) MailConsumer throws exception on line 113

Posted by "Claus Ibsen (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/activemq/browse/CAMEL-1263?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Claus Ibsen resolved CAMEL-1263.
--------------------------------

       Resolution: Fixed
    Fix Version/s: 2.0.0
                   1.5.1
         Assignee: Claus Ibsen

Thanks for reporting.

We now catch the MessagingException and log a debug message that closing the folder was not possible and ignore it.

> MailConsumer throws exception on line 113
> -----------------------------------------
>
>                 Key: CAMEL-1263
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-1263
>             Project: Apache Camel
>          Issue Type: Bug
>          Components: camel-mail
>    Affects Versions: 1.5.0
>         Environment: Camel
>            Reporter: Michael Chen
>            Assignee: Claus Ibsen
>             Fix For: 1.5.1, 2.0.0
>
>
> 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.
> {code}
> [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(IMAPFolder.java:1128)
> [java]     at com.sun.mail.imap.IMAPFolder.close(IMAPFolder.java:1055)
> [java]     at org.apache.camel.component.mail.MailConsumer.poll(MailConsumer.java:113)
> [java]     at org.apache.camel.impl.ScheduledPollConsumer.run(ScheduledPollConsumer.java:66)
> [java]     at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
> [java]     at java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:317)
> [java]     at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:150)
> [java]     at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$101(ScheduledThreadPoolExecutor.java:98)
> [java]     at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.runPeriodic(ScheduledThreadPoolExecutor.java:181)
> [java]     at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:205)
> [java]     at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
> [java]     at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
> [java]     at java.lang.Thread.run(Thread.java:619)
> [java] Caused by: com.sun.mail.iap.CommandFailedException: A6 NO Mailbox is locked by POP server
> [java]     at com.sun.mail.iap.Protocol.handleResult(Protocol.java:341)
> [java]     at com.sun.mail.iap.Protocol.simpleCommand(Protocol.java:363)
> [java]     at com.sun.mail.imap.protocol.IMAPProtocol.close(IMAPProtocol.java:976)
> [java]     at com.sun.mail.imap.IMAPFolder.close(IMAPFolder.java:1125)
> [java]     ... 12 more
> {code}

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


[jira] Updated: (CAMEL-1263) MailConsumer throws exception on line 113

Posted by "Michael Chen (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/activemq/browse/CAMEL-1263?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Michael Chen updated CAMEL-1263:
--------------------------------


Note that there were no exception thrown inside the matching try block above line 113 of MailConsumer.  The processing of the mail (empty) folder was successful.

> MailConsumer throws exception on line 113
> -----------------------------------------
>
>                 Key: CAMEL-1263
>                 URL: https://issues.apache.org/activemq/browse/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.
> {code}
> [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(IMAPFolder.java:1128)
> [java]     at com.sun.mail.imap.IMAPFolder.close(IMAPFolder.java:1055)
> [java]     at org.apache.camel.component.mail.MailConsumer.poll(MailConsumer.java:113)
> [java]     at org.apache.camel.impl.ScheduledPollConsumer.run(ScheduledPollConsumer.java:66)
> [java]     at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
> [java]     at java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:317)
> [java]     at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:150)
> [java]     at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$101(ScheduledThreadPoolExecutor.java:98)
> [java]     at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.runPeriodic(ScheduledThreadPoolExecutor.java:181)
> [java]     at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:205)
> [java]     at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
> [java]     at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
> [java]     at java.lang.Thread.run(Thread.java:619)
> [java] Caused by: com.sun.mail.iap.CommandFailedException: A6 NO Mailbox is locked by POP server
> [java]     at com.sun.mail.iap.Protocol.handleResult(Protocol.java:341)
> [java]     at com.sun.mail.iap.Protocol.simpleCommand(Protocol.java:363)
> [java]     at com.sun.mail.imap.protocol.IMAPProtocol.close(IMAPProtocol.java:976)
> [java]     at com.sun.mail.imap.IMAPFolder.close(IMAPFolder.java:1125)
> [java]     ... 12 more
> {code}

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


[jira] Commented: (CAMEL-1263) MailConsumer throws exception on line 113

Posted by "Michael Chen (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/CAMEL-1263?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=48773#action_48773 ] 

Michael Chen commented on CAMEL-1263:
-------------------------------------

The mail server is running on Fedora Core 4, version cyrus_imapd-2.2.12-6.fc4.

> MailConsumer throws exception on line 113
> -----------------------------------------
>
>                 Key: CAMEL-1263
>                 URL: https://issues.apache.org/activemq/browse/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.
> {code}
> [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(IMAPFolder.java:1128)
> [java]     at com.sun.mail.imap.IMAPFolder.close(IMAPFolder.java:1055)
> [java]     at org.apache.camel.component.mail.MailConsumer.poll(MailConsumer.java:113)
> [java]     at org.apache.camel.impl.ScheduledPollConsumer.run(ScheduledPollConsumer.java:66)
> [java]     at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
> [java]     at java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:317)
> [java]     at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:150)
> [java]     at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$101(ScheduledThreadPoolExecutor.java:98)
> [java]     at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.runPeriodic(ScheduledThreadPoolExecutor.java:181)
> [java]     at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:205)
> [java]     at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
> [java]     at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
> [java]     at java.lang.Thread.run(Thread.java:619)
> [java] Caused by: com.sun.mail.iap.CommandFailedException: A6 NO Mailbox is locked by POP server
> [java]     at com.sun.mail.iap.Protocol.handleResult(Protocol.java:341)
> [java]     at com.sun.mail.iap.Protocol.simpleCommand(Protocol.java:363)
> [java]     at com.sun.mail.imap.protocol.IMAPProtocol.close(IMAPProtocol.java:976)
> [java]     at com.sun.mail.imap.IMAPFolder.close(IMAPFolder.java:1125)
> [java]     ... 12 more
> {code}

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


[jira] Commented: (CAMEL-1263) MailConsumer throws exception on line 113

Posted by "Michael Chen (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/CAMEL-1263?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=48739#action_48739 ] 

Michael Chen commented on CAMEL-1263:
-------------------------------------

It turns out regardless whether there is mail in the mailbox or not, the folder.close() line always throw this exception.

> MailConsumer throws exception on line 113
> -----------------------------------------
>
>                 Key: CAMEL-1263
>                 URL: https://issues.apache.org/activemq/browse/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.
> {code}
> [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(IMAPFolder.java:1128)
> [java]     at com.sun.mail.imap.IMAPFolder.close(IMAPFolder.java:1055)
> [java]     at org.apache.camel.component.mail.MailConsumer.poll(MailConsumer.java:113)
> [java]     at org.apache.camel.impl.ScheduledPollConsumer.run(ScheduledPollConsumer.java:66)
> [java]     at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
> [java]     at java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:317)
> [java]     at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:150)
> [java]     at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$101(ScheduledThreadPoolExecutor.java:98)
> [java]     at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.runPeriodic(ScheduledThreadPoolExecutor.java:181)
> [java]     at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:205)
> [java]     at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
> [java]     at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
> [java]     at java.lang.Thread.run(Thread.java:619)
> [java] Caused by: com.sun.mail.iap.CommandFailedException: A6 NO Mailbox is locked by POP server
> [java]     at com.sun.mail.iap.Protocol.handleResult(Protocol.java:341)
> [java]     at com.sun.mail.iap.Protocol.simpleCommand(Protocol.java:363)
> [java]     at com.sun.mail.imap.protocol.IMAPProtocol.close(IMAPProtocol.java:976)
> [java]     at com.sun.mail.imap.IMAPFolder.close(IMAPFolder.java:1125)
> [java]     ... 12 more
> {code}

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


[jira] Updated: (CAMEL-1263) MailConsumer throws exception on line 113

Posted by "Michael Chen (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/activemq/browse/CAMEL-1263?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Michael Chen updated CAMEL-1263:
--------------------------------

    Description: 
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.
{code}
     [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(IMAPFolder.java:1128)
     [java]     at com.sun.mail.imap.IMAPFolder.close(IMAPFolder.java:1055)
     [java]     at org.apache.camel.component.mail.MailConsumer.poll(MailConsumer.java:113)
     [java]     at org.apache.camel.impl.ScheduledPollConsumer.run(ScheduledPollConsumer.java:66)
     [java]     at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
     [java]     at java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:317)
     [java]     at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:150)
     [java]     at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$101(ScheduledThreadPoolExecutor.java:98)
     [java]     at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.runPeriodic(ScheduledThreadPoolExecutor.java:181)
     [java]     at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:205)
     [java]     at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
     [java]     at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
     [java]     at java.lang.Thread.run(Thread.java:619)
     [java] Caused by: com.sun.mail.iap.CommandFailedException: A6 NO Mailbox is locked by POP server
     [java]     at com.sun.mail.iap.Protocol.handleResult(Protocol.java:341)
     [java]     at com.sun.mail.iap.Protocol.simpleCommand(Protocol.java:363)
     [java]     at com.sun.mail.imap.protocol.IMAPProtocol.close(IMAPProtocol.java:976)
     [java]     at com.sun.mail.imap.IMAPFolder.close(IMAPFolder.java:1125)
     [java]     ... 12 more
{code}

  was:
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(IMAPFolder.java:1128)
     [java]     at com.sun.mail.imap.IMAPFolder.close(IMAPFolder.java:1055)
     [java]     at org.apache.camel.component.mail.MailConsumer.poll(MailConsumer.java:113)
     [java]     at org.apache.camel.impl.ScheduledPollConsumer.run(ScheduledPollConsumer.java:66)
     [java]     at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
     [java]     at java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:317)
     [java]     at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:150)
     [java]     at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$101(ScheduledThreadPoolExecutor.java:98)
     [java]     at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.runPeriodic(ScheduledThreadPoolExecutor.java:181)
     [java]     at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:205)
     [java]     at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
     [java]     at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
     [java]     at java.lang.Thread.run(Thread.java:619)
     [java] Caused by: com.sun.mail.iap.CommandFailedException: A6 NO Mailbox is locked by POP server
     [java]     at com.sun.mail.iap.Protocol.handleResult(Protocol.java:341)
     [java]     at com.sun.mail.iap.Protocol.simpleCommand(Protocol.java:363)
     [java]     at com.sun.mail.imap.protocol.IMAPProtocol.close(IMAPProtocol.java:976)
     [java]     at com.sun.mail.imap.IMAPFolder.close(IMAPFolder.java:1125)
     [java]     ... 12 more



> MailConsumer throws exception on line 113
> -----------------------------------------
>
>                 Key: CAMEL-1263
>                 URL: https://issues.apache.org/activemq/browse/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.
> {code}
>      [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(IMAPFolder.java:1128)
>      [java]     at com.sun.mail.imap.IMAPFolder.close(IMAPFolder.java:1055)
>      [java]     at org.apache.camel.component.mail.MailConsumer.poll(MailConsumer.java:113)
>      [java]     at org.apache.camel.impl.ScheduledPollConsumer.run(ScheduledPollConsumer.java:66)
>      [java]     at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
>      [java]     at java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:317)
>      [java]     at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:150)
>      [java]     at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$101(ScheduledThreadPoolExecutor.java:98)
>      [java]     at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.runPeriodic(ScheduledThreadPoolExecutor.java:181)
>      [java]     at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:205)
>      [java]     at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
>      [java]     at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
>      [java]     at java.lang.Thread.run(Thread.java:619)
>      [java] Caused by: com.sun.mail.iap.CommandFailedException: A6 NO Mailbox is locked by POP server
>      [java]     at com.sun.mail.iap.Protocol.handleResult(Protocol.java:341)
>      [java]     at com.sun.mail.iap.Protocol.simpleCommand(Protocol.java:363)
>      [java]     at com.sun.mail.imap.protocol.IMAPProtocol.close(IMAPProtocol.java:976)
>      [java]     at com.sun.mail.imap.IMAPFolder.close(IMAPFolder.java:1125)
>      [java]     ... 12 more
> {code}

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


[jira] Issue Comment Edited: (CAMEL-1263) MailConsumer throws exception on line 113

Posted by "Michael Chen (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/CAMEL-1263?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=48739#action_48739 ] 

mwc_tonesoft edited comment on CAMEL-1263 at 1/15/09 11:32 AM:
---------------------------------------------------------------

It turns out regardless whether there is mail in the mailbox or not, the folder.close(true) line always throw this exception.

      was (Author: mwc_tonesoft):
    It turns out regardless whether there is mail in the mailbox or not, the folder.close() line always throw this exception.
  
> MailConsumer throws exception on line 113
> -----------------------------------------
>
>                 Key: CAMEL-1263
>                 URL: https://issues.apache.org/activemq/browse/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.
> {code}
> [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(IMAPFolder.java:1128)
> [java]     at com.sun.mail.imap.IMAPFolder.close(IMAPFolder.java:1055)
> [java]     at org.apache.camel.component.mail.MailConsumer.poll(MailConsumer.java:113)
> [java]     at org.apache.camel.impl.ScheduledPollConsumer.run(ScheduledPollConsumer.java:66)
> [java]     at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
> [java]     at java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:317)
> [java]     at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:150)
> [java]     at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$101(ScheduledThreadPoolExecutor.java:98)
> [java]     at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.runPeriodic(ScheduledThreadPoolExecutor.java:181)
> [java]     at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:205)
> [java]     at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
> [java]     at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
> [java]     at java.lang.Thread.run(Thread.java:619)
> [java] Caused by: com.sun.mail.iap.CommandFailedException: A6 NO Mailbox is locked by POP server
> [java]     at com.sun.mail.iap.Protocol.handleResult(Protocol.java:341)
> [java]     at com.sun.mail.iap.Protocol.simpleCommand(Protocol.java:363)
> [java]     at com.sun.mail.imap.protocol.IMAPProtocol.close(IMAPProtocol.java:976)
> [java]     at com.sun.mail.imap.IMAPFolder.close(IMAPFolder.java:1125)
> [java]     ... 12 more
> {code}

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