Hi,
I am trying to do file upload using struts1.1. I am getting
illegal argument type exception(stack trace attached below). I am struggling
to fix this since three days. I would really appreciate any kind of
help.
I am using web logic 8.1, eclipse and java for my development.
I created a form with property type FormFile.
jsp with input field <html:file property="theFile"/>
and a submit button<html:submit/>. In action class I am just getting
the file with form.getTheFile() method. but the problem is that when I
hit submit button I am getting the following exception:
<Error> <HTTP> <BEA-101017> <[ServletContext(id=314
99063,name=cms-int-20040605,context-path=/cms-int-20040605)] Root cause
of Servl
etException.
java.lang.IllegalArgumentException: argument type mismatch
at sun.reflect.NativeMethodAccessorImpl.invoke0(Nativ e Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(Native MethodAccessorImpl.
java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(De legatingMethodAcces
sorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at
org.apache.commons.beanutils.PropertyUtils.setSimp leProperty(Property
Utils.java:1789)
at
org.apache.commons.beanutils.PropertyUtils.setNest edProperty(Property
Utils.java:1684)
at
org.apache.commons.beanutils.PropertyUtils.setProp erty(PropertyUtils.
java:1713)
at
org.apache.commons.beanutils.BeanUtils.setProperty (BeanUtils.java:101
9)
at
org.apache.commons.beanutils.BeanUtils.populate(Be anUtils.java:80

at
org.apache.struts.util.RequestUtils.populate(Reque stUtils.java:1252)
at
org.apache.struts.action.RequestProcessor.processP opulate(RequestProc
essor.java:821)
at
org.apache.struts.action.RequestProcessor.process( RequestProcessor.ja
va:254)
at
org.apache.struts.action.ActionServlet.process(Act ionServlet.java:148
2)
at
org.apache.struts.action.ActionServlet.doPost(Acti onServlet.java:525)
at javax.servlet.http.HttpServlet.service(HttpServlet .java:760)
at javax.servlet.http.HttpServlet.service(HttpServlet .java:853)
at
weblogic.servlet.internal.ServletStubImpl$ServletI nvocationAction.run
(ServletStubImpl.java:971)
at
weblogic.servlet.internal.ServletStubImpl.invokeSe rvlet(ServletStubIm
pl.java:402)
at
weblogic.servlet.internal.ServletStubImpl.invokeSe rvlet(ServletStubIm
pl.java:305)
at
weblogic.servlet.internal.WebAppServletContext$Ser vletInvocationActio
n.run(WebAppServletContext.java:6350)
at
weblogic.security.acl.internal.AuthenticatedSubjec t.doAs(Authenticate
dSubject.java:317)
at
weblogic.security.service.SecurityManager.runAs(Se curityManager.java:
11

at
weblogic.servlet.internal.WebAppServletContext.inv okeServlet(WebAppSe
rvletContext.java:3635)
at
weblogic.servlet.internal.ServletRequestImpl.execu te(ServletRequestIm
pl.java:2585)
at
weblogic.kernel.ExecuteThread.execute(ExecuteThrea d.java:197)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.ja va:170)
>
Any help would be greately appreciated.
thanks