You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@camel.apache.org by "Christopher Hunt (JIRA)" <ji...@apache.org> on 2009/11/26 12:13:52 UTC

[jira] Created: (CAMEL-2231) Exception during mail connection requires folder to be reset

Exception during mail connection requires folder to be reset
------------------------------------------------------------

                 Key: CAMEL-2231
                 URL: https://issues.apache.org/activemq/browse/CAMEL-2231
             Project: Apache Camel
          Issue Type: Bug
          Components: camel-mail
    Affects Versions: 2.0.0, 1.6.2
         Environment: 2.1-SNAPSHOT
            Reporter: Christopher Hunt


I think that this problem may still be around with 2.1-SNAPSHOT:

http://fusesource.com/forums/thread.jspa?threadID=746&tstart=0

I noticed that I had a pop3 server outage and then subsequently had a similar problem i.e. IllegalStateException, folder not open.

Here's when the outage started.

{code}
2009-11-26 11:57:55,316 [: MailComponent] WARN  ultPollingConsumerPollStrategy - Consumer Consumer[pop3://...] could not poll endpoint: pop3://... caused by: Connect failed
javax.mail.MessagingException: Connect failed;
  nested exception is:
        java.net.NoRouteToHostException: No route to host
        at com.sun.mail.pop3.POP3Store.protocolConnect(POP3Store.java:161)
        at javax.mail.Service.connect(Service.java:288)
        at org.apache.camel.component.mail.MailConsumer.ensureIsConnected(MailConsumer.java:241)
        at org.apache.camel.component.mail.MailConsumer.poll(MailConsumer.java:79)
        at org.apache.camel.impl.ScheduledPollConsumer.run(ScheduledPollConsumer.java:108)
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
        at java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:317)
        at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:150)
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$101(ScheduledThreadPoolExecutor.java:98)
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.runPeriodic(ScheduledThreadPoolExecutor.java:181)
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:205)
        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:619)
Caused by: java.net.NoRouteToHostException: No route to host
        at java.net.PlainSocketImpl.socketConnect(Native Method)
        at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)
        at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)
        at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)
        at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)
        at java.net.Socket.connect(Socket.java:519)
        at java.net.Socket.connect(Socket.java:469)
        at com.sun.mail.util.SocketFetcher.createSocket(SocketFetcher.java:233)
        at com.sun.mail.util.SocketFetcher.getSocket(SocketFetcher.java:189)
        at com.sun.mail.pop3.Protocol.<init>(Protocol.java:94)
        at com.sun.mail.pop3.POP3Store.getPort(POP3Store.java:214)
        at com.sun.mail.pop3.POP3Store.protocolConnect(POP3Store.java:157)
        ... 13 more
{code}

This went on for about a minute or so and there was no more in the log file until several hours later - in fact when an email appeared in the INBOX. I know this because my personal email account was copied on the email and so I have the timestamp.

I then get the following message every time I poll the server and have to re-start my application to get over it:

{code}
2009-11-26 19:19:57,293 [: MailComponent] ERROR MailConsumer                   - Folder not open
java.lang.IllegalStateException: Folder not open
        at javax.mail.Folder.getMessages(Folder.java:938)
        at javax.mail.Folder.search(Folder.java:1226)
        at org.apache.camel.component.mail.MailConsumer.poll(MailConsumer.java:107)
        at org.apache.camel.impl.ScheduledPollConsumer.run(ScheduledPollConsumer.java:108)
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
        at java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:317)
        at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:150)
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$101(ScheduledThreadPoolExecutor.java:98)
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.runPeriodic(ScheduledThreadPoolExecutor.java:181)
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:205)
        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:619)
{code}

I took a look at MailConsumer.java and note the following code:

{code}
236	        if (!connected) {
237	            if (LOG.isDebugEnabled()) {
238	                LOG.debug("Connecting to MailStore: " + endpoint.getConfiguration().getMailStoreLogInformation());
239	            }
240	            store = sender.getSession().getStore(config.getProtocol());
241	            store.connect(config.getHost(), config.getPort(), config.getUsername(), config.getPassword());
242	        }
{code}

If you're not connected then how is it possible to have a folder? Following this logic my recommendation is to insert the following at line 242:

{code}
241	            store.connect(config.getHost(), config.getPort(), config.getUsername(), config.getPassword());
                    folder = null;
242	        }
{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-2231) Exception during mail connection requires folder to be reset

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

Claus Ibsen commented on CAMEL-2231:
------------------------------------

Merged to 1.x: 884527.

