rossgard
Nov 11th, 2009, 05:49 AM
Hi,
I am getting an error message when using the imap-idle-channel-adapter.
I am getting this error message:
DEBUG: org.springframework.integration.mail.ImapIdleChann elAdapter - received 15 mail messages
DEBUG: org.springframework.integration.channel.DirectChan nel - 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.MessageDel iveryException: Dispatcher has no subscribers.
at org.springframework.integration.dispatcher.Unicast ingDispatcher.doDispatch(UnicastingDispatcher.java :97)
at org.springframework.integration.dispatcher.Unicast ingDispatcher.dispatch(UnicastingDispatcher.java:9 0)
at org.springframework.integration.channel.AbstractSu bscribableChannel.doSend(AbstractSubscribableChann el.java:43)
at org.springframework.integration.channel.AbstractMe ssageChannel.send(AbstractMessageChannel.java:116)
at org.springframework.integration.channel.AbstractMe ssageChannel.send(AbstractMessageChannel.java:94)
at org.springframework.integration.channel.MessageCha nnelTemplate.doSend(MessageChannelTemplate.java:22 3)
at org.springframework.integration.channel.MessageCha nnelTemplate.send(MessageChannelTemplate.java:180)
at org.springframework.integration.endpoint.MessagePr oducerSupport.sendMessage(MessageProducerSupport.j ava:51)
at org.springframework.integration.mail.ImapIdleChann elAdapter.access$2(ImapIdleChannelAdapter.java:1)
at org.springframework.integration.mail.ImapIdleChann elAdapter$IdleTask.run(ImapIdleChannelAdapter.java :125)
at java.lang.Thread.run(Thread.java:595)
As far as I know the error message says that nothing listens on the mailInputChannel, but I canīt find the error.
My configuration:
<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>
Service Activator:
public class MailServiceActivator {
public void handleMessage(MimeMessage message) {
logger.debug("Activator called with message: " + message);
}
}
Test:
public class MailIntegration {
public static void main(String[] args) {
AbstractApplicationContext applicationContext = new ClassPathXmlApplicationContext(new String[]{"/integration-mail-beans.xml"}, MailIntegration.class);
applicationContext.stop();
}
}
When I run the code without the imap-adapter all works fine. The service activator reads messages from the mailInputChannel.
I have tried with annotations and without annotations, but without luck.
I am using Spring Integration 1.0.3-RELEASE.
Any pointers?
I am getting an error message when using the imap-idle-channel-adapter.
I am getting this error message:
DEBUG: org.springframework.integration.mail.ImapIdleChann elAdapter - received 15 mail messages
DEBUG: org.springframework.integration.channel.DirectChan nel - 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.MessageDel iveryException: Dispatcher has no subscribers.
at org.springframework.integration.dispatcher.Unicast ingDispatcher.doDispatch(UnicastingDispatcher.java :97)
at org.springframework.integration.dispatcher.Unicast ingDispatcher.dispatch(UnicastingDispatcher.java:9 0)
at org.springframework.integration.channel.AbstractSu bscribableChannel.doSend(AbstractSubscribableChann el.java:43)
at org.springframework.integration.channel.AbstractMe ssageChannel.send(AbstractMessageChannel.java:116)
at org.springframework.integration.channel.AbstractMe ssageChannel.send(AbstractMessageChannel.java:94)
at org.springframework.integration.channel.MessageCha nnelTemplate.doSend(MessageChannelTemplate.java:22 3)
at org.springframework.integration.channel.MessageCha nnelTemplate.send(MessageChannelTemplate.java:180)
at org.springframework.integration.endpoint.MessagePr oducerSupport.sendMessage(MessageProducerSupport.j ava:51)
at org.springframework.integration.mail.ImapIdleChann elAdapter.access$2(ImapIdleChannelAdapter.java:1)
at org.springframework.integration.mail.ImapIdleChann elAdapter$IdleTask.run(ImapIdleChannelAdapter.java :125)
at java.lang.Thread.run(Thread.java:595)
As far as I know the error message says that nothing listens on the mailInputChannel, but I canīt find the error.
My configuration:
<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>
Service Activator:
public class MailServiceActivator {
public void handleMessage(MimeMessage message) {
logger.debug("Activator called with message: " + message);
}
}
Test:
public class MailIntegration {
public static void main(String[] args) {
AbstractApplicationContext applicationContext = new ClassPathXmlApplicationContext(new String[]{"/integration-mail-beans.xml"}, MailIntegration.class);
applicationContext.stop();
}
}
When I run the code without the imap-adapter all works fine. The service activator reads messages from the mailInputChannel.
I have tried with annotations and without annotations, but without luck.
I am using Spring Integration 1.0.3-RELEASE.
Any pointers?