aspose file tools
The moose likes Struts and the fly likes Exception creating bean of class com.user Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Frameworks » Struts
Reply Bookmark "Exception creating bean of class com.user" Watch "Exception creating bean of class com.user" New topic
Author

Exception creating bean of class com.user

Pramod Kumar
Ranch Hand

Joined: Oct 05, 2007
Posts: 40
Hi,

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(FormTag.java:515)
at org.apache.struts.taglib.html.FormTag.doStartTag(FormTag.java:482)
at jsp_servlet._myusers.__userbody._jsp__tag0(__userbody.java:146)
at jsp_servlet._myusers.__userbody._jspService(__userbody.java:121)
at weblogic.servlet.jsp.JspBase.service(JspBase.java:34)

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.


Merrill
Consultant, Sima Solutions
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: Exception creating bean of class com.user
 
Similar Threads
Exception creating bean of class examples.hello.HelloForm
Exception creating bean of form class
Exception creating bean of class
Error creating bean
javax.servlet.ServletException: Exception creating bean of class