aspose file tools*
The moose likes Struts and the fly likes Unhandled exception: javax.servlet.ServletException: BeanUtils.populate 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 "Unhandled exception: javax.servlet.ServletException: BeanUtils.populate" Watch "Unhandled exception: javax.servlet.ServletException: BeanUtils.populate" New topic
Author

Unhandled exception: javax.servlet.ServletException: BeanUtils.populate

naresh kumar k
Ranch Hand

Joined: May 25, 2011
Posts: 30
hi,
I am just trying to implement login application using struts.
Instead of submit i used image as submit button while clicking on login i am getting below error

Here is my login page

<html:form enctype="multipart/form-data" action="coldStorageLogin.do" method="post" >
<html:text property="txtUserName" styleClass="credentials"></html:text>
<html:password property="txtpwd" ></html:password>
<html:image property="submitImage" value="submitLogin"
src="images/go.gif" border="0" align="right"/>


my struts-config.xml

<form-bean name="CSLoginForm" type="com.metaway.coldstorage.login.form.ColdStorageLoginForm"></form-bean>
<action path="/coldStorageLogin" type="com.metaway.coldstorage.login.action.ColdStorageLogin" name="CSLoginForm">
<forward name="CSLoginsuccess" path="gui/index.jsp"></forward></action>

action classs

public class ColdStorageLogin extends BaseDispatchAction
{

public ActionForward submitLogin(ActionMapping mapping, ActionForm form,
HttpServletRequest request, HttpServletResponse response)
{
ColdStorageLoginForm imgForm=(ColdStorageLoginForm)form;

if(imgForm.getTxtUserName().equals(imgForm.getTxtpwd()))
return mapping.findForward("CSLoginfailure");
else
return mapping.findForward("CSLoginsuccess");

}
}


here is my error stack trace


WARN [org.apache.struts.chain.commands.AbstractExceptionHandler] Unhandled exception: javax.servlet.ServletException: BeanUtils.populate
at org.apache.struts.util.RequestUtils.populate(RequestUtils.java:469) [:1.3.8]
at org.apache.struts.chain.commands.servlet.PopulateActionForm.populate(PopulateActionForm.java:50) [:1.3.8]
at org.apache.struts.chain.commands.AbstractPopulateActionForm.execute(AbstractPopulateActionForm.java:60) [:1.3.8]
at org.apache.struts.chain.commands.ActionCommandBase.execute(ActionCommandBase.java:51) [:1.3.8]
at org.apache.commons.chain.impl.ChainBase.execute(ChainBase.java:190) [:1.1]
at org.apache.commons.chain.generic.LookupCommand.execute(LookupCommand.java:304) [:1.1]
at org.apache.commons.chain.impl.ChainBase.execute(ChainBase.java:190) [:1.1]
at org.apache.struts.chain.ComposableRequestProcessor.process(ComposableRequestProcessor.java:283) [:1.3.8]
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1913) [:1.3.8]
at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:462) [:1.3.8]
at javax.servlet.http.HttpServlet.service(HttpServlet.java:754) [:1.0.0.Final]
at javax.servlet.http.HttpServlet.service(HttpServlet.java:847) [:1.0.0.Final]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:324) [:6.0.0.Final]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:242) [:6.0.0.Final]
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:275) [:6.0.0.Final]
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191) [:6.0.0.Final]
at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:181) [:6.0.0.Final]
at org.jboss.modcluster.catalina.CatalinaContext$RequestListenerValve.event(CatalinaContext.java:285) [:1.1.0.Final]
at org.jboss.modcluster.catalina.CatalinaContext$RequestListenerValve.invoke(CatalinaContext.java:261) [:1.1.0.Final]
at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:88) [:6.0.0.Final]
at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invoke(SecurityContextEstablishmentValve.java:100) [:6.0.0.Final]
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127) [:6.0.0.Final]
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) [:6.0.0.Final]
at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:158) [:6.0.0.Final]
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) [:6.0.0.Final]
at org.jboss.web.tomcat.service.request.ActiveRequestResponseCacheValve.invoke(ActiveRequestResponseCacheValve.java:53) [:6.0.0.Final]
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:362) [:6.0.0.Final]
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:877) [:6.0.0.Final]
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:654) [:6.0.0.Final]
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:951) [:6.0.0.Final]
at java.lang.Thread.run(Unknown Source) [:1.6.0]
Caused by: java.lang.IllegalArgumentException: No bean specified
at org.apache.commons.beanutils.PropertyUtilsBean.getPropertyDescriptor(PropertyUtilsBean.java:751) [:1.6]
at org.apache.commons.beanutils.BeanUtilsBean.setProperty(BeanUtilsBean.java:937) [:1.6]
at org.apache.commons.beanutils.BeanUtilsBean.populate(BeanUtilsBean.java:811) [:1.6]
at org.apache.commons.beanutils.BeanUtils.populate(BeanUtils.java:298) [:1.6]
at org.apache.struts.util.RequestUtils.populate(RequestUtils.java:467) [:1.3.8]
... 30 more

