Hi,
I am getting an error message when using the imap-idle-channel-adapter.
I am getting this error message:
As far as I know the error message says that nothing listens on the mailInputChannel, but I canīt find the error.Code:DEBUG: org.springframework.integration.mail.ImapIdleChannelAdapter - received 15 mail messages DEBUG: org.springframework.integration.channel.DirectChannel - preSend on channel 'mailInputChannel', message: [Payload=javax.mail.internet.MimeMessage@922804][Headers={springintegration_id=74a7e293-7255-4ceb-adff-0f87be7f1753, springintegration_timestamp=1257936337453}] Exception in thread "SimpleAsyncTaskExecutor-1" org.springframework.integration.message.MessageDeliveryException: Dispatcher has no subscribers. at org.springframework.integration.dispatcher.UnicastingDispatcher.doDispatch(UnicastingDispatcher.java:97) at org.springframework.integration.dispatcher.UnicastingDispatcher.dispatch(UnicastingDispatcher.java:90) at org.springframework.integration.channel.AbstractSubscribableChannel.doSend(AbstractSubscribableChannel.java:43) at org.springframework.integration.channel.AbstractMessageChannel.send(AbstractMessageChannel.java:116) at org.springframework.integration.channel.AbstractMessageChannel.send(AbstractMessageChannel.java:94) at org.springframework.integration.channel.MessageChannelTemplate.doSend(MessageChannelTemplate.java:223) at org.springframework.integration.channel.MessageChannelTemplate.send(MessageChannelTemplate.java:180) at org.springframework.integration.endpoint.MessageProducerSupport.sendMessage(MessageProducerSupport.java:51) at org.springframework.integration.mail.ImapIdleChannelAdapter.access$2(ImapIdleChannelAdapter.java:1) at org.springframework.integration.mail.ImapIdleChannelAdapter$IdleTask.run(ImapIdleChannelAdapter.java:125) at java.lang.Thread.run(Thread.java:595)
My configuration:
Service Activator:Code:<si-mail:imap-idle-channel-adapter id="mailin" store-uri="imap://*** imap uri here ***" channel="mailInputChannel" should-delete-messages="false" java-mail-properties="mailProperties"/> <util:properties id="mailProperties"> <beans:prop key="mail.debug">true</beans:prop> </util:properties> <si:channel id="mailInputChannel" /> <si:service-activator input-channel="mailInputChannel" method="handleMessage"> <beans:bean class="org.test.activator.mail.MailServiceActivator" /> </si:service-activator>
Test:Code:public class MailServiceActivator { public void handleMessage(MimeMessage message) { logger.debug("Activator called with message: " + message); } }
When I run the code without the imap-adapter all works fine. The service activator reads messages from the mailInputChannel.Code:public class MailIntegration { public static void main(String[] args) { AbstractApplicationContext applicationContext = new ClassPathXmlApplicationContext(new String[]{"/integration-mail-beans.xml"}, MailIntegration.class); applicationContext.stop(); } }
I have tried with annotations and without annotations, but without luck.
I am using Spring Integration 1.0.3-RELEASE.
Any pointers?


Reply With Quote

