Did you specify <load-on-startup>2</load-on-startup> in the stanza that defines the Struts ActionServlet in your web.xml file? If not, that's the problem. If you did, there may be some other problem that is preventing the Struts ActionServlet from loading properly when the server first starts up. Look at the logs created when the server is first starting and see if there are any errors related to Struts. [ March 03, 2007: Message edited by: Merrill Higginson ]
i managed to solve that problem, as my formbean is declared wrongly.. but i have this error again.
from the browse, this is the message that appear: javax.servlet.ServletException: Exception creating bean of class com.myapp.struts.formbean.ContentForm: {1} org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:848) org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:781) org.apache.jsp.insert_jsp._jspService(insert_jsp.java:90) org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97) javax.servlet.http.HttpServlet.service(HttpServlet.java:802) org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:322) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:291) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241) javax.servlet.http.HttpServlet.service(HttpServlet.java:802) org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:362)
From the tomcat log file, the error is stated as below. SEVERE: Error creating form bean of class com.myapp.struts.formbean.ContentForm java.lang.NullPointerException at org.apache.struts.config.FormBeanConfig.createActionForm(FormBeanConfig.java:286) at org.apache.struts.util.RequestUtils.createActionForm(RequestUtils.java:250) at org.apache.struts.util.RequestUtils.createActionForm(RequestUtils.java:204) at org.apache.struts.taglib.html.FormTag.initFormBean(FormTag.java:455) at org.apache.struts.taglib.html.FormTag.doStartTag(FormTag.java:432) at org.apache.jsp.insert_jsp._jspx_meth_html_form_0(insert_jsp.java:107) at org.apache.jsp.insert_jsp._jspService(insert_jsp.java:83) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97) at javax.servlet.http.HttpServlet.service(HttpServlet.java:802) at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:322) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:291) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:241) at javax.servlet.http.HttpServlet.service(HttpServlet.java:802) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173) at org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:362) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:856) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:744) at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527) at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80) at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684) at java.lang.Thread.run(Thread.java:595)
Previously i have this error also, but is due to my package name is wrong. i have check it already, that all the names are correct.
PS: i using netbeans to create the action class and formbean.
thanks.
Merrill Higginson
Ranch Hand
Joined: Feb 15, 2005
Posts: 4864
posted
0
Does com.myapp.struts.formbean.ContentForm extend org.apache.struts.action.ActionForm? If not, that's the problem.
lynn fann
Ranch Hand
Joined: Oct 15, 2006
Posts: 115
posted
0
ya, i did. im totally lost in debugging this error.
Merrill Higginson
Ranch Hand
Joined: Feb 15, 2005
Posts: 4864
posted
0
Show us the code for your ActionForm bean. Also show us the portion of your struts-config.xml file that defines this bean and the action mapping that uses it.
About ninety percent of the time, this error is the result of a spelling error. Are you completely, one-hundred percent sure that what you put in the struts-config.xml file matches exactly the name and package name of your class? Are you sure it compiled correctly, and that the class file exists in the appropriate subdirectory under the WEB-INF/classes directory? Have you done anything with the constuctors of the class that would make it so it no longer has a public constructor with no arguments?
I had the same error. I had my environment setup in my localhost (Tomcat + struts + etc...configurations)...Everything was fine...But when I moved it into the server...it started giving me the module 'null' not found error....I struggled with it for a couple of days..my struts config and evrything is intact...it works in my local machine...I had the feeling that java is truly portable..so if the version of JDK and JVM matches then we dont need to build anything again..So i didnt build it again...just ported the classes from my local build into the server...but i found out thats not the case...This error disappeared as soon as I did a fresh build on the server...
Even I got a similar error. Can anybody please help me out. Every possible solution which you mentioned above are fulfilled. But still i cant get rid of this error.
HTTP Status 500 -
type Exception report
message
description The server encountered an internal error () that prevented it from fulfilling this request.
exception
org.apache.jasper.JasperException: java.lang.NullPointerException: Module 'null' not found.
org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:522)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:416)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:342)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:267)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:390)
root cause
Even I got a similar error. Can anybody please help me out. Ihave done all possible solution which are mentioned above. But still i cant get rid of this error.
Uncaught exception thrown in one of the service methods of the servlet: /WEB-INF/jsp/Customer.jsp. Exception thrown : java.lang.NullPointerException: Module 'null' not found.
struts-config.xml
Customer.jsp
web.xml
Please help me...........from last 5 days i cnnt fix this error... before this error i got Cannt find ActionMapping and ActionForm ...now i got this....
I got the same issue while installing the application in xampp. I tried several method but the method worked is strange one , i created a new project and copied the java source file to that project and compiled it again and took the class files from that project. it worked
This type of problems in struts is happening by mostly miss spelling of name and due to lacking of required library jar file . commons-chain-1.1.jar play a vital role to solve this kind of problems.just add all the important jar files to library folder.I think problems must be short out.