You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Matt Raible <ma...@yahoo.com> on 2002/01/19 02:45:04 UTC
argument type mismatch - trying to replicate upload task
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="video">Video</option>
<option value="text">Text</option>
<option value="audio">Audio</option>
<input type="file" name="theFile" value="">
<button value="Cancel" name="org.apache.struts.taglib.html.CANCEL"
type="submit">Cancel</button>
<button onClick="" value="Save" id="action" name="action"
type="submit">Save</button>
</form>
__________________________________________________
Do You Yahoo!?
Send FREE video emails in Yahoo! Mail!
http://promo.yahoo.com/videomail/
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
Re: argument type mismatch - trying to replicate upload task
Posted by dion <di...@multitask.com.au>.
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="video">Video</option>
> <option value="text">Text</option>
> <option value="audio">Audio</option>
> <input type="file" name="theFile" value="">
> <button value="Cancel" name="org.apache.struts.taglib.html.CANCEL"
> type="submit">Cancel</button>
> <button onClick="" value="Save" id="action" name="action"
> type="submit">Save</button>
> </form>
--
dIon Gillard, Multitask Consulting
http://www.multitask.com.au/developers
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>