> Exception during mail connection requires folder to be reset
> ------------------------------------------------------------
>
>                 Key: CAMEL-2231
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-2231
>             Project: Apache Camel
>          Issue Type: Bug
>          Components: camel-mail
>    Affects Versions: 1.6.2, 2.0.0
>         Environment: 2.1-SNAPSHOT
>            Reporter: Christopher Hunt
>            Assignee: Claus Ibsen
>             Fix For: 1.6.3, 2.1.0
>
>   Original Estimate: 2 hours
>  Remaining Estimate: 2 hours
>
> I think that this problem may still be around with 2.1-SNAPSHOT:
> http://fusesource.com/forums/thread.jspa?threadID=746&tstart=0
> I noticed that I had a pop3 server outage and then subsequently had a similar problem i.e. IllegalStateException, folder not open.
> Here's when the outage started.
> {code}
> 2009-11-26 11:57:55,316 [: MailComponent] WARN  ultPollingConsumerPollStrategy - Consumer Consumer[pop3://...] could not poll endpoint: pop3://... caused by: Connect failed
> javax.mail.MessagingException: Connect failed;
>   nested exception is:
>         java.net.NoRouteToHostException: No route to host
>         at com.sun.mail.pop3.POP3Store.protocolConnect(POP3Store.java:161)
>         at javax.mail.Service.connect(Service.java:288)
>         at org.apache.camel.component.mail.MailConsumer.ensureIsConnected(MailConsumer.java:241)
>         at org.apache.camel.component.mail.MailConsumer.poll(MailConsumer.java:79)
>         at org.apache.camel.impl.ScheduledPollConsumer.run(ScheduledPollConsumer.java:108)
>         at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
>         at java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:317)
>         at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:150)
>         at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$101(ScheduledThreadPoolExecutor.java:98)
>         at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.runPeriodic(ScheduledThreadPoolExecutor.java:181)
>         at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:205)
>         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:619)
> Caused by: java.net.NoRouteToHostException: No route to host
>         at java.net.PlainSocketImpl.socketConnect(Native Method)
>         at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)
>         at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)
>         at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)
>         at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)
>         at java.net.Socket.connect(Socket.java:519)
>         at java.net.Socket.connect(Socket.java:469)
>         at com.sun.mail.util.SocketFetcher.createSocket(SocketFetcher.java:233)
>         at com.sun.mail.util.SocketFetcher.getSocket(SocketFetcher.java:189)
>         at com.sun.mail.pop3.Protocol.<init>(Protocol.java:94)
>         at com.sun.mail.pop3.POP3Store.getPort(POP3Store.java:214)
>         at com.sun.mail.pop3.POP3Store.protocolConnect(POP3Store.java:157)
>         ... 13 more
> {code}
> This went on for about a minute or so and there was no more in the log file until several hours later - in fact when an email appeared in the INBOX. I know this because my personal email account was copied on the email and so I have the timestamp.
> I then get the following message every time I poll the server and have to re-start my application to get over it:
> {code}
> 2009-11-26 19:19:57,293 [: MailComponent] ERROR MailConsumer                   - Folder not open
> java.lang.IllegalStateException: Folder not open
>         at javax.mail.Folder.getMessages(Folder.java:938)
>         at javax.mail.Folder.search(Folder.java:1226)
>         at org.apache.camel.component.mail.MailConsumer.poll(MailConsumer.java:107)
>         at org.apache.camel.impl.ScheduledPollConsumer.run(ScheduledPollConsumer.java:108)
>         at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
>         at java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:317)
>         at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:150)
>         at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$101(ScheduledThreadPoolExecutor.java:98)
>         at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.runPeriodic(ScheduledThreadPoolExecutor.java:181)
>         at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:205)
>         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:619)
> {code}
> I took a look at MailConsumer.java and note the following code:
> {code}
> 236	        if (!connected) {
> 237	            if (LOG.isDebugEnabled()) {
> 238	                LOG.debug("Connecting to MailStore: " + endpoint.getConfiguration().getMailStoreLogInformation());
> 239	            }
> 240	            store = sender.getSession().getStore(config.getProtocol());
> 241	            store.connect(config.getHost(), config.getPort(), config.getUsername(), config.getPassword());
> 242	        }
> {code}
> If you're not connected then how is it possible to have a folder? Following this logic my recommendation is to insert the following at line 242:
> {code}
> 241	            store.connect(config.getHost(), config.getPort(), config.getUsername(), config.getPassword());
>                     folder = null;
> 242	        }
> {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-2231) Exception during mail connection requires folder to be reset

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

Claus Ibsen updated CAMEL-2231:
-------------------------------

    Attachment: camel-mail-2.1-SNAPSHOT.jar

> Exception during mail connection requires folder to be reset
> ------------------------------------------------------------
>
>                 Key: CAMEL-2231
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-2231
>             Project: Apache Camel
>          Issue Type: Bug
>          Components: camel-mail
>    Affects Versions: 1.6.2, 2.0.0
>         Environment: 2.1-SNAPSHOT
>            Reporter: Christopher Hunt
>            Assignee: Claus Ibsen
>             Fix For: 1.6.3, 2.1.0
>
>         Attachments: camel-mail-2.1-SNAPSHOT.jar
>
>   Original Estimate: 2 hours
>  Remaining Estimate: 2 hours
>
> I think that this problem may still be around with 2.1-SNAPSHOT:
> http://fusesource.com/forums/thread.jspa?threadID=746&tstart=0
> I noticed that I had a pop3 server outage and then subsequently had a similar problem i.e. IllegalStateException, folder not open.
> Here's when the outage started.
> {code}
> 2009-11-26 11:57:55,316 [: MailComponent] WARN  ultPollingConsumerPollStrategy - Consumer Consumer[pop3://...] could not poll endpoint: pop3://... caused by: Connect failed
> javax.mail.MessagingException: Connect failed;
>   nested exception is:
>         java.net.NoRouteToHostException: No route to host
>         at com.sun.mail.pop3.POP3Store.protocolConnect(POP3Store.java:161)
>         at javax.mail.Service.connect(Service.java:288)
>         at org.apache.camel.component.mail.MailConsumer.ensureIsConnected(MailConsumer.java:241)
>         at org.apache.camel.component.mail.MailConsumer.poll(MailConsumer.java:79)
>         at org.apache.camel.impl.ScheduledPollConsumer.run(ScheduledPollConsumer.java:108)
>         at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
>         at java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:317)
>         at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:150)
>         at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$101(ScheduledThreadPoolExecutor.java:98)
>         at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.runPeriodic(ScheduledThreadPoolExecutor.java:181)
>         at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:205)
>         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:619)
> Caused by: java.net.NoRouteToHostException: No route to host
>         at java.net.PlainSocketImpl.socketConnect(Native Method)
>         at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)
>         at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)
>         at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)
>         at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)
>         at java.net.Socket.connect(Socket.java:519)
>         at java.net.Socket.connect(Socket.java:469)
>         at com.sun.mail.util.SocketFetcher.createSocket(SocketFetcher.java:233)
>         at com.sun.mail.util.SocketFetcher.getSocket(SocketFetcher.java:189)
>         at com.sun.mail.pop3.Protocol.<init>(Protocol.java:94)
>         at com.sun.mail.pop3.POP3Store.getPort(POP3Store.java:214)
>         at com.sun.mail.pop3.POP3Store.protocolConnect(POP3Store.java:157)
>         ... 13 more
> {code}
> This went on for about a minute or so and there was no more in the log file until several hours later - in fact when an email appeared in the INBOX. I know this because my personal email account was copied on the email and so I have the timestamp.
> I then get the following message every time I poll the server and have to re-start my application to get over it:
> {code}
> 2009-11-26 19:19:57,293 [: MailComponent] ERROR MailConsumer                   - Folder not open
> java.lang.IllegalStateException: Folder not open
>         at javax.mail.Folder.getMessages(Folder.java:938)
>         at javax.mail.Folder.search(Folder.java:1226)
>         at org.apache.camel.component.mail.MailConsumer.poll(MailConsumer.java:107)
>         at org.apache.camel.impl.ScheduledPollConsumer.run(ScheduledPollConsumer.java:108)
>         at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
>         at java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:317)
>         at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:150)
>         at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$101(ScheduledThreadPoolExecutor.java:98)
>         at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.runPeriodic(ScheduledThreadPoolExecutor.java:181)
>         at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:205)
>         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:619)
> {code}
> I took a look at MailConsumer.java and note the following code:
> {code}
> 236	        if (!connected) {
> 237	            if (LOG.isDebugEnabled()) {
> 238	                LOG.debug("Connecting to MailStore: " + endpoint.getConfiguration().getMailStoreLogInformation());
> 239	            }
> 240	            store = sender.getSession().getStore(config.getProtocol());
> 241	            store.connect(config.getHost(), config.getPort(), config.getUsername(), config.getPassword());
> 242	        }
> {code}
> If you're not connected then how is it possible to have a folder? Following this logic my recommendation is to insert the following at line 242:
> {code}
> 241	            store.connect(config.getHost(), config.getPort(), config.getUsername(), config.getPassword());
>                     folder = null;
> 242	        }
> {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-2231) Exception during mail connection requires folder to be reset

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

