argument type mismatch问题解决

type Exception report

message

description The server encountered an internal error () that prevented it from fulfilling this request.

exception

javax.servlet.ServletException: BeanUtils.populate org.apache.struts.util.RequestUtils.populate(RequestUtils.java:495) org.apache.struts.action.RequestProcessor.processPopulate(RequestProcessor.java:804) org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:203) org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196) org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:414) javax.servlet.http.HttpServlet.service(HttpServlet.java:689) javax.servlet.http.HttpServlet.service(HttpServlet.java:802) com.weihua.common.util.CharsetFilter.doFilter(CharsetFilter.java:35)root cause

java.lang.IllegalArgumentException: argument type mismatch sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) java.lang.reflect.Method.invoke(Method.java:324) org.apache.commons.beanutils.PropertyUtils.setSimpleProperty(PropertyUtils.java:1789) org.apache.commons.beanutils.PropertyUtils.setNestedProperty(PropertyUtils.java:1684) org.apache.commons.beanutils.PropertyUtils.setProperty(PropertyUtils.java:1713) org.apache.commons.beanutils.BeanUtils.setProperty(BeanUtils.java:934) org.apache.commons.beanutils.BeanUtils.populate(BeanUtils.java:729) org.apache.struts.util.RequestUtils.populate(RequestUtils.java:493) org.apache.struts.action.RequestProcessor.processPopulate(RequestProcessor.java:804) org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:203) org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196) org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:414) javax.servlet.http.HttpServlet.service(HttpServlet.java:689) javax.servlet.http.HttpServlet.service(HttpServlet.java:802) com.weihua.common.util.CharsetFilter.doFilter(CharsetFilter.java:35)note The full stack trace of the root cause is available in the Apache Tomcat/5.0.28 logs.


程序中用了FormFile,报上面的错,后面发现是jsp页面上,要在提交的地方:

encType=multipart/form-data>

加上:encType=multipart/form-data,否则报上面的错误。


本文来自CSDN博客,转载请标明出处:http://blog.csdn.net/claudxyz/archive/2009/03/19/4004766.aspx

你可能感兴趣的:(java)