commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Craig McClanahan <>
Subject Re: NoSuchMethodException & PropertyUtilsBean
Date Fri, 17 Sep 2004 17:00:46 GMT
On Thu, 16 Sep 2004 21:50:00 +0200 (CEST), Wojciech CHMIELEWSKI
<> wrote:
> I don't know if it is mine mistake or something is wrong with
> org.apache.commons.beanutils.PropertyUtilsBean.
> I have an object with attribute aBBB and methods
> getaBBB() and getABBB(). I've got errorr  NoSuchMethodException
> when there is a second type of method but it ok when there is
> first. Why ??
> I've to add that if a class has attribute aaaBBB and method
> getAaaBBB() everything is all right. So where is the problem ??

The problem is that your property name ("aBBB") runs into some special
logic described in the JavaBeans specification that causes your
spelling of the name to not be recognized as a property.  To fix this,
either change the name of your property (for example, to "aaaBBB"), or
provide a BeanInfo class that tells the JVM what the get and set
methods for your property are.  For more information about JavaBeans
design patterns for property names, and about BeanInfo classes, see
the JavaBeans specification:

> I use commons-beanutils 1.7.0 and method getProperty( ... )

It will not matter which version of BeanUtils you are using --
BeanUtils only recognizes properties that the standard JavaBeans
introspector recognizes.

> --
>                                 pozdrawiam,
>                                 Wojciech Chmielewski

Craig McClanahan

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message