使用beanutils 封装出错,怎么解决?
//c.手动封装productProduct p = new Product();
BeanUtils.populate(p, map);
oi.setProduct(p);
java.lang.IllegalArgumentException: java.lang.ClassCastException@57bf5ee7
at sun.reflect.GeneratedMethodAccessor44.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at com.(PropertyUtils.java:1789)
at com.(PropertyUtils.java:1684)
at com.(PropertyUtils.java:1713)
at com.(BeanUtils.java:1019)
at com.(BeanUtils.java:808)
at cn.hl.dao.impl.OrderDaoImpl.findMyOrdersByPage(OrderDaoImpl.java:86)
at cn.hl.service.impl.OrderServiceImpl.findMyOrdersByPage(OrderServiceImpl.java:60)
at cn.hl.web.servlet.OrderServlet.findMyOrdersByPage(OrderServlet.java:49)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at cn.hl.web.servlet.base.BaseServlet.service(BaseServlet.java:21)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:723)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at cn.hl.filter.EncodingFilter.doFilter(EncodingFilter.java:34)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:859)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:610)
at org.apache.tomcat.(JIoEndpoint.java:503)
at java.lang.Thread.run(Thread.java:619)