Claus Ibsen updated CAMEL-2231:
-------------------------------

    Fix Version/s: 2.1.0
                   1.6.3

> Exception during mail connection requires folder to be reset
> ------------------------------------------------------------
>
>                 Key: CAMEL-2231
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-2231
>             Project: Apache Camel
>          Issue Type: Bug
>          Components: camel-mail
>    Affects Versions: 1.6.2, 2.0.0
>         Environment: 2.1-SNAPSHOT
>            Reporter: Christopher Hunt
>            Assignee: Claus Ibsen
>             Fix For: 1.6.3, 2.1.0
>
>   Original Estimate: 2 hours
>  Remaining Estimate: 2 hours
>
> I think that this problem may still be around with 2.1-SNAPSHOT:
> http://fusesource.com/forums/thread.jspa?threadID=746&tstart=0
> I noticed that I had a pop3 server outage and then subsequently had a similar problem i.e. IllegalStateException, folder not open.
> Here's when the outage started.
> {code}
> 2009-11-26 11:57:55,316 [: MailComponent] WARN  ultPollingConsumerPollStrategy - Consumer Consumer[pop3://...] could not poll endpoint: pop3://... caused by: Connect failed
> javax.mail.MessagingException: Connect failed;
>   nested exception is:
>         java.net.NoRouteToHostException: No route to host
>         at com.sun.mail.pop3.POP3Store.protocolConnect(POP3Store.java:161)
>         at javax.mail.Service.connect(Service.java:288)
>         at org.apache.camel.component.mail.MailConsumer.ensureIsConnected(MailConsumer.java:241)
>         at org.apache.camel.component.mail.MailConsumer.poll(MailConsumer.java:79)
>         at org.apache.camel.impl.ScheduledPollConsumer.run(ScheduledPollConsumer.java:108)
>         at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
>         at java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:317)
>         at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:150)
>         at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$101(ScheduledThreadPoolExecutor.java:98)
>         at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.runPeriodic(ScheduledThreadPoolExecutor.java:181)
>         at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:205)
>         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:619)
> Caused by: java.net.NoRouteToHostException: No route to host
>         at java.net.PlainSocketImpl.socketConnect(Native Method)
>         at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)
>         at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)
>         at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)
>         at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)
>         at java.net.Socket.connect(Socket.java:519)
>         at java.net.Socket.connect(Socket.java:469)
>         at com.sun.mail.util.SocketFetcher.createSocket(SocketFetcher.java:233)
>         at com.sun.mail.util.SocketFetcher.getSocket(SocketFetcher.java:189)
>         at com.sun.mail.pop3.Protocol.<init>(Protocol.java:94)
>         at com.sun.mail.pop3.POP3Store.getPort(POP3Store.java:214)
>         at com.sun.mail.pop3.POP3Store.protocolConnect(POP3Store.java:157)
>         ... 13 more
> {code}
> This went on for about a minute or so and there was no more in the log file until several hours later - in fact when an email appeared in the INBOX. I know this because my personal email account was copied on the email and so I have the timestamp.
> I then get the following message every time I poll the server and have to re-start my application to get over it:
> {code}
> 2009-11-26 19:19:57,293 [: MailComponent] ERROR MailConsumer                   - Folder not open
> java.lang.IllegalStateException: Folder not open
>         at javax.mail.Folder.getMessages(Folder.java:938)
>         at javax.mail.Folder.search(Folder.java:1226)
>         at org.apache.camel.component.mail.MailConsumer.poll(MailConsumer.java:107)
>         at org.apache.camel.impl.ScheduledPollConsumer.run(ScheduledPollConsumer.java:108)
>         at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
>         at java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:317)
>         at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:150)
>         at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$101(ScheduledThreadPoolExecutor.java:98)
>         at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.runPeriodic(ScheduledThreadPoolExecutor.java:181)
>         at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:205)
>         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:619)
> {code}
> I took a look at MailConsumer.java and note the following code:
> {code}
> 236	        if (!connected) {
> 237	            if (LOG.isDebugEnabled()) {
> 238	                LOG.debug("Connecting to MailStore: " + endpoint.getConfiguration().getMailStoreLogInformation());
> 239	            }
> 240	            store = sender.getSession().getStore(config.getProtocol());
> 241	            store.connect(config.getHost(), config.getPort(), config.getUsername(), config.getPassword());
> 242	        }
> {code}
> If you're not connected then how is it possible to have a folder? Following this logic my recommendation is to insert the following at line 242:
> {code}
> 241	            store.connect(config.getHost(), config.getPort(), config.getUsername(), config.getPassword());
>                     folder = null;
> 242	        }
> {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-2231) Exception during mail connection requires folder to be reset

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

Claus Ibsen commented on CAMEL-2231:
------------------------------------

You can keep an eye on hudson if it has the fix in the deploy
http://hudson.zones.apache.org/hudson/job/Camel/changes

It deploys a new SNAPSHOT for every successful build

