Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Error creating Form Bean

 
Gaurav Chikara
Ranch Hand
Posts: 412
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All

I have a form Bean which is created from subclass of child of ValidatorForm

Relevant entries of struts-config.xml file are as follows
<form-bean name="QGPARAMETERS" type="com.symantec.qg.form.QgParametersForm"/>

<action path="/QGPARAMETERS"
type="com.symantec.qg.action.QGParametersAction"
name="QGPARAMETERS">
<forward name="success" path="HOMEPAGE_TILE"/>
<forward name="logonSuccess" path="LOGON_SUCCESS_TILE"/>
<forward name="internalUserSuccess" path="QG_PARAMETERS_TILE" redirect="true"/>
</action>



But on running the pplication I get the following stack trace
Exception creating bean of class com.symantec.qg.form.QgParametersForm: {1}
at org.apache.struts.taglib.html.FormTag.initFormBean(FormTag.java:563)
at org.apache.struts.taglib.html.FormTag.doStartTag(FormTag.java:520)
at com.ibm._jsp._qgParameters._jspService(_qgParameters.java:120)
at com.ibm.ws.jsp.runtime.HttpJspBase.service(HttpJspBase.java:88)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1212)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.service(ServletWrapper.java:1173)
at com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter(WebAppFilterChain.java:69)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.handleRequest(ServletWrapper.java:626)
at com.ibm.wsspi.webcontainer.servlet.GenericServletWrapper.handleRequest(GenericServletWrapper.java:117)
at com.ibm.ws.jsp.webcontainerext.JSPExtensionServletWrapper.handleRequest(JSPExtensionServletWrapper.java:171)
at com.ibm.ws.jsp.webcontainerext.JSPExtensionProcessor.handleRequest(JSPExtensionProcessor.java:230)

Not sure what could be reason for it.
If any one has any ideas on it then please share your views.
Thanks in advance

:roll:
 
Merrill Higginson
Ranch Hand
Posts: 4864
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Make sure of the following:

1-The class com.symantec.qg.form.QgParametersForm exists and is in the classpath
2-The class com.symantec.qg.form.QgParametersForm has a public, no-argument constructor.
3-If you've defined a constructor for this class, put System.out.println statements in it to make sure that it is not throwing an exception.
4-The <html:form> tag for the JSP should read as follows:

<html:form action="/QGPARAMETERS" >

action should be the only attribute. Do not specify any others.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic