This week's book giveaway is in the Design forum.
We're giving away four copies of Building Microservices and have Sam Newman on-line!
See this thread for details.
The moose likes Struts and the fly likes Exception creating bean of class com.user Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Building Microservices this week in the Design forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Exception creating bean of class com.user" Watch "Exception creating bean of class com.user" New topic

Exception creating bean of class com.user

Pramod Kumar
Ranch Hand

Joined: Oct 05, 2007
Posts: 40

I have created a bean that doesn't extends ActionForm, and I am getting the following exception.


javax.servlet.jsp.JspException: Exception creating bean of class com..User: {1}
at org.apache.struts.taglib.html.FormTag.initFormBean(
at org.apache.struts.taglib.html.FormTag.doStartTag(
at jsp_servlet._myusers.__userbody._jsp__tag0(
at jsp_servlet._myusers.__userbody._jspService(
at weblogic.servlet.jsp.JspBase.service(

Is that compulsory that for every bean we have to extend ActionForm? With out ActionForm can we use beans for forms in struts? The class files are in classpath. Any idea?
Merrill Higginson
Ranch Hand

Joined: Feb 15, 2005
Posts: 4864
If you reference a JavaBean in a <form-bean> tag in a struts-config.xml file, it must have ActionForm somewhere in it's hierarchy of superclasses.

Your main ActionForm can reference other JavaBeans that do not extend ActionForm, but the main form bean associated with an action must extend ActionForm.

I saw something else in your stack trace that concerns me: "com..User" is not a valid fully qualified class name. Did you edit the stack trace before posting it? If not, check your config file and make sure that it's specified properly.

Consultant, Sima Solutions
Have you checked out Aspose?
subject: Exception creating bean of class com.user
jQuery in Action, 3rd edition