ZeroTurnaround Support Forum » JRebel Support

PropertyPlaceholderConfigurer, properties not expanded

(14 posts)

Tags:


  1. bep

    Member
    Posts: 2

    When changing Spring beans with properties loaded with PropertyPlaceholderConfigurer, the properties do not get expanded (end up with strings and others as ${...}.

    Any solution for this?

    Posted 11 months ago #
  2. rein

    ExtremeRebel
    Posts: 240

    Thanks for the report!
    We'll try to reproduce it and let you know about the progress.

    Posted 11 months ago #
  3. rein

    ExtremeRebel
    Posts: 240

    We have successfully reproduced it, trying to fix it.

    Posted 11 months ago #
  4. rein

    ExtremeRebel
    Posts: 240

    We have fixed the issue. Please try the latest nightly build.

    Posted 11 months ago #
  5. bep

    Member
    Posts: 2

    Tested OK. Now it works beautifully. Great product.

    Posted 11 months ago #
  6. Scott Bale

    guest

    I, too, am having this problem, even with the nightly build which I just downloaded. I have my Spring config split into several different XML files, and the file with my PropertyPlaceholderConfigurer bean is a different file than the one I am modifying and which JRebel is attempting to reload - I wonder if that could be causing the problem?

    Excerpted from my JRebel log file:

    [9/23/09 10:05:28 AM CDT] JavaRebel-Spring: Reloading Spring bean definitions in 'C:\xxx\xxx\xxx-web\src\main\webapp\WEB-INF\applicationContext-spring-mvc.xml'.
    ...
    [9/23/09 10:05:29 AM CDT] org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.xxx.web.util.XXXWebMappingExceptionResolver#1' defined in file [C:\xxx\xxx\xxx-web\src\main\webapp\WEB-INF\applicationContext-spring-mvc.xml]: Initialization of bean failed; nested exception is org.springframework.beans.TypeMismatchException: Failed to convert property value of type [java.lang.String] to required type [boolean] for property 'showError'; nested exception is java.lang.IllegalArgumentException: Invalid boolean value [${web.showError}]

    In my web.xml file I have it configured to load several Spring config files:

    <context-param>
    <param-name>contextConfigLocation</param-name>
    <param-value>
    /WEB-INF/applicationContext*.xml,
    classpath*:/spring/applicationContext-*.xml
    </param-value>
    </context-param>

    It looks as though Spring plugin is attempting to load the single file, as intended, but failing because (I'm guessing here) the separate config file with PropertyPlaceholderConfigurer bean is not being reloaded to do it's thing.

    Any ideas? Thanks.

    Posted 11 months ago #
  7. Scott Bale

    guest

    I've dug in further, and even having moved the PropertyPlaceHolderConfigurer section into the config file which I'm changing, I'm still getting the same error.

    I'm using nightly build JRebel 2.0.4-SNAPSHOT (200909230956), and I'm running using the Maven Jetty plugin.

    Posted 11 months ago #
  8. rein

    ExtremeRebel
    Posts: 240

    I tried tio use two Spring config files without JRebel.
    It seems that hte placeholder configurer does not apply to other config files.
    I also got the TypeMismatchException without JRebel.
    So I think it's not related to JRebel.

    In case placeholder configurer is in the same config file, everything seems to work well.

    Could you send us a test case which works without JRebel but fails with JRebel?

    Posted 11 months ago #
  9. Vasily

    guest

    I got
    java.lang.NoSuchMethodError: org.springframework.core.io.Resource.lastModified()J
    at org.zeroturnaround.javarebel.integration.spring.prop.PropertyResourceConfigurerWrapper.lastModified(PropertyResourceConfigurerWrapper.java:
    138)

    I use spring 2.5.2.

    Posted 11 months ago #
  10. gandy

    Member
    Posts: 10

    I had the same issue. The org.springframework.core.io.Resource.lastModified() method was only added in 2.5.3 (if I am not mistaken).

    In my case I simply upgraded my Spring framework to 2.5.6 (we were going to do it soon anyway).

    Posted 11 months ago #
  11. rein

    ExtremeRebel
    Posts: 240

    Thanks for reporting the NoSuchMethodError.
    We used 2.5.6. I'll check whether we can do sth. for the older case.

    Posted 11 months ago #
  12. rein

    ExtremeRebel
    Posts: 240

  13. Vasily

    guest

    I'm using Implementation-Title: 200910050956 and I'm getting the same error

    java.lang.NoSuchMethodError: org.springframework.core.io.Resource.lastModified()J
    at org.zeroturnaround.javarebel.integration.spring.prop.PropertyResourceConfigurerWrapper.lastModified(PropertyResourceConfigurerWrapper.java:138)

    Posted 11 months ago #
  14. rein

    ExtremeRebel
    Posts: 240

    Sorry the fix was not included in that build. Please try with new stable or nightly.

    Posted 11 months ago #

RSS feed for this topic

Reply

(required)

(required)

(optional)

(required)

Allowed markup: a blockquote code em strong ul ol li.
Put code in between `backticks`.

Olark Livehelp