• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Exception creating bean of form class

 
Ranch Hand
Posts: 434
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have a Form and Action class. They are married together in the struts-config.xml with the <action name="formname".

There are no elements on the page as of yet, so my Form is empty. The jsp that calls my Action has a simple form tag:

<html:form action="createRequestAction">
<html:submit>Submit</html:submit>
</html:form>

So my form, action, and jsp are pretty bare bones.

When I call it, I get the follwoing error:


javax.servlet.jsp.JspException: Exception creating bean of class com.drrd.grid.ui.forms: {1}
at org.apache.struts.taglib.html.FormTag.initFormBean(FormTag.java:487)
at org.apache.struts.taglib.html.FormTag.doStartTag(FormTag.java:457)
at jsp_servlet._jsp.__creategrid._jspService(__creategrid.java:145)
at weblogic.servlet.jsp.JspBase.service(JspBase.java:33)
at weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run(ServletStubImpl.java:1072)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:465)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:348)
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:6981)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:121)
at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:3892)
at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:2766)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:224)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:183)
[ September 28, 2007: Message edited by: M Burke ]
 
Ranch Hand
Posts: 4864
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
It looks like you may have tried to use wildcards in a <form-bean> stanza in your struts-config.xml file. This is not allowed. You can use wildcards in action mappings, but not in form bean definitions.

I may be wrong, though. Please post the relevant form bean and action mapping definitions from your struts-config.xml file.
 
M Burke
Ranch Hand
Posts: 434
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Again, I don't have any elements yet. So my form class and jsp are empty.

I have my form defined like this..

<form-bean name="createGridForm" type="com.grid.ui.forms"/>


And my Action like this...
<action path="/createGridRequestAction" type="com.grid.ui.actions.CreateGridAction"
name="createGridForm" scope="session" parameter="method" validate="true" >
<forward name="status_success" path="drr.createGrid" redirect="true"/>
<forward name="status_warning" path="drr.createGrid" redirect="false"/>
<forward name="status_failure" path="drr.error" redirect="false"/>
</action>
 
Ranch Hand
Posts: 948
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Is "com.grid.ui.forms" the full name of your class including the path and class name? I suspect that it should be something like "com.grid.ui.forms.CreateGridForm".

- Brent
 
On my planet I'm considered quite beautiful. Thanks to the poetry in this tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic