File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Struts and the fly likes What's the real cause of this? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "What Watch "What New topic
Author

What's the real cause of this?

john von
Ranch Hand

Joined: Apr 13, 2004
Posts: 49
Im trying to run a code from the book of James Holmes Struts: The complete reference. It gave me the error as i click on the link on its index.jsp.

Thanks in advance.

root cause

javax.servlet.ServletException: Exception creating bean of class com.jamesholmes.minihr.SearchForm: {1}
at org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:533)
at org.apache.jsp.search_jsp._jspService(search_jsp.java:212)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:137)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:210)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:295)
at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:256)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2422)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
at org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:171)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:163)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:641)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
at org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invokeNext(StandardPipeline.java:643)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:199)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:828)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:700)
at org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:584)
at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:683)
at java.lang.Thread.run(Thread.java:536)



--------------------------------------------------------------------------------

Apache Tomcat/4.1.30
John Smith
Ranch Hand

Joined: Sep 02, 2004
Posts: 61
could it be something as simple as file permissions?
john von
Ranch Hand

Joined: Apr 13, 2004
Posts: 49
You think so?
In the book, it uses Struts1.1 but what i have is Struts2.2. I couldn't find in jakarta site of the older version. I couldn't move on in my study because of these errors.

Anymore help who had this book?

Thanks!
Sheldon Fernandes
Ranch Hand

Joined: Aug 18, 2004
Posts: 157
Hi,

I found this list of common struts errors. It contains an error similar to the one you are getting.

Looks like SearchForm does not extend ActionForm
OR
the form bean entry in struts-config.xml for search form is using ActionForm instead of SearchForm.

Sheldon
john von
Ranch Hand

Joined: Apr 13, 2004
Posts: 49
Thanks for the link but i still couldn't find an answer. Ive checked the 2 probable cause you mentioned but they're set as right.

Anybody?
Sheldon Fernandes
Ranch Hand

Joined: Aug 18, 2004
Posts: 157
Try enabling logging.

Got this from the struts site.
The simplest way to enable logging is to create two files in WEB-INF/classes:
commons-logging.properties
org.apache.commons.logging.Log=org.apache.commons.logging.impl.SimpleLog
simplelog.properties
# Logging detail level,
# Must be one of ("trace", "debug", "info", "warn", "error", or "fatal").
org.apache.commons.logging.simplelog.defaultlog=trace

You should now be able to see trace statements on your server console. This might help in debugging. Post the ones just before the stack trace for us to have a look.

[Edit] The error seems to be generated from the <html:form> tag in search.jsp
[ September 11, 2004: Message edited by: Sheldon Fernandes ]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: What's the real cause of this?