argument type mismatch - trying to replicate upload task

2002-01-18 Thread Matt Raible

After banging my head against the wall for a few hours, I'm hoping someone on
this list has an idea.  I keep getting the following error:

java.lang.IllegalArgumentException: argument type mismatch
at java.lang.reflect.Method.invoke(Native Method)
at
org.apache.commons.beanutils.PropertyUtils.setSimpleProperty(PropertyUtils.java:1566)
at
org.apache.commons.beanutils.PropertyUtils.setNestedProperty(PropertyUtils.java:1460)
at
org.apache.commons.beanutils.PropertyUtils.setProperty(PropertyUtils.java:1490)
at org.apache.commons.beanutils.BeanUtils.populate(BeanUtils.java:567)


I have getters/setters for all the elements in my HTML form below - and I never
even get to my action class to debug it.  I've basically copied the UploadForm
example and added asset, description, and mediaType as Strings.  Then removed
filePath (hardcoding for now), and viewFile fields.  

form method=POST action=/onpoint/do/saveObject id=assetForm
name=assetForm
   input type=text name=asset size=30 value=
   textarea name=description cols=30 rows=5/textarea
   select size=1 name=mediaType
  option value=videoVideo/option
  option value=textText/option
  option value=audioAudio/option
   input type=file name=theFile value=
   button value=Cancel name=org.apache.struts.taglib.html.CANCEL
type=submitCancel/button
   button onClick= value=Save id=action name=action
type=submitSave/button
/form

__
Do You Yahoo!?
Send FREE video emails in Yahoo! Mail!
http://promo.yahoo.com/videomail/

--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]




Re: argument type mismatch - trying to replicate upload task

2002-01-18 Thread dion

Matt Raible wrote:
 After banging my head against the wall for a few hours, I'm hoping someone on
 this list has an idea.  I keep getting the following error:
 
 java.lang.IllegalArgumentException: argument type mismatch
   at java.lang.reflect.Method.invoke(Native Method)
   at
 org.apache.commons.beanutils.PropertyUtils.setSimpleProperty(PropertyUtils.java:1566)
   at
 org.apache.commons.beanutils.PropertyUtils.setNestedProperty(PropertyUtils.java:1460)
   at
 org.apache.commons.beanutils.PropertyUtils.setProperty(PropertyUtils.java:1490)
   at org.apache.commons.beanutils.BeanUtils.populate(BeanUtils.java:567)
 

This is effectively saying that your form bean's set method for some 
property doesn't match the value (most likely a string) given to it..


 I have getters/setters for all the elements in my HTML form below - and I never
 even get to my action class to debug it.  I've basically copied the UploadForm
 example and added asset, description, and mediaType as Strings.  Then removed
 filePath (hardcoding for now), and viewFile fields.  

Can you post your form bean??

 form method=POST action=/onpoint/do/saveObject id=assetForm
 name=assetForm
input type=text name=asset size=30 value=
textarea name=description cols=30 rows=5/textarea
select size=1 name=mediaType
   option value=videoVideo/option
   option value=textText/option
   option value=audioAudio/option
input type=file name=theFile value=
button value=Cancel name=org.apache.struts.taglib.html.CANCEL
 type=submitCancel/button
button onClick= value=Save id=action name=action
 type=submitSave/button
 /form


-- 
dIon Gillard, Multitask Consulting
http://www.multitask.com.au/developers


--
To unsubscribe, e-mail:   mailto:[EMAIL PROTECTED]
For additional commands, e-mail: mailto:[EMAIL PROTECTED]