> Exception during mail connection requires folder to be reset
> ------------------------------------------------------------
>
>                 Key: CAMEL-2231
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-2231
>             Project: Apache Camel
>          Issue Type: Bug
>          Components: camel-mail
>    Affects Versions: 1.6.2, 2.0.0
>         Environment: 2.1-SNAPSHOT
>            Reporter: Christopher Hunt
>            Assignee: Claus Ibsen
>             Fix For: 1.6.3, 2.1.0
>
>         Attachments: camel-mail-2.1-SNAPSHOT.jar
>
>   Original Estimate: 2 hours
>  Remaining Estimate: 2 hours
>
> I think that this problem may still be around with 2.1-SNAPSHOT:
> http://fusesource.com/forums/thread.jspa?threadID=746&tstart=0
> I noticed that I had a pop3 server outage and then subsequently had a similar problem i.e. IllegalStateException, folder not open.
> Here's when the outage started.
> {code}
> 2009-11-26 11:57:55,316 [: MailComponent] WARN  ultPollingConsumerPollStrategy - Consumer Consumer[pop3://...] could not poll endpoint: pop3://... caused by: Connect failed
> javax.mail.MessagingException: Connect failed;
>   nested exception is:
>         java.net.NoRouteToHostException: No route to host
>         at com.sun.mail.pop3.POP3Store.protocolConnect(POP3Store.java:161)
>         at javax.mail.Service.connect(Service.java:288)
>         at org.apache.camel.component.mail.MailConsumer.ensureIsConnected(MailConsumer.java:241)
>         at org.apache.camel.component.mail.MailConsumer.poll(MailConsumer.java:79)
>         at org.apache.camel.impl.ScheduledPollConsumer.run(ScheduledPollConsumer.java:108)
>         at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
>         at java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:317)
>         at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:150)
>         at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$101(ScheduledThreadPoolExecutor.java:98)
>         at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.runPeriodic(ScheduledThreadPoolExecutor.java:181)
>         at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:205)
>         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:619)
> Caused by: java.net.NoRouteToHostException: No route to host
>         at java.net.PlainSocketImpl.socketConnect(Native Method)
>         at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)
>         at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)
>         at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)
>         at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)
>         at java.net.Socket.connect(Socket.java:519)
>         at java.net.Socket.connect(Socket.java:469)
>         at com.sun.mail.util.SocketFetcher.createSocket(SocketFetcher.java:233)
>         at com.sun.mail.util.SocketFetcher.getSocket(SocketFetcher.java:189)
>         at com.sun.mail.pop3.Protocol.<init>(Protocol.java:94)
>         at com.sun.mail.pop3.POP3Store.getPort(POP3Store.java:214)
>         at com.sun.mail.pop3.POP3Store.protocolConnect(POP3Store.java:157)
>         ... 13 more
> {code}
> This went on for about a minute or so and there was no more in the log file until several hours later - in fact when an email appeared in the INBOX. I know this because my personal email account was copied on the email and so I have the timestamp.
> I then get the following message every time I poll the server and have to re-start my application to get over it:
> {code}
> 2009-11-26 19:19:57,293 [: MailComponent] ERROR MailConsumer                   - Folder not open
> java.lang.IllegalStateException: Folder not open
>         at javax.mail.Folder.getMessages(Folder.java:938)
>         at javax.mail.Folder.search(Folder.java:1226)
>         at org.apache.camel.component.mail.MailConsumer.poll(MailConsumer.java:107)
>         at org.apache.camel.impl.ScheduledPollConsumer.run(ScheduledPollConsumer.java:108)
>         at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
>         at java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:317)
>         at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:150)
>         at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$101(ScheduledThreadPoolExecutor.java:98)
>         at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.runPeriodic(ScheduledThreadPoolExecutor.java:181)
>         at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:205)
>         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:619)
> {code}
> I took a look at MailConsumer.java and note the following code:
> {code}
> 236	        if (!connected) {
> 237	            if (LOG.isDebugEnabled()) {
> 238	                LOG.debug("Connecting to MailStore: " + endpoint.getConfiguration().getMailStoreLogInformation());
> 239	            }
> 240	            store = sender.getSession().getStore(config.getProtocol());
> 241	            store.connect(config.getHost(), config.getPort(), config.getUsername(), config.getPassword());
> 242	        }
> {code}
> If you're not connected then how is it possible to have a folder? Following this logic my recommendation is to insert the following at line 242:
> {code}
> 241	            store.connect(config.getHost(), config.getPort(), config.getUsername(), config.getPassword());
>                     folder = null;
> 242	        }
> {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-2231) Exception during mail connection requires folder to be reset

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

Claus Ibsen commented on CAMEL-2231:
------------------------------------

Yeah good idea, the same as I concluded as well.

Christopher can you try with updated code from trunk? And report your findings.

trunk: 884525.



> Exception during mail connection requires folder to be reset
> ------------------------------------------------------------
>
>                 Key: CAMEL-2231
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-2231
>             Project: Apache Camel
>          Issue Type: Bug
>          Components: camel-mail
>    Affects Versions: 1.6.2, 2.0.0
>         Environment: 2.1-SNAPSHOT
>            Reporter: Christopher Hunt
>            Assignee: Claus Ibsen
>   Original Estimate: 2 hours
>  Remaining Estimate: 2 hours
>
> I think that this problem may still be around with 2.1-SNAPSHOT:
> http://fusesource.com/forums/thread.jspa?threadID=746&tstart=0
> I noticed that I had a pop3 server outage and then subsequently had a similar problem i.e. IllegalStateException, folder not open.
> Here's when the outage started.
> {code}
> 2009-11-26 11:57:55,316 [: MailComponent] WARN  ultPollingConsumerPollStrategy - Consumer Consumer[pop3://...] could not poll endpoint: pop3://... caused by: Connect failed
> javax.mail.MessagingException: Connect failed;
>   nested exception is:
>         java.net.NoRouteToHostException: No route to host
>         at com.sun.mail.pop3.POP3Store.protocolConnect(POP3Store.java:161)
>         at javax.mail.Service.connect(Service.java:288)
>         at org.apache.camel.component.mail.MailConsumer.ensureIsConnected(MailConsumer.java:241)
>         at org.apache.camel.component.mail.MailConsumer.poll(MailConsumer.java:79)
>         at org.apache.camel.impl.ScheduledPollConsumer.run(ScheduledPollConsumer.java:108)
>         at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
>         at java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:317)
>         at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:150)
>         at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$101(ScheduledThreadPoolExecutor.java:98)
>         at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.runPeriodic(ScheduledThreadPoolExecutor.java:181)
>         at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:205)
>         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:619)
> Caused by: java.net.NoRouteToHostException: No route to host
>         at java.net.PlainSocketImpl.socketConnect(Native Method)
>         at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)
>         at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)
>         at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)
>         at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)
>         at java.net.Socket.connect(Socket.java:519)
>         at java.net.Socket.connect(Socket.java:469)
>         at com.sun.mail.util.SocketFetcher.createSocket(SocketFetcher.java:233)
>         at com.sun.mail.util.SocketFetcher.getSocket(SocketFetcher.java:189)
>         at com.sun.mail.pop3.Protocol.<init>(Protocol.java:94)
>         at com.sun.mail.pop3.POP3Store.getPort(POP3Store.java:214)
>         at com.sun.mail.pop3.POP3Store.protocolConnect(POP3Store.java:157)
>         ... 13 more
> {code}
> This went on for about a minute or so and there was no more in the log file until several hours later - in fact when an email appeared in the INBOX. I know this because my personal email account was copied on the email and so I have the timestamp.
> I then get the following message every time I poll the server and have to re-start my application to get over it:
> {code}
> 2009-11-26 19:19:57,293 [: MailComponent] ERROR MailConsumer                   - Folder not open
> java.lang.IllegalStateException: Folder not open
>         at javax.mail.Folder.getMessages(Folder.java:938)
>         at javax.mail.Folder.search(Folder.java:1226)
>         at org.apache.camel.component.mail.MailConsumer.poll(MailConsumer.java:107)
>         at org.apache.camel.impl.ScheduledPollConsumer.run(ScheduledPollConsumer.java:108)
>         at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
>         at java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:317)
>         at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:150)
>         at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$101(ScheduledThreadPoolExecutor.java:98)
>         at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.runPeriodic(ScheduledThreadPoolExecutor.java:181)
>         at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:205)
>         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:619)
> {code}
> I took a look at MailConsumer.java and note the following code:
> {code}
> 236	        if (!connected) {
> 237	            if (LOG.isDebugEnabled()) {
> 238	                LOG.debug("Connecting to MailStore: " + endpoint.getConfiguration().getMailStoreLogInformation());
> 239	            }
> 240	            store = sender.getSession().getStore(config.getProtocol());
> 241	            store.connect(config.getHost(), config.getPort(), config.getUsername(), config.getPassword());
> 242	        }
> {code}
> If you're not connected then how is it possible to have a folder? Following this logic my recommendation is to insert the following at line 242:
> {code}
> 241	            store.connect(config.getHost(), config.getPort(), config.getUsername(), config.getPassword());
>                     folder = null;
> 242	        }
> {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-2231) Exception during mail connection requires folder to be reset

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

