You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@servicemix.apache.org by lhe77 <la...@compart.net> on 2008/02/15 16:01:12 UTC

Error in Camel Mail Component?

I have set up a simple route from a imap account to a jbi service.
When the smx is now shut down, then the log says the following:


ERROR - DisposableBeanAdapter          - Couldn't invoke destroy method of
bean with name 'camel'
java.lang.IllegalStateException: This operation is not allowed on a closed
folder
        at com.sun.mail.imap.IMAPFolder.close(IMAPFolder.java:955)
        at com.sun.mail.imap.IMAPFolder.close(IMAPFolder.java:935)
        at
org.apache.camel.component.mail.MailConsumer.doStop(MailConsumer.java:58)
        at org.apache.camel.impl.ServiceSupport.stop(ServiceSupport.java:62)
        at
org.apache.camel.util.ServiceHelper.stopServices(ServiceHelper.java:110)
        at
org.apache.camel.impl.DefaultCamelContext.doStop(DefaultCamelContext.java:455)
        at org.apache.camel.impl.ServiceSupport.stop(ServiceSupport.java:62)
        at
org.apache.camel.spring.CamelContextFactoryBean.destroy(CamelContextFactoryBean.java:121)


It looks like the component tries to close the imap folder two times and
this causes the exception.
Should I raise a JIRA ?

Regards,
Lars
-- 
View this message in context: http://www.nabble.com/Error-in-Camel-Mail-Component--tp15502418s12049p15502418.html
Sent from the ServiceMix - Dev mailing list archive at Nabble.com.


Re: Error in Camel Mail Component?

Posted by lhe77 <la...@compart.net>.
I just forget to post the full stack trace:


ERROR - DisposableBeanAdapter          - Couldn't invoke destroy method of
bean with name 'camel'
java.lang.IllegalStateException: This operation is not allowed on a closed
folder
        at com.sun.mail.imap.IMAPFolder.close(IMAPFolder.java:955)
        at com.sun.mail.imap.IMAPFolder.close(IMAPFolder.java:935)
        at
org.apache.camel.component.mail.MailConsumer.doStop(MailConsumer.java:58)
        at org.apache.camel.impl.ServiceSupport.stop(ServiceSupport.java:62)
        at
org.apache.camel.util.ServiceHelper.stopServices(ServiceHelper.java:110)
        at
org.apache.camel.impl.DefaultCamelContext.doStop(DefaultCamelContext.java:455)
        at org.apache.camel.impl.ServiceSupport.stop(ServiceSupport.java:62)
        at
org.apache.camel.spring.CamelContextFactoryBean.destroy(CamelContextFactoryBean.java:121)
        at
org.springframework.beans.factory.support.DisposableBeanAdapter.destroy(DisposableBeanAdapter.java:145)
        at
org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.destroyBean(DefaultSingletonBeanRegistry.java:347)
        at
org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.destroySingleton(DefaultSingletonBeanRegistry.java:320)
        at
org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.destroySingletons(DefaultSingletonBeanRegistry.java:293)
        at
org.springframework.context.support.AbstractApplicationContext.destroyBeans(AbstractApplicationContext.java:706)
        at
org.springframework.context.support.AbstractApplicationContext.doClose(AbstractApplicationContext.java:684)
        at
org.springframework.context.support.AbstractApplicationContext.close(AbstractApplicationContext.java:651)
        at
org.apache.xbean.server.spring.configuration.SpringConfiguration.destroy(SpringConfiguration.java:140)
        at
org.apache.xbean.server.spring.configuration.SpringConfigurationServiceFactory.destroyService(SpringConfigurationServiceFactory.java:127)
        at
org.apache.xbean.kernel.standard.ServiceManager.destroy(ServiceManager.java:253)
        at
org.apache.xbean.kernel.standard.ServiceManagerRegistry.destroy(ServiceManagerRegistry.java:124)
        at
org.apache.xbean.kernel.standard.StandardKernel.destroy(StandardKernel.java:153)
        at
org.apache.servicemix.common.xbean.XBeanServiceUnit.shutDown(XBeanServiceUnit.java:62)
        at
org.apache.servicemix.common.BaseServiceUnitManager.shutDown(BaseServiceUnitManager.java:214)
        at
org.apache.servicemix.jbi.framework.ServiceUnitLifeCycle.shutDown(ServiceUnitLifeCycle.java:140)
        at
org.apache.servicemix.jbi.framework.ServiceAssemblyLifeCycle.shutDown(ServiceAssemblyLifeCycle.java:221)
        at
org.apache.servicemix.jbi.framework.ComponentMBeanImpl.shutDownServiceAssemblies(ComponentMBeanImpl.java:580)
        at
org.apache.servicemix.jbi.framework.ComponentMBeanImpl.doShutDown(ComponentMBeanImpl.java:335)
        at
org.apache.servicemix.jbi.framework.ComponentRegistry.shutDown(ComponentRegistry.java:106)
        at
org.apache.servicemix.jbi.framework.Registry.shutDown(Registry.java:151)
        at
org.apache.servicemix.jbi.container.JBIContainer.shutDown(JBIContainer.java:689)
        at
org.apache.servicemix.jbi.container.SpringJBIContainer.destroy(SpringJBIContainer.java:303)
        at
org.springframework.beans.factory.support.DisposableBeanAdapter.destroy(DisposableBeanAdapter.java:145)
        at
org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.destroyBean(DefaultSingletonBeanRegistry.java:347)
        at
org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.destroySingleton(DefaultSingletonBeanRegistry.java:320)
        at
org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.destroySingletons(DefaultSingletonBeanRegistry.java:293)
        at
org.springframework.context.support.AbstractApplicationContext.destroyBeans(AbstractApplicationContext.java:706)
        at
org.springframework.context.support.AbstractApplicationContext.doClose(AbstractApplicationContext.java:684)
        at
org.springframework.context.support.AbstractApplicationContext.close(AbstractApplicationContext.java:651)
        at
org.springframework.context.support.AbstractApplicationContext.destroy(AbstractApplicationContext.java:639)
        at org.apache.servicemix.Main$1.run(Main.java:74)
        at
org.apache.servicemix.jbi.container.SpringJBIContainer.shutDown(SpringJBIContainer.java:308)
        at
org.apache.servicemix.jbi.container.JBIContainer.containerShutdown(JBIContainer.java:731)
        at
org.apache.servicemix.jbi.container.JBIContainer$1.run(JBIContainer.java:709)


Regards,
Lars



















lhe wrote:
> 
> I have set up a simple route from a imap account to a jbi service.
> When the smx is now shut down, then the log says the following:
> 
> 
> ERROR - DisposableBeanAdapter          - Couldn't invoke destroy method of
> bean with name 'camel'
> java.lang.IllegalStateException: This operation is not allowed on a closed
> folder
>         at com.sun.mail.imap.IMAPFolder.close(IMAPFolder.java:955)
>         at com.sun.mail.imap.IMAPFolder.close(IMAPFolder.java:935)
>         at
> org.apache.camel.component.mail.MailConsumer.doStop(MailConsumer.java:58)
>         at
> org.apache.camel.impl.ServiceSupport.stop(ServiceSupport.java:62)
>         at
> org.apache.camel.util.ServiceHelper.stopServices(ServiceHelper.java:110)
>         at
> org.apache.camel.impl.DefaultCamelContext.doStop(DefaultCamelContext.java:455)
>         at
> org.apache.camel.impl.ServiceSupport.stop(ServiceSupport.java:62)
>         at
> org.apache.camel.spring.CamelContextFactoryBean.destroy(CamelContextFactoryBean.java:121)
> 
> 
> It looks like the component tries to close the imap folder two times and
> this causes the exception.
> Should I raise a JIRA ?
> 
> Regards,
> Lars
> 

-- 
View this message in context: http://www.nabble.com/Error-in-Camel-Mail-Component--tp15502418s12049p15502423.html
Sent from the ServiceMix - Dev mailing list archive at Nabble.com.