Camel
  1. Camel
  2. CAMEL-3162

Simple language work not properly together with Springs PropertyPlaceholderConfigurer

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Not a Problem
    • Affects Version/s: 2.4.0
    • Fix Version/s: 2.5.0
    • Component/s: camel-core
    • Labels:
      None

      Description

      I defined the to endpoint in my properties file as "file://target/outBox?fileName=test-$

      {date:now:yyyyMMdd}

      .txt" and the written file has the name "test-now:yyyyMMdd.txt" instead of "test-20100926".

      See also CAMEL-304

        Activity

        Hide
        Christian Müller added a comment -

        Attached a unit test which reproduce the issue.

        Show
        Christian Müller added a comment - Attached a unit test which reproduce the issue.
        Hide
        Claus Ibsen added a comment -

        Its a Spring problem.

        When you use ignoreUnresolvablePlaceholders in Spring then it do not the endpoint uri as is, but it removes the ${ } anyway.
        And therefore Camel cannot see those.

        Create a ticket at Spring to add an option or change the behavior its ignoreUnresolvablePlaceholders so it leave the ${ } as is.

        But we have just today added an alternative simple language syntax so you can use $simple{ } to avoid the Spring clash.

        Also Spring has options to configure its start/end token AFAIK so you can use those to change Spring to not use ${ } but something else.

        Show
        Claus Ibsen added a comment - Its a Spring problem. When you use ignoreUnresolvablePlaceholders in Spring then it do not the endpoint uri as is, but it removes the ${ } anyway. And therefore Camel cannot see those. Create a ticket at Spring to add an option or change the behavior its ignoreUnresolvablePlaceholders so it leave the ${ } as is. But we have just today added an alternative simple language syntax so you can use $simple{ } to avoid the Spring clash. Also Spring has options to configure its start/end token AFAIK so you can use those to change Spring to not use ${ } but something else.
        Hide
        Claus Ibsen added a comment -

        Christian try with latest code from trunk and use $simple{ } in the .properties file

        Show
        Claus Ibsen added a comment - Christian try with latest code from trunk and use $simple{ } in the .properties file
        Hide
        Claus Ibsen added a comment -

        Christian you are welcome to add your test case to camel-spring source code, for example to help ensure the test keep passing and we wont break it in the future.

        Show
        Claus Ibsen added a comment - Christian you are welcome to add your test case to camel-spring source code, for example to help ensure the test keep passing and we wont break it in the future.
        Hide
        Christian Müller added a comment -

        I was not sure what is the best place for this test...

        I added the test which uses the syntax "$simple{}".

        I also opened the ticket SPR-7593 in Spring Core, because Spring 3.0.3 breaks the PropertyPlaceholderConfigurer behavior compared to version 2.5.6. Jürgen scheduled this fix for Spring 3.0.5.
        Because this issue also breaks the Camel behavior from 2.2.0 to 2.4.0, I also added the test which uses the syntax "${}" and annotated this test with "@Ignore". We should enable this test if we upgrade to Spring 3.0.5 or newer...

        May be an information for our users is also useful, because if they upgrade from FUSE ESB 4.2 to 4.3 (as we), they will run into this problems too.

        Christian

        Show
        Christian Müller added a comment - I was not sure what is the best place for this test... I added the test which uses the syntax "$simple{}". I also opened the ticket SPR-7593 in Spring Core, because Spring 3.0.3 breaks the PropertyPlaceholderConfigurer behavior compared to version 2.5.6. Jürgen scheduled this fix for Spring 3.0.5. Because this issue also breaks the Camel behavior from 2.2.0 to 2.4.0, I also added the test which uses the syntax "${}" and annotated this test with "@Ignore". We should enable this test if we upgrade to Spring 3.0.5 or newer... May be an information for our users is also useful, because if they upgrade from FUSE ESB 4.2 to 4.3 (as we), they will run into this problems too. Christian
        Hide
        Claus Ibsen added a comment -

        Closing all resolved tickets from 2010 or older

        Show
        Claus Ibsen added a comment - Closing all resolved tickets from 2010 or older

          People

          • Assignee:
            Claus Ibsen
            Reporter:
            Christian Müller
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development