Hello,
We have a simple scenario of reading a CSV file and persisting the records
into database. We have following route configured for the same:

    
<routeContext id="persistIRDCF1"
xmlns="http://camel.apache.org/schema/spring";>
       <route id="IRD_CF1_LN_FILE_BATCH">
            <from uri="file://C://Temp//test.csv"/>
            <split streaming="true" parallelProcessing="true">
                                                    <tokenize token="\n"
group="2"/>
                                                    <unmarshal>
                                                          <csv/>
                                                     </unmarshal>
                                                  </split>
                                                  <to uri= "sql:INSERT INTO
mytable (name, height, comments) VALUES (#, #,
#)?dataSourceRef=tsyoneDatasource"/>
        </route>
    </routeContext>



We get following error while executing:


Exception in thread "main" java.lang.NoClassDefFoundError:
org/apache/commons/csv/writer/CSVConfig
                at java.lang.Class.getDeclaredMethods0(Native Method)
                at
java.lang.Class.privateGetDeclaredMethods(Class.java:2427)
                at java.lang.Class.getDeclaredMethod(Class.java:1935)
                at
org.springframework.core.LocalVariableTableParameterNameDiscoverer$LocalVariableTableVisitor.resolveMember(LocalVariableTableParameterNameDiscoverer.java:236)
                at
org.springframework.core.LocalVariableTableParameterNameDiscoverer$LocalVariableTableVisitor.visitEnd(LocalVariableTableParameterNameDiscoverer.java:219)
                at org.springframework.asm.ClassReader.accept(Unknown
Source)
                at org.springframework.asm.ClassReader.accept(Unknown
Source)


>From what we read, we should be including camel-csv.jar file in classpath to
get this working. We could check that the camel-csv jar is correctly added
to the classpath. We are using camel 2.11.0 version.

Can you please advise if we are missing something here.

Thank you,
Regards

vkarkhanis




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

Reply via email to