com.sun.mail.util.FolderClosedIOException

Stack Overflow | user3777390 | 7 months ago
tip
Your exception is missing from the Samebug knowledge base.
Here are the best solutions we found on the Internet.
Click on the to mark the helpful solution and get rewards for you help.
  1. 0

    Nothing happens after OK fetch while fetching emails using Javamail

    Stack Overflow | 7 months ago | user3777390
    com.sun.mail.util.FolderClosedIOException
  2. 0

    *Symptom* Confluence cannot collect email from IMAP server powered by hMailServer. *Steps to Reproduce* Here is how I reproduced: # Install vanilla Windows 2008 R2 64bit # Install hMailServer 5.6.3-B2249 (the current latest) and setup an account on it # Install Confluence 5.7.4 (the current latest) and enable 'Confluence Mail Archiving Plugin' # On 'Demonstration Space', go to 'Space tools' -> 'Integrations' -> 'Mail Accounts', and configure the email account which I created in the previous step, which will be successful # On 'Demonstration Space', go to 'Space tools' -> 'Integrations' -> 'Mail', and click 'Fetch new email', which will be failed (See the attached) *Error logs* Following error will be logged in atlassian-confluence.log: {noformat} 2015-05-12 15:45:00,093 ERROR [scheduler_Worker-5] [confluence.mail.archive.DefaultMailAccountManager] poll Error retrieving mail from IMAP account [confluence@<IMAP_SERVER>:143] for space <SPACENAME>: IOException while copying message javax.mail.MessagingException: IOException while copying message; nested exception is: com.sun.mail.util.FolderClosedIOException at javax.mail.internet.MimeMessage.<init>(MimeMessage.java:247) at com.atlassian.confluence.mail.archive.DefaultMailAccountManager.retrieveMessages(DefaultMailAccountManager.java:176) at com.atlassian.confluence.mail.archive.DefaultMailAccountManager.poll(DefaultMailAccountManager.java:133) at com.atlassian.confluence.mail.archive.DefaultMailAccountManager.poll(DefaultMailAccountManager.java:88) at com.atlassian.confluence.mail.archive.DefaultMailAccountManager.pollAllSpaces(DefaultMailAccountManager.java:298) at com.atlassian.confluence.mail.archive.jobs.MailPollJob$1.doInTransaction(MailPollJob.java:35) at com.atlassian.confluence.mail.archive.jobs.MailPollJob$1.doInTransaction(MailPollJob.java:31) at com.atlassian.sal.core.transaction.HostContextTransactionTemplate$1.doInTransaction(HostContextTransactionTemplate.java:25) at com.atlassian.sal.spring.component.SpringHostContextAccessor$1.doInTransaction(SpringHostContextAccessor.java:88) at org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:128) at com.atlassian.sal.spring.component.SpringHostContextAccessor.doInTransaction(SpringHostContextAccessor.java:82) at sun.reflect.GeneratedMethodAccessor164.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:497) at com.atlassian.plugin.osgi.hostcomponents.impl.DefaultComponentRegistrar$ContextClassLoaderSettingInvocationHandler.invoke(DefaultComponentRegistrar.java:134) at com.sun.proxy.$Proxy217.doInTransaction(Unknown Source) at sun.reflect.GeneratedMethodAccessor164.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:497) at com.atlassian.plugin.osgi.bridge.external.HostComponentFactoryBean$DynamicServiceInvocationHandler.invoke(HostComponentFactoryBean.java:154) at com.sun.proxy.$Proxy217.doInTransaction(Unknown Source) at com.atlassian.sal.core.transaction.HostContextTransactionTemplate.execute(HostContextTransactionTemplate.java:21) at sun.reflect.GeneratedMethodAccessor2193.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:497) at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:307) at org.springframework.osgi.service.importer.support.internal.aop.ServiceInvoker.doInvoke(ServiceInvoker.java:58) at org.springframework.osgi.service.importer.support.internal.aop.ServiceInvoker.invoke(ServiceInvoker.java:62) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171) at org.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:131) at org.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:119) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171) at org.springframework.osgi.service.util.internal.aop.ServiceTCCLInterceptor.invokeUnprivileged(ServiceTCCLInterceptor.java:56) at org.springframework.osgi.service.util.internal.aop.ServiceTCCLInterceptor.invoke(ServiceTCCLInterceptor.java:39) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171) at org.springframework.osgi.service.importer.support.LocalBundleContextAdvice.invoke(LocalBundleContextAdvice.java:59) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171) at org.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:131) at org.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:119) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204) at com.sun.proxy.$Proxy2844.execute(Unknown Source) at com.atlassian.confluence.mail.archive.jobs.MailPollJob.doExecute(MailPollJob.java:31) at com.atlassian.quartz.jobs.AbstractJob$1.doInHibernate(AbstractJob.java:133) at org.springframework.orm.hibernate.HibernateTemplate.execute(HibernateTemplate.java:370) at org.springframework.orm.hibernate.HibernateTemplate.execute(HibernateTemplate.java:337) at com.atlassian.quartz.jobs.AbstractJob.executeInternal(AbstractJob.java:125) at org.springframework.scheduling.quartz.QuartzJobBean.execute(QuartzJobBean.java:86) at com.atlassian.scheduler.quartz1.Quartz1JobFactory$ClassLoaderProtectingWrappedJob.execute(Quartz1JobFactory.java:62) at org.quartz.core.JobRunShell.run(JobRunShell.java:223) at com.atlassian.confluence.schedule.quartz.ConfluenceQuartzThreadPool$1.run(ConfluenceQuartzThreadPool.java:22) at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:549) Caused by: com.sun.mail.util.FolderClosedIOException at com.sun.mail.imap.IMAPInputStream.forceCheckExpunged(IMAPInputStream.java:100) at com.sun.mail.imap.IMAPInputStream.fill(IMAPInputStream.java:150) at com.sun.mail.imap.IMAPInputStream.read(IMAPInputStream.java:208) at com.sun.mail.imap.IMAPInputStream.read(IMAPInputStream.java:234) at com.sun.mail.imap.IMAPMessage.writeTo(IMAPMessage.java:721) at javax.mail.internet.MimeMessage.<init>(MimeMessage.java:238) ... 51 more {noformat} *Workaround* Use POP3 instead of IMAP on hMailServer

    Atlassian JIRA | 2 years ago | Mai Nakagawa [Atlassian]
    com.sun.mail.util.FolderClosedIOException
  3. 0

    *Symptom* Confluence cannot collect email from IMAP server powered by hMailServer. *Steps to Reproduce* Here is how I reproduced: # Install vanilla Windows 2008 R2 64bit # Install hMailServer 5.6.3-B2249 (the current latest) and setup an account on it # Install Confluence 5.7.4 (the current latest) and enable 'Confluence Mail Archiving Plugin' # On 'Demonstration Space', go to 'Space tools' -> 'Integrations' -> 'Mail Accounts', and configure the email account which I created in the previous step, which will be successful # On 'Demonstration Space', go to 'Space tools' -> 'Integrations' -> 'Mail', and click 'Fetch new email', which will be failed (See the attached) *Error logs* Following error will be logged in atlassian-confluence.log: {noformat} 2015-05-12 15:45:00,093 ERROR [scheduler_Worker-5] [confluence.mail.archive.DefaultMailAccountManager] poll Error retrieving mail from IMAP account [confluence@<IMAP_SERVER>:143] for space <SPACENAME>: IOException while copying message javax.mail.MessagingException: IOException while copying message; nested exception is: com.sun.mail.util.FolderClosedIOException at javax.mail.internet.MimeMessage.<init>(MimeMessage.java:247) at com.atlassian.confluence.mail.archive.DefaultMailAccountManager.retrieveMessages(DefaultMailAccountManager.java:176) at com.atlassian.confluence.mail.archive.DefaultMailAccountManager.poll(DefaultMailAccountManager.java:133) at com.atlassian.confluence.mail.archive.DefaultMailAccountManager.poll(DefaultMailAccountManager.java:88) at com.atlassian.confluence.mail.archive.DefaultMailAccountManager.pollAllSpaces(DefaultMailAccountManager.java:298) at com.atlassian.confluence.mail.archive.jobs.MailPollJob$1.doInTransaction(MailPollJob.java:35) at com.atlassian.confluence.mail.archive.jobs.MailPollJob$1.doInTransaction(MailPollJob.java:31) at com.atlassian.sal.core.transaction.HostContextTransactionTemplate$1.doInTransaction(HostContextTransactionTemplate.java:25) at com.atlassian.sal.spring.component.SpringHostContextAccessor$1.doInTransaction(SpringHostContextAccessor.java:88) at org.springframework.transaction.support.TransactionTemplate.execute(TransactionTemplate.java:128) at com.atlassian.sal.spring.component.SpringHostContextAccessor.doInTransaction(SpringHostContextAccessor.java:82) at sun.reflect.GeneratedMethodAccessor164.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:497) at com.atlassian.plugin.osgi.hostcomponents.impl.DefaultComponentRegistrar$ContextClassLoaderSettingInvocationHandler.invoke(DefaultComponentRegistrar.java:134) at com.sun.proxy.$Proxy217.doInTransaction(Unknown Source) at sun.reflect.GeneratedMethodAccessor164.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:497) at com.atlassian.plugin.osgi.bridge.external.HostComponentFactoryBean$DynamicServiceInvocationHandler.invoke(HostComponentFactoryBean.java:154) at com.sun.proxy.$Proxy217.doInTransaction(Unknown Source) at com.atlassian.sal.core.transaction.HostContextTransactionTemplate.execute(HostContextTransactionTemplate.java:21) at sun.reflect.GeneratedMethodAccessor2193.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:497) at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:307) at org.springframework.osgi.service.importer.support.internal.aop.ServiceInvoker.doInvoke(ServiceInvoker.java:58) at org.springframework.osgi.service.importer.support.internal.aop.ServiceInvoker.invoke(ServiceInvoker.java:62) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171) at org.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:131) at org.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:119) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171) at org.springframework.osgi.service.util.internal.aop.ServiceTCCLInterceptor.invokeUnprivileged(ServiceTCCLInterceptor.java:56) at org.springframework.osgi.service.util.internal.aop.ServiceTCCLInterceptor.invoke(ServiceTCCLInterceptor.java:39) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171) at org.springframework.osgi.service.importer.support.LocalBundleContextAdvice.invoke(LocalBundleContextAdvice.java:59) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171) at org.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:131) at org.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:119) at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171) at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204) at com.sun.proxy.$Proxy2844.execute(Unknown Source) at com.atlassian.confluence.mail.archive.jobs.MailPollJob.doExecute(MailPollJob.java:31) at com.atlassian.quartz.jobs.AbstractJob$1.doInHibernate(AbstractJob.java:133) at org.springframework.orm.hibernate.HibernateTemplate.execute(HibernateTemplate.java:370) at org.springframework.orm.hibernate.HibernateTemplate.execute(HibernateTemplate.java:337) at com.atlassian.quartz.jobs.AbstractJob.executeInternal(AbstractJob.java:125) at org.springframework.scheduling.quartz.QuartzJobBean.execute(QuartzJobBean.java:86) at com.atlassian.scheduler.quartz1.Quartz1JobFactory$ClassLoaderProtectingWrappedJob.execute(Quartz1JobFactory.java:62) at org.quartz.core.JobRunShell.run(JobRunShell.java:223) at com.atlassian.confluence.schedule.quartz.ConfluenceQuartzThreadPool$1.run(ConfluenceQuartzThreadPool.java:22) at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:549) Caused by: com.sun.mail.util.FolderClosedIOException at com.sun.mail.imap.IMAPInputStream.forceCheckExpunged(IMAPInputStream.java:100) at com.sun.mail.imap.IMAPInputStream.fill(IMAPInputStream.java:150) at com.sun.mail.imap.IMAPInputStream.read(IMAPInputStream.java:208) at com.sun.mail.imap.IMAPInputStream.read(IMAPInputStream.java:234) at com.sun.mail.imap.IMAPMessage.writeTo(IMAPMessage.java:721) at javax.mail.internet.MimeMessage.<init>(MimeMessage.java:238) ... 51 more {noformat} *Workaround* Use POP3 instead of IMAP on hMailServer

    Atlassian JIRA | 2 years ago | Mai Nakagawa [Atlassian]
    com.sun.mail.util.FolderClosedIOException
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. com.sun.mail.util.FolderClosedIOException

      No message provided

      at com.sun.mail.imap.IMAPInputStream.forceCheckExpunged()
    2. JavaMail API (compat)
      IMAPMessage.writeTo
      1. com.sun.mail.imap.IMAPInputStream.forceCheckExpunged(IMAPInputStream.java:101)
      2. com.sun.mail.imap.IMAPInputStream.fill(IMAPInputStream.java:153)
      3. com.sun.mail.imap.IMAPInputStream.read(IMAPInputStream.java:213)
      4. com.sun.mail.imap.IMAPInputStream.read(IMAPInputStream.java:239)
      5. com.sun.mail.imap.IMAPMessage.writeTo(IMAPMessage.java:737)
      5 frames