This week's book giveaway is in the Jobs Discussion forum.
We're giving away four copies of Java Interview Guide and have Anthony DePalma on-line!
See this thread for details.
The moose likes Struts and the fly likes illegal argument exception error in struts Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "illegal argument exception error in struts" Watch "illegal argument exception error in struts" New topic

illegal argument exception error in struts

Joseph Arnold
Ranch Hand

Joined: Oct 05, 2010
Posts: 42
I am learning the struts framework by building a simple account management application. I have a login page from where valid users are logged in to a homepage(home.jsp) where they can add a new expense and some details. I get the following exception upon submitting the expense form.

java.lang.IllegalArgumentException: argument type mismatch
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(
at sun.reflect.DelegatingMethodAccessorImpl.invoke(
at java.lang.reflect.Method.invoke(
at org.apache.commons.beanutils.PropertyUtils.setSimpleProperty(
at org.apache.commons.beanutils.PropertyUtils.setNestedProperty(
at org.apache.commons.beanutils.PropertyUtils.setProperty(
at org.apache.commons.beanutils.BeanUtils.setProperty(
at org.apache.commons.beanutils.BeanUtils.populate(
at org.apache.struts.util.RequestUtils.populate(
at org.apache.struts.chain.commands.servlet.PopulateActionForm.populate(
at org.apache.struts.chain.commands.AbstractPopulateActionForm.execute(
at org.apache.struts.chain.commands.ActionCommandBase.execute(
at org.apache.commons.chain.impl.ChainBase.execute(
at org.apache.commons.chain.generic.LookupCommand.execute(
at org.apache.commons.chain.impl.ChainBase.execute(
at org.apache.struts.chain.ComposableRequestProcessor.process(
at org.apache.struts.action.ActionServlet.process(
at org.apache.struts.action.ActionServlet.doPost(
at javax.servlet.http.HttpServlet.service(
at javax.servlet.http.HttpServlet.service(
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(
at org.apache.catalina.core.ApplicationFilterChain.doFilter(
at org.apache.catalina.core.StandardWrapperValve.invoke(
at org.apache.catalina.core.StandardContextValve.invoke(
at org.apache.catalina.core.StandardHostValve.invoke(
at org.apache.catalina.valves.ErrorReportValve.invoke(
at org.apache.catalina.core.StandardEngineValve.invoke(
at org.apache.catalina.connector.CoyoteAdapter.service(
at org.apache.coyote.http11.Http11Processor.process(
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(

My form bean:

And my home.jsp :

Can somebody please help me out? I have been stuck on this for almost the entire day
Vicky Vijay
Ranch Hand

Joined: Apr 23, 2008
Posts: 125
Post your Struts-config.xml file for reference...
I agree. Here's the link:
subject: illegal argument exception error in struts
It's not a secret anymore!