| Author |
Exception creating bean of class
|
hildich kilal
Ranch Hand
Joined: Aug 25, 2008
Posts: 44
|
|
I am creating a simple Struts application; I am getting following exception when I invoke a struts servlet. javax.servlet.ServletException: Exception creating bean of class java.mybank.appl.CustomerForm: {1} org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:848) org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl Following are details of my code struts-config.xml class is apprpritately defined and in correct package. Can anyone help what can be posible cause? thanks
|
 |
Sagar Rohankar
Ranch Hand
Joined: Feb 19, 2008
Posts: 2896
|
|
|
Which Struts version you are using ?
|
[LEARNING bLOG] | [Freelance Web Designer] | [and "Rohan" is part of my surname]
|
 |
Merrill Higginson
Ranch Hand
Joined: Feb 15, 2005
Posts: 4864
|
|
|
See question 9 of our FAQ.
|
Merrill
Consultant, Sima Solutions
|
 |
hildich kilal
Ranch Hand
Joined: Aug 25, 2008
Posts: 44
|
|
|
Struts - 1.3.8
|
 |
hildich kilal
Ranch Hand
Joined: Aug 25, 2008
Posts: 44
|
|
Originally posted by Merrill Higginson: See question 9 of our FAQ.
Merril, I in fact followed and verified all the four things, the name, spelling, class file existance, and public constructor. Every thing seems to be fine. There must be some very stupid mistake I may be making.. still sturggling. Thanks
|
 |
Sagar Rohankar
Ranch Hand
Joined: Feb 19, 2008
Posts: 2896
|
|
Problem may be because of you are using old dtd , see here for old version Try to make it 1.2 or 1.3 , and remove this line , and see . See whether this works or not !
|
 |
hildich kilal
Ranch Hand
Joined: Aug 25, 2008
Posts: 44
|
|
Hello Sagar, That was a good catch I appreciate. But still problem persists. Following is my new struts-config.xml file ALso here is my web.xml in ncase there is any issue here. (which I doubt) Thanks for help..
|
 |
hildich kilal
Ranch Hand
Joined: Aug 25, 2008
Posts: 44
|
|
I just looked in the catalina_logs file in tomcat/logs folder and here is exception trace I found. IF this can be of any help.
|
 |
hildich kilal
Ranch Hand
Joined: Aug 25, 2008
Posts: 44
|
|
Looks like I finally resolved the issue. Let me update here soon once I fully resolve the new issue I am facing. I will put in the reason here. Thanks for all the help
|
 |
hildich kilal
Ranch Hand
Joined: Aug 25, 2008
Posts: 44
|
|
Yes it is resolved. The whole Issue was that I was using "Java" in my package name. I think this is restricted!!! I didnt know this till now though I am working in java for some long time now. Merill you also have mentioned this in one of other threads at a place http://www.coderanch.com/t/58159/Struts/Missing-message-key-welcome-title Thanks for all your help and time Sagar / Merill.
|
 |
Sagar Rohankar
Ranch Hand
Joined: Feb 19, 2008
Posts: 2896
|
|
|
The 'java' word in package was my doubt when I first saw your question , but I didn't dare to point, coz its looks fine, Why cant we create a sub package like java.util.myutil package, If This package is in my classpath, then whts the big issue ?
|
 |
hildich kilal
Ranch Hand
Joined: Aug 25, 2008
Posts: 44
|
|
I think this is restricted by "Java" people. May be because if in future they need to have some package with exactly same name then the application will break. As they keep on releasing new versions so people should not create any package in their own projects which may contradict with any probable future package of java. Thats my understanding.
|
 |
Sagar Rohankar
Ranch Hand
Joined: Feb 19, 2008
Posts: 2896
|
|
Originally posted by Himanshu Kapil: I think this is restricted by "Java" people. May be because if in future they need to have some package with exactly same name then the application will break. As they keep on releasing new versions so people should not create any package in their own projects which may contradict with any probable future package of java. Thats my understanding.
Ok thats sounds reasonable ! Any other non-guessed answer ?
|
 |
Merrill Higginson
Ranch Hand
Joined: Feb 15, 2005
Posts: 4864
|
|
|
Just so you all know, I've added the java package name problem to the FAQ as one other thing to look for if you get the "Cannot create bean" message.
|
 |
 |
|
|
subject: Exception creating bean of class
|
|
|