introspection - Spring validation issue -
introspection - Spring validation issue -
we facing issue in ibm rad ide environment (ibm jdk 1.6 runtime jre) while executing test case. same code running fine springsource ide (sun jdk 1.6 runtime jre). issue jdk or spring framework. brief code history : there java bean below
class user { final map<integer,string> securityquestions = collections.synchronizedmap(new hashmap<integer,string>(max_security_questions)); final map<integer,string> securityanswers = collections.synchronizedmap(new hashmap<integer,string>(max_security_questions)); public map<integer,string> getsecurityanswers() { homecoming securityanswers; } public void setsecurityanswer(integer answernumber, string answertext) { securityanswers.put(answernumber, answertext); } }
when trying validate 'securityanswers' using
validationutils.rejectifemptyorwhitespace(errors, "securityanswers", "seqqans.obj.required","security question list cannot empty");
we getting exception.
caused by: org.springframework.beans.notreadablepropertyexception: invalid property 'securityanswers' of bean class [user]: bean property 'securityanswers' not readable or has invalid getter method: homecoming type of getter match parameter type of setter? @ org.springframework.beans.beanwrapperimpl.getpropertyvalue(beanwrapperimpl.java:705) @ org.springframework.beans.beanwrapperimpl.getpropertyvalue(beanwrapperimpl.java:697) @ org.springframework.validation.abstractpropertybindingresult.getactualfieldvalue(abstractpropertybindingresult.java:99) @ org.springframework.validation.abstractbindingresult.getfieldvalue(abstractbindingresult.java:226) @ org.springframework.validation.validationutils.rejectifemptyorwhitespace(validationutils.java:224) @ org.springframework.validation.validationutils.rejectifemptyorwhitespace(validationutils.java:182)
sorry ! don't believe rad has this.the exception states reason why happening:
does homecoming type of getter match parameter type of setter?
answer no :)
spring introspection ibm-jdk
Comments
Post a Comment