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 <[email protected]> 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
> ^