Re: writing a csv file

2013-12-28 Thread keepcl123
  public void doHandleCsvData(List> csvData) { 
} 



--
View this message in context: 
http://camel.465427.n5.nabble.com/writing-a-csv-file-tp5745260p5745293.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: writing a csv file

2013-12-27 Thread keepcl123
Also I would like to know how to get the .csv file name that I have read when
I am in my bean.



--
View this message in context: 
http://camel.465427.n5.nabble.com/writing-a-csv-file-tp5745260p5745287.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: writing a csv file

2013-12-27 Thread keepcl123
here is the exception and my code :

the bean method :  



  public void doHandleCsvData(List> csvData) {
}



  the xml :

http://camel.apache.org/schema/spring";
id="report1">



   











the exception is:

[LOG|ERROR|27 09:58:26,734 2013 דצמ
|org.apache.camel.processor.DefaultErrorHandler|Camel (report1) thread #1 -
file://C:reports1_in| - ]
Failed delivery for exchangeId:
ID-NTAS107703T05-50117-1388131078416-3-1. Exhausted after delivery attempt:
1 caught:
org.apache.camel.NoTypeConversionAvailableException:
No type converter available to convert from type: java.lang.String to
the required type: java.util.Map with value ILS
[END]
org.apache.camel.NoTypeConversionAvailableException:
No type converter available to convert from type: java.lang.String to
the required type: java.util.Map with value ILS
at
org.apache.camel.impl.converter.BaseTypeConverterRegistry.mandatoryConvertTo(BaseTypeConverterRegistry.java:144)
at
org.apache.camel.util.ExchangeHelper.convertToMandatoryType(ExchangeHelper.java:143)
at
org.apache.camel.dataformat.csv.CsvDataFormat.marshal(CsvDataFormat.java:70)
at
org.apache.camel.processor.MarshalProcessor.process(MarshalProcessor.java:57)
at
org.apache.camel.impl.converter.AsyncProcessorTypeConv



--
View this message in context: 
http://camel.465427.n5.nabble.com/writing-a-csv-file-tp5745260p5745286.html
Sent from the Camel - Users mailing list archive at Nabble.com.


Re: writing a csv file

2013-12-26 Thread Willem Jiang
Hi,

Can you show us the code of calypsox.reports.CsvReportsHandler?

--  
Willem Jiang

Red Hat, Inc.
Web: http://www.redhat.com
Blog: http://willemjiang.blogspot.com(http://willemjiang.blogspot.com/) 
(English)
http://jnn.iteye.com(http://jnn.javaeye.com/) (Chinese)
Twitter: willemjiang  
Weibo: 姜宁willem



On December 27, 2013 at 3:26:04 AM, keepcl123 (keepcl...@gmail.com) wrote:
>  
> Hi,
>  
> I want to read a csv file from the file directory into a java bean,  
> do some
> work on the data (a List) and then save the data to a new csv file.  
>  
> I mange to do the first part (unmarshal) , but I don't know how to  
> do the
> part of writing the file after I finished my work on it (marshal  
> ).
> Here is my code , but I get en exception on the marshal part : "can  
> not
> convert from a String to a Map"
>  
>  
> > class="calypsox.reports.CsvReportsHandler" />
> > id="report1">
> > location="BLLresources/reports.properties" />
>  
>  
> > uri="file:{{report1.incoming.directory}}?preMove={{report1.inprogress.directory}}&move=
> >   
> {{report1.done.directory}}&moveFailed={{report1.failed.directory}}"  
> />
>  
>  
>  
> > />
>  
>  
>  
>  
> > />
>  
>  
>  
> Can you help ?
> Thx
>  
>  
>  
> --
> View this message in context: 
> http://camel.465427.n5.nabble.com/writing-a-csv-file-tp5745260.html  
> Sent from the Camel - Users mailing list archive at Nabble.com.  
>  



writing a csv file

2013-12-26 Thread keepcl123
Hi,

I want to read a csv file from the file directory into a java bean, do some
work on the data (a List) and then save the data to a new csv file.

I mange to do the first part (unmarshal) , but I don't know how to do the
part of writing the file after I finished my work on it (marshal ).
Here is my code , but I get en exception on the marshal part : "can not
convert from a String to a Map"



http://camel.apache.org/schema/spring";
id="report1">
















Can you help ?
Thx



--
View this message in context: 
http://camel.465427.n5.nabble.com/writing-a-csv-file-tp5745260.html
Sent from the Camel - Users mailing list archive at Nabble.com.