I doubt how the double quotes for the file path worked for you. I had to remove the double quotes after file:// and make it just file:/ such that it worked.
Regards, Jothi On Mon, Feb 11, 2013 at 5:05 PM, Matthias Lüneberg < matthias.lueneb...@googlemail.com> wrote: > Hi, > > I think you don't need the "configure()" function/method. > > I think its okay to call "to" on the String, there is some implicit magic > in between I think. > > Look at here: http://camel.apache.org/scala-dsl-getting-started.html > > The following worked for me in IntelliJ 12: > > class SimpleRouter extends App { > > def main(args : Array[String]) { > > val camelContext = new DefaultCamelContext() > > camelContext.addRoutes(new RouteBuilder() { > > > "file://Users/joe/Desktop/test.xml".to("file://Users/joe/Desktop/test1.xml") > > }) > > camelContext.start() > > Thread.sleep(1000) > > camelContext.stop() > } > } > > HTH, > Matthias > > Am 11.02.2013 um 13:36 schrieb James Carman <jcar...@carmanconsulting.com > >: > > > How about from("file://...").to("file:///") > > > > You're trying to call "to" on a java.lang.String literal object. > > > > On Feb 11, 2013, at 5:30 AM, Joe San <codeintheo...@gmail.com> wrote: > > > >> Guys, > >> > >> I'm just trying a simple Scala DSL using intelli. I have a project > created > >> and tried configuring a simple route as below: > >> > >> class SimpleRouter extends App { > >> > >> def main(args : Array[String]) { > >> > >> val camelContext = new DefaultCamelContext() > >> > >> camelContext.addRoutes(new RouteBuilder() { > >> def configure() { > >> > >> > "file://Users/joe/Desktop/test.xml".to("file://Users/joe/Desktop/test1.xml") > >> } > >> }) > >> > >> camelContext.start() > >> > >> Thread.sleep(1000) > >> > >> camelContext.stop() > >> > >> } > >> > >> } > >> > >> But I get to see the following error when I tried to run the above > route: > >> > >> scala: value to is not a member of java.lang.String > >> > >> > "file://Users/joe/Desktop/test.xml".to("file://Users/joe/Desktop/test1.xml") > >> > >> Any idea as to why the intellij would not recognize the dsl? Is there > >> anything that I have to do additionally? > >> > >> Regards, > >> Joe > >> ^ > > > >