This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
New here. Just read through posts concerning Exceptions creating bean of class and couldn't find my answer.
I'm using a book, which is outdated but I didn't realize it. However, I thought I'd try to get through it anyways.
The exception is as follows:
javax.servlet.ServletException: Exception creating bean of class LookupForm: java.lang.ClassNotFoundException: LookupForm at org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:495) at org.apache.jsp.index_jsp._jspService(index_jsp.java:101) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:92) at javax.servlet.http.HttpServlet.service(HttpServlet.java:809) at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:162) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:240) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:187) at javax.servlet.http.HttpServlet.service(HttpServlet.java:809)
The problem may be that you are missing a required library. ClassNotFoundException is definitely the least informative error that the JDK ever throws. Sometimes it means the class wasn't found. Sometimes it just means that loading failed because your class needed another class, and the second class was the one that wasn't found.
One thing I can discern from the message is that the class that can't be found is "LookupForm", which means that it doesn't realize that LookupForm is in the package ch3. Otherwise, it would say it couldn't find "ch3.LookupForm".
Since you define your form bean as type="ch3.LookupForm", though, I don't see why it's not picking up the correct class name.
The only thing I can think of to tell you is to re-deploy the application and re-start the application server. Maybe there's an old copy of struts-config.xml that's getting used instead of the one you showed us. [ January 19, 2006: Message edited by: Merrill Higginson ]