commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Frank W. Zammetti" <fzli...@omnytex.com>
Subject Re: [BeanUtils] Handling array creation?
Date Thu, 08 Sep 2005 21:24:44 GMT
I can give a nightly a shot when I get home tonight, no problem.  I just
made sure I was using 1.7.0, and I am.

If you or Thomas, or anyone else, might be inclined, I have a small little
test app:

http://www.omnytex.com/test.zip

It's trying to do this dynamic setting, and I have it working just fine up
until the point I call setProperty(), and it seems to do the same thing
whether it's PropertyUtils or BeanUtils (slightly different stack trace,
but it looks like the same root cause).  I keep getting:

java.lang.NoSuchMethodException: Property 'certifications' has no setter
method

So either there is still a type mismatch happening so it thinks there's no
appropriate setter, or the actual setter name isn't being calculated
properly... I followed through the BeanUtils code, and it looks to be
failing to get an accessible method to call to set the property... looks
like it gets the descriptor, then fails (returning null) for some reason
from the call to getWriteMethod (I'd bet it's the call from there to
MethodUtils.getAccessibleMethod() that's really where it breaks down).

Just execute go.bat if your on Windows by the way, quick compile and
execute with all environment setup done.

Ok, time to go home :)

-- 
Frank W. Zammetti
Founder and Chief Software Architect
Omnytex Technologies
http://www.omnytex.com

On Thu, September 8, 2005 5:08 pm, Niall Pemberton said:
> I think I fixed this already in Bug 28358
>
> http://issues.apache.org/bugzilla/show_bug.cgi?id=28358
>
> With the following code change:
>
> http://issues.apache.org/bugzilla/attachment.cgi?id=14119
>
> Could be wrong though - you would need to try a nightly build to verify
> it.
> Otherwise as Thomas said - use PropertyUtils instead.
>
> Niall
>
> ----- Original Message -----
> From: "Thomas Dudziak" <tomdzk@gmail.com>
> Sent: Thursday, September 08, 2005 8:53 PM
>
>
> This may very well be a bug in beanutils (I havn't checked the bug
> list), but from what I can see in the source of beanutils, the
> PropertyUtilsBean invokes the direct setter method (without index)
> with a single string instead of an String[] array, hence the argument
> type mismatch.
>
> Tom
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: commons-user-help@jakarta.apache.org
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org


Mime
View raw message