File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Struts and the fly likes Struts error Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Struts error " Watch "Struts error " New topic
Author

Struts error

gona jyoti
Greenhorn

Joined: Sep 08, 2006
Posts: 8
hi Folks
i am in a project where in i am using struts for the first time when i click on the submit button of my jsp page i am getting the following error can any one find me out of this

Thanks in advance.............




javax.servlet.ServletException: BeanUtils.populate
org.apache.struts.util.RequestUtils.populate(RequestUtils.java:495)
org.apache.struts.action.RequestProcessor.processPopulate(RequestProcessor.java:805)
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:203)
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1194)
org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:432)
javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)

root cause

org.apache.commons.beanutils.ConversionException
org.apache.commons.beanutils.converters.SqlDateConverter.convert(SqlDateConverter.java:117)
org.apache.commons.beanutils.ConvertUtilsBean.convert(ConvertUtilsBean.java:428)
org.apache.commons.beanutils.BeanUtilsBean.setProperty(BeanUtilsBean.java:1004)
org.apache.commons.beanutils.BeanUtilsBean.populate(BeanUtilsBean.java:811)
org.apache.commons.beanutils.BeanUtils.populate(BeanUtils.java:298)
org.apache.struts.util.RequestUtils.populate(RequestUtils.java:493)
org.apache.struts.action.RequestProcessor.processPopulate(RequestProcessor.java:805)
org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:203)
org.apache.struts.action.ActionServlet.process(ActionServlet.java:1194)
org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:432)
javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
:
Merrill Higginson
Ranch Hand

Joined: Feb 15, 2005
Posts: 4864
The significant lines in the stack trace are:

org.apache.commons.beanutils.ConversionException
org.apache.commons.beanutils.converters.SqlDateConverter.convert(SqlDateConverter.java:117)

One of the properties in your ActionForm is apparently defined as type java.sql.Date. This is not allowed. You must define the property as a String. If you want to convert it to a date after it's been validated, that's fine, but the getXXX and SetXXX methods must work with a String object, not a Date object.


Merrill
Consultant, Sima Solutions
gona jyoti
Greenhorn

Joined: Sep 08, 2006
Posts: 8
Thank you
 
 
subject: Struts error