Claus Ibsen resolved CAMEL-2231.
--------------------------------

    Resolution: Fixed

I will mark this as resolved for now in case Hadrian decides to build a RC of Camel as we want it to be released ASAP as SMX 4.1 is waiting for it as well.

> Exception during mail connection requires folder to be reset
> ------------------------------------------------------------
>
>                 Key: CAMEL-2231
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-2231
>             Project: Apache Camel
>          Issue Type: Bug
>          Components: camel-mail
>    Affects Versions: 1.6.2, 2.0.0
>         Environment: 2.1-SNAPSHOT
>            Reporter: Christopher Hunt
>            Assignee: Claus Ibsen
>             Fix For: 1.6.3, 2.1.0
>
>         Attachments: camel-mail-2.1-SNAPSHOT.jar
>
>   Original Estimate: 2 hours
>  Remaining Estimate: 2 hours
>
> I think that this problem may still be around with 2.1-SNAPSHOT:
> http://fusesource.com/forums/thread.jspa?threadID=746&tstart=0
> I noticed that I had a pop3 server outage and then subsequently had a similar problem i.e. IllegalStateException, folder not open.
> Here's when the outage started.
> {code}
> 2009-11-26 11:57:55,316 [: MailComponent] WARN  ultPollingConsumerPollStrategy - Consumer Consumer[pop3://...] could not poll endpoint: pop3://... caused by: Connect failed
> javax.mail.MessagingException: Connect failed;
>   nested exception is:
>         java.net.NoRouteToHostException: No route to host
>         at com.sun.mail.pop3.POP3Store.protocolConnect(POP3Store.java:161)
>         at javax.mail.Service.connect(Service.java:288)
>         at org.apache.camel.component.mail.MailConsumer.ensureIsConnected(MailConsumer.java:241)
>         at org.apache.camel.component.mail.MailConsumer.poll(MailConsumer.java:79)
>         at org.apache.camel.impl.ScheduledPollConsumer.run(ScheduledPollConsumer.java:108)
>         at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
>         at java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:317)
>         at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:150)
>         at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$101(ScheduledThreadPoolExecutor.java:98)
>         at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.runPeriodic(ScheduledThreadPoolExecutor.java:181)
>         at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:205)
>         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:619)
> Caused by: java.net.NoRouteToHostException: No route to host
>         at java.net.PlainSocketImpl.socketConnect(Native Method)
>         at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)
>         at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)
>         at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)
>         at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)
>         at java.net.Socket.connect(Socket.java:519)
>         at java.net.Socket.connect(Socket.java:469)
>         at com.sun.mail.util.SocketFetcher.createSocket(SocketFetcher.java:233)
>         at com.sun.mail.util.SocketFetcher.getSocket(SocketFetcher.java:189)
>         at com.sun.mail.pop3.Protocol.<init>(Protocol.java:94)
>         at com.sun.mail.pop3.POP3Store.getPort(POP3Store.java:214)
>         at com.sun.mail.pop3.POP3Store.protocolConnect(POP3Store.java:157)
>         ... 13 more
> {code}
> This went on for about a minute or so and there was no more in the log file until several hours later - in fact when an email appeared in the INBOX. I know this because my personal email account was copied on the email and so I have the timestamp.
> I then get the following message every time I poll the server and have to re-start my application to get over it:
> {code}
> 2009-11-26 19:19:57,293 [: MailComponent] ERROR MailConsumer                   - Folder not open
> java.lang.IllegalStateException: Folder not open
>         at javax.mail.Folder.getMessages(Folder.java:938)
>         at javax.mail.Folder.search(Folder.java:1226)
>         at org.apache.camel.component.mail.MailConsumer.poll(MailConsumer.java:107)
>         at org.apache.camel.impl.ScheduledPollConsumer.run(ScheduledPollConsumer.java:108)
>         at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
>         at java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:317)
>         at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:150)
>         at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$101(ScheduledThreadPoolExecutor.java:98)
>         at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.runPeriodic(ScheduledThreadPoolExecutor.java:181)
>         at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:205)
>         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:619)
> {code}
> I took a look at MailConsumer.java and note the following code:
> {code}
> 236	        if (!connected) {
> 237	            if (LOG.isDebugEnabled()) {
> 238	                LOG.debug("Connecting to MailStore: " + endpoint.getConfiguration().getMailStoreLogInformation());
> 239	            }
> 240	            store = sender.getSession().getStore(config.getProtocol());
> 241	            store.connect(config.getHost(), config.getPort(), config.getUsername(), config.getPassword());
> 242	        }
> {code}
> If you're not connected then how is it possible to have a folder? Following this logic my recommendation is to insert the following at line 242:
> {code}
> 241	            store.connect(config.getHost(), config.getPort(), config.getUsername(), config.getPassword());
>                     folder = null;
> 242	        }
> {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-2231) Exception during mail connection requires folder to be reset

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

