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?
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?
Thanks for the report!
We'll try to reproduce it and let you know about the progress.
We have successfully reproduced it, trying to fix it.
We have fixed the issue. Please try the latest nightly build.
Tested OK. Now it works beautifully. Great product.
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.
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.
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?
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.
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).
Thanks for reporting the NoSuchMethodError.
We used 2.5.6. I'll check whether we can do sth. for the older case.
Even Spring 2.5.0 should work well now. Please try:
http://www.zeroturnaround.com/nightly-build/jrebel-nightly-2.x-dev.zip
http://www.zeroturnaround.com/nightly-build/jrebel-nightly-dev.zip
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)
Sorry the fix was not included in that build. Please try with new stable or nightly.