strruts file upload problem(illegal argument exception)

Discussion in 'Java' started by giggi, Jun 7, 2004.

  1. giggi

    giggi Guest

    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(Native Method)
    at
    sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
    java:39)
    at
    sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
    sorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:324)
    at
    org.apache.commons.beanutils.PropertyUtils.setSimpleProperty(Property
    Utils.java:1789)
    at
    org.apache.commons.beanutils.PropertyUtils.setNestedProperty(Property
    Utils.java:1684)
    at
    org.apache.commons.beanutils.PropertyUtils.setProperty(PropertyUtils.
    java:1713)
    at
    org.apache.commons.beanutils.BeanUtils.setProperty(BeanUtils.java:101
    9)
    at
    org.apache.commons.beanutils.BeanUtils.populate(BeanUtils.java:808)
    at
    org.apache.struts.util.RequestUtils.populate(RequestUtils.java:1252)
    at
    org.apache.struts.action.RequestProcessor.processPopulate(RequestProc
    essor.java:821)
    at
    org.apache.struts.action.RequestProcessor.process(RequestProcessor.ja
    va:254)
    at
    org.apache.struts.action.ActionServlet.process(ActionServlet.java:148
    2)
    at
    org.apache.struts.action.ActionServlet.doPost(ActionServlet.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$ServletInvocationAction.run
    (ServletStubImpl.java:971)
    at
    weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubIm
    pl.java:402)
    at
    weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubIm
    pl.java:305)
    at
    weblogic.servlet.internal.WebAppServletContext$ServletInvocationActio
    n.run(WebAppServletContext.java:6350)
    at
    weblogic.security.acl.internal.AuthenticatedSubject.doAs(Authenticate
    dSubject.java:317)
    at
    weblogic.security.service.SecurityManager.runAs(SecurityManager.java:
    118)
    at
    weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppSe
    rvletContext.java:3635)
    at
    weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestIm
    pl.java:2585)
    at
    weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:197)
    at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:170)
    >


    Any help would be greately appreciated.

    thanks
     
    giggi, Jun 7, 2004
    #1
    1. Advertising

  2. giggi

    Aidan Guest

    giggi wrote:
    > 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(Native Method)
    > at
    > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
    > java:39)
    > at
    > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
    > sorImpl.java:25)
    > at java.lang.reflect.Method.invoke(Method.java:324)
    > at
    > org.apache.commons.beanutils.PropertyUtils.setSimpleProperty(Property
    > Utils.java:1789)
    > at
    > org.apache.commons.beanutils.PropertyUtils.setNestedProperty(Property
    > Utils.java:1684)
    > at
    > org.apache.commons.beanutils.PropertyUtils.setProperty(PropertyUtils.
    > java:1713)
    > at
    > org.apache.commons.beanutils.BeanUtils.setProperty(BeanUtils.java:101
    > 9)
    > at
    > org.apache.commons.beanutils.BeanUtils.populate(BeanUtils.java:808)
    > at
    > org.apache.struts.util.RequestUtils.populate(RequestUtils.java:1252)
    > at
    > org.apache.struts.action.RequestProcessor.processPopulate(RequestProc
    > essor.java:821)
    > at
    > org.apache.struts.action.RequestProcessor.process(RequestProcessor.ja
    > va:254)
    > at
    > org.apache.struts.action.ActionServlet.process(ActionServlet.java:148
    > 2)
    > at
    > org.apache.struts.action.ActionServlet.doPost(ActionServlet.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$ServletInvocationAction.run
    > (ServletStubImpl.java:971)
    > at
    > weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubIm
    > pl.java:402)
    > at
    > weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubIm
    > pl.java:305)
    > at
    > weblogic.servlet.internal.WebAppServletContext$ServletInvocationActio
    > n.run(WebAppServletContext.java:6350)
    > at
    > weblogic.security.acl.internal.AuthenticatedSubject.doAs(Authenticate
    > dSubject.java:317)
    > at
    > weblogic.security.service.SecurityManager.runAs(SecurityManager.java:
    > 118)
    > at
    > weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppSe
    > rvletContext.java:3635)
    > at
    > weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestIm
    > pl.java:2585)
    > at
    > weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:197)
    > at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:170)
    >
    >
    > Any help would be greately appreciated.
    >
    > thanks


    You wouldn't happen to be using Opera as your browser? I recall having
    issues with it and file uploads with Struts. It looked similar to what
    you're describing.

    Aidan
     
    Aidan, Jun 8, 2004
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. William Brogden
    Replies:
    1
    Views:
    8,371
    Manoj S. P.
    Jun 30, 2003
  2. Michael Lee
    Replies:
    0
    Views:
    1,553
    Michael Lee
    Jun 27, 2003
  3. Petros
    Replies:
    0
    Views:
    3,217
    Petros
    Aug 20, 2003
  4. Brian Dobby
    Replies:
    0
    Views:
    411
    Brian Dobby
    Nov 28, 2003
  5. Öö Tiib

    illegal void argument

    Öö Tiib, Jan 29, 2014, in forum: C++
    Replies:
    9
    Views:
    91
    Öö Tiib
    Jan 31, 2014
Loading...

Share This Page