Claus Ibsen commented on CAMEL-2231:
------------------------------------

Yeah I think i had the fix ready before you created the ticket :)

I will attach my local build .jar you can use instead of waiting for Hudson to build a new SNAPSHOT at Apache repo

> Exception during mail connection requires folder to be reset
> ------------------------------------------------------------
>
>                 Key: CAMEL-2231
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-2231
>             Project: Apache Camel
>          Issue Type: Bug
>          Components: camel-mail
>    Affects Versions: 1.6.2, 2.0.0
>         Environment: 2.1-SNAPSHOT
>            Reporter: Christopher Hunt
>            Assignee: Claus Ibsen
>             Fix For: 1.6.3, 2.1.0
>
>   Original Estimate: 2 hours
>  Remaining Estimate: 2 hours
>
> I think that this problem may still be around with 2.1-SNAPSHOT:
> http://fusesource.com/forums/thread.jspa?threadID=746&tstart=0
> I noticed that I had a pop3 server outage and then subsequently had a similar problem i.e. IllegalStateException, folder not open.
> Here's when the outage started.
> {code}
> 2009-11-26 11:57:55,316 [: MailComponent] WARN  ultPollingConsumerPollStrategy - Consumer Consumer[pop3://...] could not poll endpoint: pop3://... caused by: Connect failed
> javax.mail.MessagingException: Connect failed;
>   nested exception is:
>         java.net.NoRouteToHostException: No route to host
>         at com.sun.mail.pop3.POP3Store.protocolConnect(POP3Store.java:161)
>         at javax.mail.Service.connect(Service.java:288)
>         at org.apache.camel.component.mail.MailConsumer.ensureIsConnected(MailConsumer.java:241)
>         at org.apache.camel.component.mail.MailConsumer.poll(MailConsumer.java:79)
>         at org.apache.camel.impl.ScheduledPollConsumer.run(ScheduledPollConsumer.java:108)
>         at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
>         at java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:317)
>         at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:150)
>         at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$101(ScheduledThreadPoolExecutor.java:98)
>         at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.runPeriodic(ScheduledThreadPoolExecutor.java:181)
>         at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:205)
>         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:619)
> Caused by: java.net.NoRouteToHostException: No route to host
>         at java.net.PlainSocketImpl.socketConnect(Native Method)
>         at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)
>         at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)
>         at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)
>         at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)
>         at java.net.Socket.connect(Socket.java:519)
>         at java.net.Socket.connect(Socket.java:469)
>         at com.sun.mail.util.SocketFetcher.createSocket(SocketFetcher.java:233)
>         at com.sun.mail.util.SocketFetcher.getSocket(SocketFetcher.java:189)
>         at com.sun.mail.pop3.Protocol.<init>(Protocol.java:94)
>         at com.sun.mail.pop3.POP3Store.getPort(POP3Store.java:214)
>         at com.sun.mail.pop3.POP3Store.protocolConnect(POP3Store.java:157)
>         ... 13 more
> {code}
> This went on for about a minute or so and there was no more in the log file until several hours later - in fact when an email appeared in the INBOX. I know this because my personal email account was copied on the email and so I have the timestamp.
> I then get the following message every time I poll the server and have to re-start my application to get over it:
> {code}
> 2009-11-26 19:19:57,293 [: MailComponent] ERROR MailConsumer                   - Folder not open
> java.lang.IllegalStateException: Folder not open
>         at javax.mail.Folder.getMessages(Folder.java:938)
>         at javax.mail.Folder.search(Folder.java:1226)
>         at org.apache.camel.component.mail.MailConsumer.poll(MailConsumer.java:107)
>         at org.apache.camel.impl.ScheduledPollConsumer.run(ScheduledPollConsumer.java:108)
>         at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
>         at java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:317)
>         at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:150)
>         at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$101(ScheduledThreadPoolExecutor.java:98)
>         at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.runPeriodic(ScheduledThreadPoolExecutor.java:181)
>         at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:205)
>         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:619)
> {code}
> I took a look at MailConsumer.java and note the following code:
> {code}
> 236	        if (!connected) {
> 237	            if (LOG.isDebugEnabled()) {
> 238	                LOG.debug("Connecting to MailStore: " + endpoint.getConfiguration().getMailStoreLogInformation());
> 239	            }
> 240	            store = sender.getSession().getStore(config.getProtocol());
> 241	            store.connect(config.getHost(), config.getPort(), config.getUsername(), config.getPassword());
> 242	        }
> {code}
> If you're not connected then how is it possible to have a folder? Following this logic my recommendation is to insert the following at line 242:
> {code}
> 241	            store.connect(config.getHost(), config.getPort(), config.getUsername(), config.getPassword());
>                     folder = null;
> 242	        }
> {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-2231) Exception during mail connection requires folder to be reset

Posted by "Christopher Hunt (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/CAMEL-2231?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=56158#action_56158 ] 

Christopher Hunt commented on CAMEL-2231:
-----------------------------------------

Looks as though your patch fixed things up. I had a 2.1-SNAPSHOT service running over the weekend. There was an outage with the POP service which showed itself in the log file. I was then able to send an email subsequently (a day or so later) and all was well.