12:49:08,875 WARN [org.apache.struts.chain.commands.ExceptionCatcher] Exception from exceptionCommand 'servlet-exception': javax.servlet.ServletException: BeanUtils.populate
at org.apache.struts.util.RequestUtils.populate(RequestUtils.java:469) [:1.3.8]
at org.apache.struts.chain.commands.servlet.PopulateActionForm.populate(PopulateActionForm.java:50) [:1.3.8]
at org.apache.struts.chain.commands.AbstractPopulateActionForm.execute(AbstractPopulateActionForm.java:60) [:1.3.8]
at org.apache.struts.chain.commands.ActionCommandBase.execute(ActionCommandBase.java:51) [:1.3.8]
at org.apache.commons.chain.impl.ChainBase.execute(ChainBase.java:190) [:1.1]
at org.apache.commons.chain.generic.LookupCommand.execute(LookupCommand.java:304) [:1.1]
at org.apache.commons.chain.impl.ChainBase.execute(ChainBase.java:190) [:1.1]
at org.apache.struts.chain.ComposableRequestProcessor.process(ComposableRequestProcessor.java:283) [:1.3.8]
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1913) [:1.3.8]
at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:462) [:1.3.8]
at javax.servlet.http.HttpServlet.service(HttpServlet.java:754) [:1.0.0.Final]
at javax.servlet.http.HttpServlet.service(HttpServlet.java:847) [:1.0.0.Final]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:324) [:6.0.0.Final]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:242) [:6.0.0.Final]
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:275) [:6.0.0.Final]
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191) [:6.0.0.Final]
at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:181) [:6.0.0.Final]
at org.jboss.modcluster.catalina.CatalinaContext$RequestListenerValve.event(CatalinaContext.java:285) [:1.1.0.Final]
at org.jboss.modcluster.catalina.CatalinaContext$RequestListenerValve.invoke(CatalinaContext.java:261) [:1.1.0.Final]
at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:88) [:6.0.0.Final]
at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invoke(SecurityContextEstablishmentValve.java:100) [:6.0.0.Final]
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127) [:6.0.0.Final]
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) [:6.0.0.Final]
at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:158) [:6.0.0.Final]
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) [:6.0.0.Final]
at org.jboss.web.tomcat.service.request.ActiveRequestResponseCacheValve.invoke(ActiveRequestResponseCacheValve.java:53) [:6.0.0.Final]
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:362) [:6.0.0.Final]
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:877) [:6.0.0.Final]
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:654) [:6.0.0.Final]
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:951) [:6.0.0.Final]
at java.lang.Thread.run(Unknown Source) [:1.6.0]
Caused by: java.lang.IllegalArgumentException: No bean specified
at org.apache.commons.beanutils.PropertyUtilsBean.getPropertyDescriptor(PropertyUtilsBean.java:751) [:1.6]
at org.apache.commons.beanutils.BeanUtilsBean.setProperty(BeanUtilsBean.java:937) [:1.6]
at org.apache.commons.beanutils.BeanUtilsBean.populate(BeanUtilsBean.java:811) [:1.6]
at org.apache.commons.beanutils.BeanUtils.populate(BeanUtils.java:298) [:1.6]
at org.apache.struts.util.RequestUtils.populate(RequestUtils.java:467) [:1.3.8]
... 30 more

12:49:08,875 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[localhost].[/CSWeb].[action]] Servlet.service() for servlet action threw exception: java.lang.IllegalArgumentException: No bean specified
at org.apache.commons.beanutils.PropertyUtilsBean.getPropertyDescriptor(PropertyUtilsBean.java:751) [:1.6]
at org.apache.commons.beanutils.BeanUtilsBean.setProperty(BeanUtilsBean.java:937) [:1.6]
at org.apache.commons.beanutils.BeanUtilsBean.populate(BeanUtilsBean.java:811) [:1.6]
at org.apache.commons.beanutils.BeanUtils.populate(BeanUtils.java:298) [:1.6]
at org.apache.struts.util.RequestUtils.populate(RequestUtils.java:467) [:1.3.8]
at org.apache.struts.chain.commands.servlet.PopulateActionForm.populate(PopulateActionForm.java:50) [:1.3.8]
at org.apache.struts.chain.commands.AbstractPopulateActionForm.execute(AbstractPopulateActionForm.java:60) [:1.3.8]
at org.apache.struts.chain.commands.ActionCommandBase.execute(ActionCommandBase.java:51) [:1.3.8]
at org.apache.commons.chain.impl.ChainBase.execute(ChainBase.java:190) [:1.1]
at org.apache.commons.chain.generic.LookupCommand.execute(LookupCommand.java:304) [:1.1]
at org.apache.commons.chain.impl.ChainBase.execute(ChainBase.java:190) [:1.1]
at org.apache.struts.chain.ComposableRequestProcessor.process(ComposableRequestProcessor.java:283) [:1.3.8]
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1913) [:1.3.8]
at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:462) [:1.3.8]
at javax.servlet.http.HttpServlet.service(HttpServlet.java:754) [:1.0.0.Final]
at javax.servlet.http.HttpServlet.service(HttpServlet.java:847) [:1.0.0.Final]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:324) [:6.0.0.Final]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:242) [:6.0.0.Final]
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:275) [:6.0.0.Final]
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191) [:6.0.0.Final]
at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:181) [:6.0.0.Final]
at org.jboss.modcluster.catalina.CatalinaContext$RequestListenerValve.event(CatalinaContext.java:285) [:1.1.0.Final]
at org.jboss.modcluster.catalina.CatalinaContext$RequestListenerValve.invoke(CatalinaContext.java:261) [:1.1.0.Final]
at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:88) [:6.0.0.Final]
at org.jboss.web.tomcat.security.SecurityContextEstablishmentValve.invoke(SecurityContextEstablishmentValve.java:100) [:6.0.0.Final]
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127) [:6.0.0.Final]
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) [:6.0.0.Final]
at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:158) [:6.0.0.Final]
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) [:6.0.0.Final]
at org.jboss.web.tomcat.service.request.ActiveRequestResponseCacheValve.invoke(ActiveRequestResponseCacheValve.java:53) [:6.0.0.Final]
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:362) [:6.0.0.Final]
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:877) [:6.0.0.Final]
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:654) [:6.0.0.Final]
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:951) [:6.0.0.Final]
at java.lang.Thread.run(Unknown Source) [:1.6.0]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Unhandled exception: javax.servlet.ServletException: BeanUtils.populate