java.lang.IllegalStateException: Folder not open

mulesoft.org | 5 months ago
  1. 0

    [MULE-2624] Problems reconnecting to POP3 server - JIRA

    mulesoft.org | 5 months ago
    java.lang.IllegalStateException: Folder not open
  2. 0

    Connection Exception : Refused

    Oracle Community | 10 years ago | 843830
    java.lang.IllegalStateException: Folder not open
  3. 0

    Javamail java.lang.IllegalStateException: Folder is not Open

    Stack Overflow | 5 years ago | Ahmed Saleh
    java.lang.IllegalStateException: Folder is not Open
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    Tried to forward invalid emails (usually spam) to myself: 2005-05-12 01:42:19,963 DEBUG [service.services.mail.MailFetcherService] There are 2 messages in the pop folder 2005-05-12 01:42:20,004 DEBUG [service.services.mail.MailFetcherService] Message Subject: enlarge girth and length 2005-05-12 01:42:20,004 DEBUG [atlassian.jira.mail.MailThreadManagerImpl] Cannot determine message id of the e-mail message. 2005-05-12 01:42:20,031 DEBUG [service.services.mail.MailFetcherService] Forwarding Message: com.sun.mail.pop3.POP3Message@cb353b 2005-05-12 01:42:20,131 INFO [velocity] ResourceManager : found templates/email/text/errorinhandler.vm with loader org.apache.velocity.runtime.resource.loader.ClasspathResourceLoader 2005-05-12 01:42:20,181 DEBUG [atlassian.mail.queue.MailQueueImpl] Queued: To='jeff@atlassian.com' Subject='Error in: enlarge girth and length' From='null' FromName='null' Cc='null' Bcc='null' ReplyTo='null' InReplyTo='null' MimeType='text/plain' Encoding='UTF-8' Multipart='javax.mail.internet.MimeMultipart@17b1871' MessageId='null' 2005-05-12 01:42:20,221 DEBUG [service.services.mail.MailFetcherService] Message Subject: Returned mail: see transcript for details 2005-05-12 01:42:20,222 DEBUG [atlassian.jira.mail.MailThreadManagerImpl] Cannot determine message id of the e-mail message. 2005-05-12 01:42:20,248 DEBUG [service.services.mail.MailFetcherService] Forwarding Message: com.sun.mail.pop3.POP3Message@81ca74 2005-05-12 01:42:20,329 DEBUG [atlassian.mail.queue.MailQueueImpl] Queued: To='jeff@atlassian.com' Subject='Error in: Returned mail: see transcript for details' From='null' FromName='null' Cc='null' Bcc='null' ReplyTo='null' InReplyTo='null' MimeType='text/plain' Encoding='UTF-8' Multipart='javax.mail.internet.MimeMultipart@11624bb' MessageId='null' 2005-05-12 01:42:20,368 DEBUG [atlassian.jira.service.ServiceRunner] Finished Running Service [Container: com.atlassian.jira.service.services.pop.PopService null delay [60000ms]] However when the generated mail is actually flushed from the queue, we get this error: 2005-05-12 01:43:05,308 DEBUG [atlassian.mail.queue.MailQueueImpl] Sending: To='jeff@atlassian.com' Subject='Error in: enlarge girth and length' From='null' FromName='null' Cc='null' Bcc='null' ReplyTo='null' InReplyTo='null' MimeType='text/plain' Encoding='UTF-8' Multipart='javax.mail.internet.MimeMultipart@17b1871' MessageId='null' 2005-05-12 01:43:05,392 INFO [org.quartz.core.JobRunShell] Job DEFAULT.ServicesJob threw a JobExecutionException: org.quartz.JobExecutionException: java.lang.IllegalStateException: Folder is not Open [See nested exception: java.lang.IllegalStateException: Folder is not Open] at com.atlassian.jira.service.ServiceRunner.execute(ServiceRunner.java:54) at org.quartz.core.JobRunShell.run(JobRunShell.java:191) at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:516) * Nested Exception (Underlying Cause) --------------- java.lang.IllegalStateException: Folder is not Open at com.sun.mail.pop3.POP3Folder.checkOpen(POP3Folder.java:385) at com.sun.mail.pop3.POP3Folder.getProtocol(POP3Folder.java:412) at com.sun.mail.pop3.POP3Message.getContentStream(POP3Message.java:116) at javax.mail.internet.MimePartDataSource.getInputStream(MimePartDataSource.java:61) at javax.activation.DataHandler.writeTo(DataHandler.java:297) at javax.mail.internet.MimeBodyPart.writeTo(MimeBodyPart.java:1089) at javax.mail.internet.MimeMessage.writeTo(MimeMessage.java:1527) at javax.mail.internet.MimeMessage.writeTo(MimeMessage.java:1503) at com.sun.mail.handlers.message_rfc822.writeTo(message_rfc822.java:89) at javax.activation.ObjectDataContentHandler.writeTo(DataHandler.java:849) at javax.activation.DataHandler.writeTo(DataHandler.java:305) at javax.mail.internet.MimeBodyPart.writeTo(MimeBodyPart.java:1089) at javax.mail.internet.MimeBodyPart.writeTo(MimeBodyPart.java:635) at javax.mail.internet.MimeMultipart.writeTo(MimeMultipart.java:233) at com.sun.mail.handlers.multipart_mixed.writeTo(multipart_mixed.java:68) at javax.activation.ObjectDataContentHandler.writeTo(DataHandler.java:849) at javax.activation.DataHandler.writeTo(DataHandler.java:305) at javax.mail.internet.MimeBodyPart.writeTo(MimeBodyPart.java:1089) at javax.mail.internet.MimeMessage.writeTo(MimeMessage.java:1527) at com.sun.mail.smtp.SMTPTransport.sendMessage(SMTPTransport.java:321) at javax.mail.Transport.send0(Transport.java:164) at javax.mail.Transport.send(Transport.java:81) at alt.javax.mail.TransportImpl.send(TransportImpl.java:18) at com.atlassian.mail.server.impl.SMTPMailServerImpl.send(SMTPMailServerImpl.java:138) at com.atlassian.mail.queue.SingleMailQueueItem.send(SingleMailQueueItem.java:47) at com.atlassian.mail.queue.MailQueueImpl.sendBuffer(MailQueueImpl.java:55) at com.atlassian.jira.service.services.mail.MailQueueService.run(MailQueueService.java:23) at com.atlassian.jira.service.JiraServiceContainer.run(JiraServiceContainer.java:59) at com.atlassian.jira.service.ServiceRunner.execute(ServiceRunner.java:50) at org.quartz.core.JobRunShell.run(JobRunShell.java:191) at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:516)2005-05-12 01:43:05,394 DEBUG [atlassian.jira.service.ServiceRunner] ServiceRunner.runServices() Running at [2005-05-12 01:43:05,394] The spam mails are not deleted from the POP box, and neither do I get the mail forwarded to me. The mail appears in the queue, marked as 'error', and flushing the queue results in above stacktrace. I suspect the mail wasn't sent because the From address isn't set.

    Atlassian JIRA | 1 decade ago | Jeff Turner
    java.lang.IllegalStateException: Folder is not Open
Not finding the right solution?
Take a tour to get the most out of Samebug.

Tired of useless tips?

Automated exception search integrated into your IDE

Root Cause Analysis

  1. java.lang.IllegalStateException

    Folder not open

    at javax.mail.Folder.getMessages()
  2. JavaMail API
    Folder.getMessages
    1. javax.mail.Folder.getMessages(Folder.java:925)
    1 frame
  3. org.mule.providers
    AbstractPollingMessageReceiver.run
    1. org.mule.providers.email.RetrieveMessageReceiver.poll(RetrieveMessageReceiver.java:304)
    2. org.mule.providers.AbstractPollingMessageReceiver.run(AbstractPollingMessageReceiver.java:115)
    2 frames
  4. Backport of JSR 166
    ThreadPoolExecutor$Worker.run
    1. edu.emory.mathcs.backport.java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:442)
    2. edu.emory.mathcs.backport.java.util.concurrent.FutureTask.runAndReset(FutureTask.java:198)
    3. edu.emory.mathcs.backport.java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:138)
    4. edu.emory.mathcs.backport.java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:238)
    5. edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:987)
    6. edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:528)
    6 frames
  5. Java RT
    Thread.run
    1. java.lang.Thread.run(Thread.java:595)
    1 frame