> Exception during mail connection requires folder to be reset
> ------------------------------------------------------------
>
>                 Key: CAMEL-2231
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-2231
>             Project: Apache Camel
>          Issue Type: Bug
>          Components: camel-mail
>    Affects Versions: 1.6.2, 2.0.0
>         Environment: 2.1-SNAPSHOT
>            Reporter: Christopher Hunt
>            Assignee: Claus Ibsen
>             Fix For: 1.6.3, 2.1.0
>
>         Attachments: camel-mail-2.1-SNAPSHOT.jar
>
>   Original Estimate: 2 hours
>  Remaining Estimate: 2 hours
>
> I think that this problem may still be around with 2.1-SNAPSHOT:
> http://fusesource.com/forums/thread.jspa?threadID=746&tstart=0
> I noticed that I had a pop3 server outage and then subsequently had a similar problem i.e. IllegalStateException, folder not open.
> Here's when the outage started.
> {code}
> 2009-11-26 11:57:55,316 [: MailComponent] WARN  ultPollingConsumerPollStrategy - Consumer Consumer[pop3://...] could not poll endpoint: pop3://... caused by: Connect failed
> javax.mail.MessagingException: Connect failed;
>   nested exception is:
>         java.net.NoRouteToHostException: No route to host
>         at com.sun.mail.pop3.POP3Store.protocolConnect(POP3Store.java:161)
>         at javax.mail.Service.connect(Service.java:288)
>         at org.apache.camel.component.mail.MailConsumer.ensureIsConnected(MailConsumer.java:241)
>         at org.apache.camel.component.mail.MailConsumer.poll(MailConsumer.java:79)
>         at org.apache.camel.impl.ScheduledPollConsumer.run(ScheduledPollConsumer.java:108)
>         at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
>         at java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:317)
>         at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:150)
>         at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$101(ScheduledThreadPoolExecutor.java:98)
>         at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.runPeriodic(ScheduledThreadPoolExecutor.java:181)
>         at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:205)
>         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:619)
> Caused by: java.net.NoRouteToHostException: No route to host
>         at java.net.PlainSocketImpl.socketConnect(Native Method)
>         at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)
>         at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)
>         at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)
>         at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)
>         at java.net.Socket.connect(Socket.java:519)
>         at java.net.Socket.connect(Socket.java:469)
>         at com.sun.mail.util.SocketFetcher.createSocket(SocketFetcher.java:233)
>         at com.sun.mail.util.SocketFetcher.getSocket(SocketFetcher.java:189)
>         at com.sun.mail.pop3.Protocol.<init>(Protocol.java:94)
>         at com.sun.mail.pop3.POP3Store.getPort(POP3Store.java:214)
>         at com.sun.mail.pop3.POP3Store.protocolConnect(POP3Store.java:157)
>         ... 13 more
> {code}
> This went on for about a minute or so and there was no more in the log file until several hours later - in fact when an email appeared in the INBOX. I know this because my personal email account was copied on the email and so I have the timestamp.
> I then get the following message every time I poll the server and have to re-start my application to get over it:
> {code}
> 2009-11-26 19:19:57,293 [: MailComponent] ERROR MailConsumer                   - Folder not open
> java.lang.IllegalStateException: Folder not open
>         at javax.mail.Folder.getMessages(Folder.java:938)
>         at javax.mail.Folder.search(Folder.java:1226)
>         at org.apache.camel.component.mail.MailConsumer.poll(MailConsumer.java:107)
>         at org.apache.camel.impl.ScheduledPollConsumer.run(ScheduledPollConsumer.java:108)
>         at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
>         at java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:317)
>         at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:150)
>         at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$101(ScheduledThreadPoolExecutor.java:98)
>         at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.runPeriodic(ScheduledThreadPoolExecutor.java:181)
>         at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:205)
>         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:619)
> {code}
> I took a look at MailConsumer.java and note the following code:
> {code}
> 236	        if (!connected) {
> 237	            if (LOG.isDebugEnabled()) {
> 238	                LOG.debug("Connecting to MailStore: " + endpoint.getConfiguration().getMailStoreLogInformation());
> 239	            }
> 240	            store = sender.getSession().getStore(config.getProtocol());
> 241	            store.connect(config.getHost(), config.getPort(), config.getUsername(), config.getPassword());
> 242	        }
> {code}
> If you're not connected then how is it possible to have a folder? Following this logic my recommendation is to insert the following at line 242:
> {code}
> 241	            store.connect(config.getHost(), config.getPort(), config.getUsername(), config.getPassword());
>                     folder = null;
> 242	        }
> {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-2231) Exception during mail connection requires folder to be reset

Posted by "Christopher Hunt (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/activemq/browse/CAMEL-2231?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=56125#action_56125 ] 

Christopher Hunt commented on CAMEL-2231:
-----------------------------------------

Gee that was a quick fix! Will this get automatically included in the next site build? I can rebuild my project in about 10 hours (late at night now). Should it not pick up your mod in the latest 2.1-snapshot?

> Exception during mail connection requires folder to be reset
> ------------------------------------------------------------
>
>                 Key: CAMEL-2231
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-2231
>             Project: Apache Camel
>          Issue Type: Bug
>          Components: camel-mail
>    Affects Versions: 1.6.2, 2.0.0
>         Environment: 2.1-SNAPSHOT
>            Reporter: Christopher Hunt
>            Assignee: Claus Ibsen
>             Fix For: 1.6.3, 2.1.0
>
>   Original Estimate: 2 hours
>  Remaining Estimate: 2 hours
>
> I think that this problem may still be around with 2.1-SNAPSHOT:
> http://fusesource.com/forums/thread.jspa?threadID=746&tstart=0
> I noticed that I had a pop3 server outage and then subsequently had a similar problem i.e. IllegalStateException, folder not open.
> Here's when the outage started.
> {code}
> 2009-11-26 11:57:55,316 [: MailComponent] WARN  ultPollingConsumerPollStrategy - Consumer Consumer[pop3://...] could not poll endpoint: pop3://... caused by: Connect failed
> javax.mail.MessagingException: Connect failed;
>   nested exception is:
>         java.net.NoRouteToHostException: No route to host
>         at com.sun.mail.pop3.POP3Store.protocolConnect(POP3Store.java:161)
>         at javax.mail.Service.connect(Service.java:288)
>         at org.apache.camel.component.mail.MailConsumer.ensureIsConnected(MailConsumer.java:241)
>         at org.apache.camel.component.mail.MailConsumer.poll(MailConsumer.java:79)
>         at org.apache.camel.impl.ScheduledPollConsumer.run(ScheduledPollConsumer.java:108)
>         at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
>         at java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:317)
>         at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:150)
>         at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$101(ScheduledThreadPoolExecutor.java:98)
>         at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.runPeriodic(ScheduledThreadPoolExecutor.java:181)
>         at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:205)
>         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:619)
> Caused by: java.net.NoRouteToHostException: No route to host
>         at java.net.PlainSocketImpl.socketConnect(Native Method)
>         at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)
>         at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)
>         at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)
>         at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)
>         at java.net.Socket.connect(Socket.java:519)
>         at java.net.Socket.connect(Socket.java:469)
>         at com.sun.mail.util.SocketFetcher.createSocket(SocketFetcher.java:233)
>         at com.sun.mail.util.SocketFetcher.getSocket(SocketFetcher.java:189)
>         at com.sun.mail.pop3.Protocol.<init>(Protocol.java:94)
>         at com.sun.mail.pop3.POP3Store.getPort(POP3Store.java:214)
>         at com.sun.mail.pop3.POP3Store.protocolConnect(POP3Store.java:157)
>         ... 13 more
> {code}
> This went on for about a minute or so and there was no more in the log file until several hours later - in fact when an email appeared in the INBOX. I know this because my personal email account was copied on the email and so I have the timestamp.
> I then get the following message every time I poll the server and have to re-start my application to get over it:
> {code}
> 2009-11-26 19:19:57,293 [: MailComponent] ERROR MailConsumer                   - Folder not open
> java.lang.IllegalStateException: Folder not open
>         at javax.mail.Folder.getMessages(Folder.java:938)
>         at javax.mail.Folder.search(Folder.java:1226)
>         at org.apache.camel.component.mail.MailConsumer.poll(MailConsumer.java:107)
>         at org.apache.camel.impl.ScheduledPollConsumer.run(ScheduledPollConsumer.java:108)
>         at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
>         at java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:317)
>         at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:150)
>         at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$101(ScheduledThreadPoolExecutor.java:98)
>         at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.runPeriodic(ScheduledThreadPoolExecutor.java:181)
>         at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:205)
>         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:619)
> {code}
> I took a look at MailConsumer.java and note the following code:
> {code}
> 236	        if (!connected) {
> 237	            if (LOG.isDebugEnabled()) {
> 238	                LOG.debug("Connecting to MailStore: " + endpoint.getConfiguration().getMailStoreLogInformation());
> 239	            }
> 240	            store = sender.getSession().getStore(config.getProtocol());
> 241	            store.connect(config.getHost(), config.getPort(), config.getUsername(), config.getPassword());
> 242	        }
> {code}
> If you're not connected then how is it possible to have a folder? Following this logic my recommendation is to insert the following at line 242:
> {code}
> 241	            store.connect(config.getHost(), config.getPort(), config.getUsername(), config.getPassword());
>                     folder = null;
> 242	        }
> {code}

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


