Hi,
I defined a bean:
public class MyBean {
private String property1;
public String getProperty1 () { return this.property1; }
public void setProperty1 (String property1) { this.property1 =
property1; } }
And, when I call following on 'MyBean';
...
MyBean mybean = new MyBean();
PropertyUtils.getProperty(mybean, "property1"); ...
I get following exception :
java.lang.NoSuchMethodException: Unknown property 'property1'
at
org.apache.commons.beanutils.PropertyUtilsBean.getSimpleProperty(PropertyUti
lsBean.java:1122)
at
org.apache.commons.beanutils.PropertyUtilsBean.getNestedProperty(PropertyUti
lsBean.java:686)
at
org.apache.commons.beanutils.PropertyUtilsBean.getProperty(PropertyUtilsBean
.java:715)
at
org.apache.commons.beanutils.PropertyUtils.getProperty(PropertyUtils.java:29
0)
Why is this so? Why PropertyUtils is unable to see getter/setters for this
property?
-----------------------------------------------
S M Humayun
Software Architect, IBL Group
-----------------------------------------------
Cell : 92.321.8707783
Email (Official) : [email protected]
Email (Personal) : [email protected]
Google Talk : [email protected]
MSN : [email protected]
Yahoo : [email protected]
Skype : smhumayun
AIM : syedmohdhumayun
Blog : http://smhumayun.blogspot.com
LinkedIn : http://www.linkedin.com/in/smhumayun
Facebook : http://www.facebook.com/smhumayun
Twitter : http://twitter.com/smhumayun
-----------------------------------------------
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]