beanWrapperImpl issues only with websphere

若如初见. 提交于 2019-12-06 01:06:31

one solution found :

probleme is due to the Introduction of ExtendedBeanInfo inf spring3.1

...

cf : https://github.com/SpringSource/spring-framework/commit/2f5085aef1e9ac3655a1b1250b6ceca9d0ca3398#diff-0

so the solution, is to take the previous version of CachedIntrospectionResults and put it in the package "org.springframework.beans" so that it will be overwritten,

but you have to be sure that application classpath is take first.

I was having the same issue when trying to set a nested property using BeanWrapper. The issue was that the property did not have a setter, even though I did not think the setter was necessary. Adding the setter fixed my issue. Thanks for providing the updates Benoit! My bean:

public class Bean {
    private InnerBean innerBean = new InnerBean();
    public InnerBean getInnerBean() {
        return this.innerBean;
    }
}

My BeanWrapper code that was failing:

BeanWrapper wrapper = new BeanWrapperImpl(new Bean());
wrapper.setPropertyValue("innerBean.property","some value");
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!