[jira] Assigned: (CAMEL-2231) Exception during mail connection requires folder to be reset

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

Claus Ibsen reassigned CAMEL-2231:
----------------------------------

    Assignee: Claus Ibsen

> Exception during mail connection requires folder to be reset
> ------------------------------------------------------------
>
>                 Key: CAMEL-2231
>                 URL: https://issues.apache.org/activemq/browse/CAMEL-2231
>             Project: Apache Camel
>          Issue Type: Bug
>          Components: camel-mail
>    Affects Versions: 1.6.2, 2.0.0
>         Environment: 2.1-SNAPSHOT
>            Reporter: Christopher Hunt
>            Assignee: Claus Ibsen
>   Original Estimate: 2 hours
>  Remaining Estimate: 2 hours
>
> I think that this problem may still be around with 2.1-SNAPSHOT:
> http://fusesource.com/forums/thread.jspa?threadID=746&tstart=0
> I noticed that I had a pop3 server outage and then subsequently had a similar problem i.e. IllegalStateException, folder not open.
> Here's when the outage started.
> {code}
> 2009-11-26 11:57:55,316 [: MailComponent] WARN  ultPollingConsumerPollStrategy - Consumer Consumer[pop3://...] could not poll endpoint: pop3://... caused by: Connect failed
> javax.mail.MessagingException: Connect failed;
>   nested exception is:
>         java.net.NoRouteToHostException: No route to host
>         at com.sun.mail.pop3.POP3Store.protocolConnect(POP3Store.java:161)
>         at javax.mail.Service.connect(Service.java:288)
>         at org.apache.camel.component.mail.MailConsumer.ensureIsConnected(MailConsumer.java:241)
>         at org.apache.camel.component.mail.MailConsumer.poll(MailConsumer.java:79)
>         at org.apache.camel.impl.ScheduledPollConsumer.run(ScheduledPollConsumer.java:108)
>         at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
>         at java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:317)
>         at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:150)
>         at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$101(ScheduledThreadPoolExecutor.java:98)
>         at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.runPeriodic(ScheduledThreadPoolExecutor.java:181)
>         at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:205)
>         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:619)
> Caused by: java.net.NoRouteToHostException: No route to host
>         at java.net.PlainSocketImpl.socketConnect(Native Method)
>         at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)
>         at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)
>         at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)
>         at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)
>         at java.net.Socket.connect(Socket.java:519)
>         at java.net.Socket.connect(Socket.java:469)
>         at com.sun.mail.util.SocketFetcher.createSocket(SocketFetcher.java:233)
>         at com.sun.mail.util.SocketFetcher.getSocket(SocketFetcher.java:189)
>         at com.sun.mail.pop3.Protocol.<init>(Protocol.java:94)
>         at com.sun.mail.pop3.POP3Store.getPort(POP3Store.java:214)
>         at com.sun.mail.pop3.POP3Store.protocolConnect(POP3Store.java:157)
>         ... 13 more
> {code}
> This went on for about a minute or so and there was no more in the log file until several hours later - in fact when an email appeared in the INBOX. I know this because my personal email account was copied on the email and so I have the timestamp.
> I then get the following message every time I poll the server and have to re-start my application to get over it:
> {code}
> 2009-11-26 19:19:57,293 [: MailComponent] ERROR MailConsumer                   - Folder not open
> java.lang.IllegalStateException: Folder not open
>         at javax.mail.Folder.getMessages(Folder.java:938)
>         at javax.mail.Folder.search(Folder.java:1226)
>         at org.apache.camel.component.mail.MailConsumer.poll(MailConsumer.java:107)
>         at org.apache.camel.impl.ScheduledPollConsumer.run(ScheduledPollConsumer.java:108)
>         at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
>         at java.util.concurrent.FutureTask$Sync.innerRunAndReset(FutureTask.java:317)
>         at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:150)
>         at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$101(ScheduledThreadPoolExecutor.java:98)
>         at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.runPeriodic(ScheduledThreadPoolExecutor.java:181)
>         at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:205)
>         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:619)
> {code}
> I took a look at MailConsumer.java and note the following code:
> {code}
> 236	        if (!connected) {
> 237	            if (LOG.isDebugEnabled()) {
> 238	                LOG.debug("Connecting to MailStore: " + endpoint.getConfiguration().getMailStoreLogInformation());
> 239	            }
> 240	            store = sender.getSession().getStore(config.getProtocol());
> 241	            store.connect(config.getHost(), config.getPort(), config.getUsername(), config.getPassword());
> 242	        }
> {code}
> If you're not connected then how is it possible to have a folder? Following this logic my recommendation is to insert the following at line 242:
> {code}
> 241	            store.connect(config.getHost(), config.getPort(), config.getUsername(), config.getPassword());
>                     folder = null;
> 242	        }
> {code}

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