Hello, 

i am trying to run a simple example where i generate a text message and try to 
store it in a file. Here is my spring config file (i tried both with this 
logger and with file:///D:/blabla ) 



<camel:camelContext id="mycamel" autoStartup="true"> 
<camel:endpoint id="test" uri="log:org.apache.camel.example?level=ERROR" 
pattern="OutOnly"/> 
</camel:camelContext> 
<bean class="mypackage.TransfertJob" 
p:location="0414475060_{0,date,ddMMyy}_v1.csv" p:destination-ref="test"/> 

The job code: 

try { 
ProducerTemplate template = camelContext.createProducerTemplate(); 
template.sendBodyAndHeader(destination,"Hello", Exchange.FILE_NAME, 
MessageFormat.format(location,new Date())); 
System.out.println("Current folder is "+new File(".").getCanonicalPath()); 
} catch (Exception e) { 
log.error("Could not send file",e); 
} 

and the test code: 
GenericXmlApplicationContext ctx = new 
GenericXmlApplicationContext("classpath:/springtest.xml"); 
TransfertJob job = ctx.getBean(TransfertJob.class); 
job.execute(); 

However, i do not get neither the log message nor the output file. I get no 
exception what so ever and the println show me correct informations. What did i 
miss? 

David Delbecq 

Reply via email to