loveam
Dec 21st, 2009, 02:23 AM
hi, I get this error when I using mail:outbound-channel-adapter and recipient-list-router.
this is my code:
<recipient-list-router id="customRouter" input-channel="errorChannel" ignore-send-failures="false">
<recipient channel="mailErrorChannel"/>
<recipient channel="jmsErrorChannel"/>
</recipient-list-router>
<transformer id="testTransformer" input-channel="errorChannel" method="transform" output-channel="mailErrorChannel">
<beans:bean class="com.test.transformer.ErrorToMailMessageTransformer">
<beans:property name="velocityEngine" ref="velocityEngine"/>
</beans:bean>
</transformer>
<mail:outbound-channel-adapter channel="mailErrorChannel" mail-sender="mailSender"/>
<mail:header-enricher subject="ExampleMail" input-channel="mailErrorChannel"
to="xxx@hotmail.com"
from="avvd@gmail.com"
overwrite="false"/>
in the recipient-list-router, I want to send error to email and JMS, JMS is ok, but email is not success, this is error message in JMS,payload is email content.
org.springframework.integration.channel.ChannelRes olutionException: unable to resolve reply channel for message: [Payload=<html>
<body>
<h3>你好, 系统管理员:</h3>
<div>
asdsfdsf
</br>
java.lang.ClassCastException: org.springframework.integration.transformer.Messag eTransformationException cannot be cast to java.util.HashSet
</br>
</br>
sdfdsfsdfdsfsfsdf
</div>
</body>
and I found another error in JMS:
java.lang.IllegalStateException: no value available for the 'MailHeaders.TO' header
but I have set To in the mail:header-enricher
does anybody can help me? thank you very much!
this is my code:
<recipient-list-router id="customRouter" input-channel="errorChannel" ignore-send-failures="false">
<recipient channel="mailErrorChannel"/>
<recipient channel="jmsErrorChannel"/>
</recipient-list-router>
<transformer id="testTransformer" input-channel="errorChannel" method="transform" output-channel="mailErrorChannel">
<beans:bean class="com.test.transformer.ErrorToMailMessageTransformer">
<beans:property name="velocityEngine" ref="velocityEngine"/>
</beans:bean>
</transformer>
<mail:outbound-channel-adapter channel="mailErrorChannel" mail-sender="mailSender"/>
<mail:header-enricher subject="ExampleMail" input-channel="mailErrorChannel"
to="xxx@hotmail.com"
from="avvd@gmail.com"
overwrite="false"/>
in the recipient-list-router, I want to send error to email and JMS, JMS is ok, but email is not success, this is error message in JMS,payload is email content.
org.springframework.integration.channel.ChannelRes olutionException: unable to resolve reply channel for message: [Payload=<html>
<body>
<h3>你好, 系统管理员:</h3>
<div>
asdsfdsf
</br>
java.lang.ClassCastException: org.springframework.integration.transformer.Messag eTransformationException cannot be cast to java.util.HashSet
</br>
</br>
sdfdsfsdfdsfsfsdf
</div>
</body>
and I found another error in JMS:
java.lang.IllegalStateException: no value available for the 'MailHeaders.TO' header
but I have set To in the mail:header-enricher
does anybody can help me? thank you very much!