You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by Chris Wolf <cw...@gmail.com> on 2012/12/14 21:09:01 UTC
Re: Cannot get came-csv to work ***DISREGARD***
When I checked the sample in chapter 3 of "Camel In Action", it
reminded me of the dependency "camel-csv", which I removed because I
was trying something with camel-bindy - after changing my POM back -
it worked. Sorry for the noise.
On Fri, Dec 14, 2012 at 1:05 PM, Chris Wolf <cw...@gmail.com> wrote:
> Trying to do just basic csv consumption via camel-csv, but keep getting:
>
> apache.camel.util.ObjectHelper WARN Cannot find class: csv
>
> I tried:
> from("file:/tmp/camel?noop=true&filter=#filter")
> .log("Received file ${file:onlyname}")
> .unmarshal().csv()
> .to("mock:foo");
>
> as well as:
>
> final CsvDataFormat csv = new CsvDataFormat();
> CamelContext context = new DefaultCamelContext(new SimpleRegistry());
> Registry reg = context.getRegistry();
> reg = ((PropertyPlaceholderDelegateRegistry)reg).getRegistry();
> ((SimpleRegistry)reg).put("filter", filter);
> ((SimpleRegistry)reg).put("csv", csv);
>
> context.addRoutes(new RouteBuilder() {
> public void configure() {
> from("file:/tmp/camel?noop=true&filter=#filter")
> .log("Received file ${file:onlyname}")
> .unmarshal(csv)
> .to("mock:foo");
> }
> });
>
> ...but the result is always: "apache.camel.util.ObjectHelper WARN
> Cannot find class: csv
> "
> Any ideas, anyone?
>
> Thanks,
>
> CW