You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Nathan Coast <na...@codeczar.com> on 2003/06/10 03:41:56 UTC

debugging bean populate

Hi,

I'm getting an IllegalArgumentException presumably due to trying to 
populate a field of a form with the wrong datatype.  I can't see where 
I'm going wrong.  Is there a simple way to turn on debugging for the 
BeanUtils.populate code to see which attribute is failing?

thanks
Nathan

java.lang.IllegalArgumentException: argument type mismatch
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:324)
	at 
org.apache.commons.beanutils.PropertyUtils.setSimpleProperty(PropertyUtils.java:1789)
	at 
org.apache.commons.beanutils.PropertyUtils.setNestedProperty(PropertyUtils.java:1684)
	at 
org.apache.commons.beanutils.PropertyUtils.setProperty(PropertyUtils.java:1713)
	at org.apache.commons.beanutils.BeanUtils.setProperty(BeanUtils.java:1019)
	at org.apache.commons.beanutils.BeanUtils.populate(BeanUtils.java:808)
	at org.apache.struts.util.RequestUtils.populate(RequestUtils.java:1097)


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


Re: debugging bean populate

Posted by Dan Tran <da...@hotmail.com>.
add this line to your log4j.properties file

log4j.logger.org.apache.commons.beanutils=DEBUG

-D
----- Original Message ----- 
From: "Nathan Coast" <na...@codeczar.com>
To: "Struts Users Mailing List" <st...@jakarta.apache.org>
Sent: Monday, June 09, 2003 6:41 PM
Subject: debugging bean populate


> Hi,
>
> I'm getting an IllegalArgumentException presumably due to trying to
> populate a field of a form with the wrong datatype.  I can't see where
> I'm going wrong.  Is there a simple way to turn on debugging for the
> BeanUtils.populate code to see which attribute is failing?
>
> thanks
> Nathan
>
> java.lang.IllegalArgumentException: argument type mismatch
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at
>
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39
)
> at
>
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl
.java:25)
> at java.lang.reflect.Method.invoke(Method.java:324)
> at
>
org.apache.commons.beanutils.PropertyUtils.setSimpleProperty(PropertyUtils.j
ava:1789)
> at
>
org.apache.commons.beanutils.PropertyUtils.setNestedProperty(PropertyUtils.j
ava:1684)
> at
>
org.apache.commons.beanutils.PropertyUtils.setProperty(PropertyUtils.java:17
13)
> at org.apache.commons.beanutils.BeanUtils.setProperty(BeanUtils.java:1019)
> at org.apache.commons.beanutils.BeanUtils.populate(BeanUtils.java:808)
> at org.apache.struts.util.RequestUtils.populate(RequestUtils.java:1097)
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: struts-user-help@jakarta.apache.org
>
>

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