camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sagara Gunathunga <sagar...@gmail.com>
Subject Problem with Camel Spring configuration
Date Sun, 12 Apr 2009 09:52:18 GMT
Hi all,
i tried for Camel ReportIncident tutorials with spring based
configuration, i have following DSL code to convert to Spring XML
configuration.

from("direct:start")
            .setHeader(FileComponent.HEADER_FILE_NAME,
BeanLanguage.bean(FilenameGenerator.class, "generateFilename"))
            .to("velocity:MailBody.vm")
            .to("file://info");

i converted  above code as follows


<route>
			<from uri="direct:start"/>
			<pipeline>					
				<to uri="velocity:MailBody.vm"/>
				<to uri="file://info"/>
			</pipeline>			    			
</route>


but this will gives following error ,

2009-04-12 15:10:01,593 [btpool0-1      ] ERROR DeadLetterChannel
        - Failed delivery for exchangeId:
ID-sagara/2380-1239529183484/0-0. On delivery attempt: 0 caught:
org.apache.camel.NoTypeConversionAvailableException: No type converter
available to convert from type: class
org.apache.camel.component.file.FileMessage to the required type:
java.io.InputStream with value FileMessage: info
org.apache.camel.NoTypeConversionAvailableException: No type converter
available to convert from type: class
org.apache.camel.component.file.FileMessage to the required type:
java.io.InputStream with value FileMessage: info
        at org.apache.camel.impl.converter.DefaultTypeConverter.convertTo(DefaultTypeConverter.java:117)
        at org.apache.camel.impl.converter.DefaultTypeConverter.convertTo(DefaultTypeConverter.java:65)

I think i have missed something on spring configuration , can any one
provide any clue for this ?

Thanks ,

Sagara

Mime
View raw message