Hi fxthomas,

If your stacktrace is up to date.
You have got an InvalidPayloadException 
the payload could be null or use the wrong class type, etc.

https://github.com/apache/camel/blob/b378bcdedfbd0ac375d052ca4dccdbad6bed1ce9/camel-core/src/main/java/org/apache/camel/component/file/FileOperations.java#L292

an other idea, it could be to convert to a String the payload before write it 
into the file,
you have to check what is the output payload of sql component 

Greg AUTRIC                        
JBoss Middleware Consultant

email   : gautric __at__ redhat __dot__ com
twitter : @gautric_io

Red Hat Global Services            
Red Hat France SARL                sit: http://www.redhat.fr
Le Linea, 1 rue du General Leclerc, 92047 Paris La Défense Cedex
Sent from webmail

----- Mail original -----
De: "fxthomas" <[email protected]>
À: [email protected]
Envoyé: Mercredi 15 Juillet 2015 11:07:55
Objet: Cannot store file error CSV

hello, 

   I am trying to write from a DB to CSV file , and I always get a cannot
store file exception. My route is like below

    from("timer://getData?period=2h").setBody(constant("SQL
Query")).to("jdbc:DS?outputType=StreamList").split(body()).to(file://C:\\GitWrk?fileName=data.csv&fileExist=Append);

I am writing to my local disk ,so I have full permission rights too.  I
tried without and with split too but same error.

org.apache.camel.component.file.GenericFileOperationFailedException: Cannot
store file: C:\GitWrK\data.csv
        at
org.apache.camel.component.file.FileOperations.storeFile(FileOperations.java:292)[camel-core-2.15.1.jar:2.15.1]
        at
org.apache.camel.component.file.GenericFileProducer.writeFile(GenericFileProducer.java:277)[camel-core-2.15.1.jar:2.15.1]
        at
org.apache.camel.component.file.GenericFileProducer.processExchange(GenericFileProducer.java:165)[camel-core-2.15.1.jar:2.15.1]
        at
org.apache.camel.component.file.GenericFileProducer.process(GenericFileProducer.java:79)[camel-core-2.15.1.jar:2.15.1]
        at
org.apache.camel.util.AsyncProcessorConverterHelper$ProcessorToAsyncProcessorBridge.process(AsyncProcessorConverterHelper.java:61)[camel-core-2.15.1.jar:2.15.1]
        at
org.apache.camel.processor.SendProcessor.process(SendProcessor.java:129)[camel-core-2.15.1.jar:2.15.1]

Any Pointers ?

Regards,
Felix 



--
View this message in context: 
http://camel.465427.n5.nabble.com/Cannot-store-file-error-CSV-tp5769339.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Reply via email to