You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@commons.apache.org by "Edwards, James" <Ja...@ccra-adrc.gc.ca> on 2004/11/01 22:05:08 UTC

FileUpload Sample

Does anyone have a sample project illustrating a simple file upload
including the html/jsp presentation page.

Thanks,

James


[BeanUtils] BeanUtils.populate is not working

Posted by MantissaHotmail <fr...@hotmail.com>.
I'm using the beanUtils in an application.
When I try to populate a bean via "BeanUtil.populate"
I receive an error (the error is in the end of the mail) when the 
application tries to set a specific property:

private java.util.Date date;

public void setDate(Date date)
{
    this.date = date;
}

The value I'm rying to set is a java.sql.Timestamp (that extends 
java.util.Date).
If I change the set method to receive an Objet instead of a Date the 
application works (If I change to timesatamp I still receive the same 
error).


Caused by: 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 
br.com.db.bean.DBBeanInfo$DBBeanResultSetParser.parse(DBBeanInfo.java:125)


[]s
Freddy
----------------------------------------------------------------
Frederico Silva GuimarĂ£es
Tel: (21) 9952-1717
ICQ: 127277403
Email: kid@teccomm.les.inf.puc-rio.br
----------------------------------------------------------------

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