wood burning stoves 2.0*
The moose likes Struts and the fly likes javax.servlet.ServletException: BeanUtils.populate Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "javax.servlet.ServletException: BeanUtils.populate" Watch "javax.servlet.ServletException: BeanUtils.populate" New topic
Author

javax.servlet.ServletException: BeanUtils.populate

Sam Venkata
Ranch Hand

Joined: Mar 06, 2006
Posts: 68
Hi,

I have a problem setting a list as a hidden variable.

This is what trying to do this exactly.

<html:hidden name="writeOffPremiumForm" property="lineItems"/>

and the property declared in the beean call is this

private java.util.List lineItems = org.apache.commons.collections.ListUtils.lazyList(new java.util.ArrayList(), new BillingInstallmentWriteOffFormExtensionFactory());

This is the exception I get when I try to submit the form.

javax.servlet.ServletException: BeanUtils.populate
org.apache.struts.util.RequestUtils.populate(RequestUtils.java:1254)
org.apache.struts.action.RequestProcessor.processPopulate(RequestProcessor.java:821)
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:254)
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)
org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:75)


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:597)
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:1019)
org.apache.commons.beanutils.BeanUtils.populate(BeanUtils.java:808)
org.apache.struts.util.RequestUtils.populate(RequestUtils.java:1252)
org.apache.struts.action.RequestProcessor.processPopulate(RequestProcessor.java:821)
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:254)
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)
org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:525)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:75)


What am I missing here? I appreciate any help.

Thanks,
Samanth.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: javax.servlet.ServletException: BeanUtils.populate
 
Similar Threads
Using a DataBean Object in Struts Form bean
IllegalArgumentException : <html:select>
FileUploading in struts
BeanUtils.populate
Dynamic radio buttons matrix using Struts