wood burning stoves 2.0*
The moose likes Struts and the fly likes Exception creating bean of class  Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Exception creating bean of class  " Watch "Exception creating bean of class  " New topic
Author

Exception creating bean of class

badri nath
Ranch Hand

Joined: Dec 21, 2005
Posts: 57
Hi,

javax.servlet.ServletException: Exception creating bean of class

By seeing the error you can understand my problem..
I have my jsp, form , action class created and even naming
is correct every where even including in the struts-config.xml.

The code syntax for creating form-bean and action mappings is also
correct in struts-config.xml...I am getting this error when trying to
access the jsp page.

I have googled out the issue but of no use, i have tried(atleast i think i have tried )all possible ways out.

Can any one suggest what are all the possible reasons which causes this error.

Thanks in advance
RoshaniG Gopal
Ranch Hand

Joined: May 15, 2006
Posts: 180
Hi,
There IS some mapping error. Please recheck the mapping for the cases,etc. Here is a pointer.
http://www.geocities.com/Colosseum/Field/7217/SW/struts/errors.html
Regards,
Roshani


Regards,<br />Roshani
badri nath
Ranch Hand

Joined: Dec 21, 2005
Posts: 57
Hi

There IS some mapping error. Please recheck the mapping for the cases,etc.

I have checked it out and the form action element i am giving in
JSP page has action tag in struts config.xml..So that is not the
problem.

Can any suggest all the possible ways..atleast some ways
Jan Groth
Ranch Hand

Joined: Feb 03, 2004
Posts: 456
are you sure your bean extends ActionForm? are you sure it has all needed (requested) getter and setters?

uncomment / delete all jsp code but the html form element, see if that renders without problems.

happy debugging,
jan
badri nath
Ranch Hand

Joined: Dec 21, 2005
Posts: 57
uncomment / delete all jsp code but the html form element

I am as of now using only one property i.e., username and have created
getters and setters for that..i even checked all spellings
RoshaniG Gopal
Ranch Hand

Joined: May 15, 2006
Posts: 180
Hi
Posting your code would make your life easy.
Regards,
Roshani
Merrill Higginson
Ranch Hand

Joined: Feb 15, 2005
Posts: 4864
I agree with Roshani. Please post:

1-The Acion-form definition and action mapping from your struts-config.xml file

2-The relevant portions of your JSP, including the <html:form> tag and the <html:text> tag.

3-Your ActionForm class

Also, make sure this class is compiled and that the class file exists in the WEB-INF/classes directory.


Merrill
Consultant, Sima Solutions
badri nath
Ranch Hand

Joined: Dec 21, 2005
Posts: 57
Hi Merill,

Also, make sure this class is compiled and that the class file exists in the WEB-INF/classes directory

Thanks for your suggestion, it is working fine now. I am building the application using ant tool,but the class file is going and sitting at
some other place. I should with path mentioned in build.xml. As of now
i manually copied and placed that file in directory structure suggested
by you and working fine now..

Thanks for all the help i receive from ranchers...
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Exception creating bean of class
 
Similar Threads
Error creating form bean of class
Cannot Retrieve Definition for Form Bean Null
Struts Problem in the March Article
boolean form bean member
Dynamic page content in first jsp page