Hi Can you recreate the situation?
Its a bit odd because this code checks whether the folder is open before it accesses it // ensure folder is open if (!folder.isOpen()) { folder.open(Folder.READ_WRITE); } I have added a recreate folder when connecting which I hope should be able to fix the issue. As it will be getting a fresh folder if the connection was lost. On Thu, Nov 26, 2009 at 11:22 AM, huntc <hu...@mac.com> wrote: > > 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. > > > 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.(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 > > > 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: > > > 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) > > > Looks as though there might be a bug in the Camel Mail component? > > Happy to create a JIRA if there is consensus. > > Kind regards, > Christopher > -- > View this message in context: > http://old.nabble.com/IllegalStateException%2C-folder-not-open-on-pop3-mail-uri-tp26525346p26525346.html > Sent from the Camel - Users (activemq) mailing list archive at Nabble.com. > -- Claus Ibsen Apache Camel Committer Author of Camel in Action: http://www.manning.com/ibsen/ Open Source Integration: http://fusesource.com Blog: http://davsclaus.blogspot.com/ Twitter: http://twitter.com/davsclaus