| Author |
Struts - Error - "Cannot find ActionMappings or ActionFormBeans collection"
|
Ghouse Mohideen
Greenhorn
Joined: Mar 31, 2007
Posts: 4
|
|
I have made a sample Struts application in IBM Websphere Studio Application Developer, which is working fine But after deploying the war file on Sun Java System Application Server 8, Iam getting following error after launching the welcome page "login.jsp" javax.servlet.ServletException: Cannot find ActionMappings or ActionFormBeans collection org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:830) org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:763) org.apache.jsp.Login_jsp._jspService(Login_jsp.java:94) org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:105) javax.servlet.http.HttpServlet.service(HttpServlet.java:860) org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:336) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:297) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:247) javax.servlet.http.HttpServlet.service(HttpServlet.java:860) sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) java.lang.reflect.Method.invoke(Method.java:585) org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:249) java.security.AccessController.doPrivileged(Native Method) javax.security.auth.Subject.doAsPrivileged(Subject.java:517) org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:282) org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:165) root cause javax.servlet.jsp.JspException: Cannot find ActionMappings or ActionFormBeans collection org.apache.struts.taglib.html.FormTag.lookup(FormTag.java:798) org.apache.struts.taglib.html.FormTag.doStartTag(FormTag.java:506) org.apache.jsp.Login_jsp._jspx_meth_html_form_0(Login_jsp.java:110) org.apache.jsp.Login_jsp._jspService(Login_jsp.java:84) org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:105) javax.servlet.http.HttpServlet.service(HttpServlet.java:860) org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:336) org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:297) org.apache.jasper.servlet.JspServlet.service(JspServlet.java:247) javax.servlet.http.HttpServlet.service(HttpServlet.java:860) sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) java.lang.reflect.Method.invoke(Method.java:585) org.apache.catalina.security.SecurityUtil$1.run(SecurityUtil.java:249) java.security.AccessController.doPrivileged(Native Method) javax.security.auth.Subject.doAsPrivileged(Subject.java:517) org.apache.catalina.security.SecurityUtil.execute(SecurityUtil.java:282) org.apache.catalina.security.SecurityUtil.doAsPrivilege(SecurityUtil.java:165) Is that the problem with Doctype? I used the following doctype <!DOCTYPE struts-config PUBLIC "-//Apache Software Foundation//DTD Struts Configuration 1.1//EN" "http://jakarta.apache.org/struts/dtds/struts-config_1_1.dtd"> Do i need to change the doctype? Please help me outin this regard. Thnaks in advance
|
 |
RoshaniG Gopal
Ranch Hand
Joined: May 15, 2006
Posts: 180
|
|
Hi, Please try as suggested by the foll link. http://forum.java.sun.com/thread.jspa?threadID=387141&messageID=2684678
|
Regards,<br />Roshani
|
 |
Ghouse Mohideen
Greenhorn
Joined: Mar 31, 2007
Posts: 4
|
|
I have seen the link, I said we need to have the following jars, commons-beanutils.jar, commons-collections.jar, commons-dbcp.jar, commons-digester.jar, commons-fileupload.jar, commons-lang.jar, commons-logging.jar, commons-pool.jar,, commons-resources.jar, commons-validator.jar, jakarta-oro.jar, struts.jar I have imported all the jars listed, but still the problem persits. Is there any compatibility issue with ear produced by IBM websphere and Sun Java System Application server. Please let me know. Regards,
|
 |
Merrill Higginson
Ranch Hand
Joined: Feb 15, 2005
Posts: 4864
|
|
|
The answer to this question is found at question number 12 of the JavaRanch Struts FAQ.
|
Merrill
Consultant, Sima Solutions
|
 |
Deepak Bala
Bartender
Joined: Feb 24, 2006
Posts: 6588
|
|
|
I placed struts.jar on the classpath to solve this once. Are you sure the required jars are available on your classpath ?
|
SCJP 6 articles - SCJP 5/6 mock exams - SCJP Mocks - SCJP 5 Mock exam (Word document ) - SCJP 5 Mock exam in Java.Inquisition format
|
 |
Merrill Higginson
Ranch Hand
Joined: Feb 15, 2005
Posts: 4864
|
|
|
The trouble with this error message is that it's never the real error. To find the real error, you have to look at your app server's log file for the time period when your app server is first starting up.
|
 |
Prasad Tamirisa
Ranch Hand
Joined: Mar 26, 2007
Posts: 130
|
|
|
placing the relevent jar file in the class path may solve this problem.!
|
Regards,
Durga Prasad
|
 |
Kevin Liu
Greenhorn
Joined: Mar 17, 2007
Posts: 10
|
|
|
check your web.xml and struts-config.xml
|
 |
Ghouse Mohideen
Greenhorn
Joined: Mar 31, 2007
Posts: 4
|
|
Thank you all!!! It worked, I use to get error as java.net.MalformedURLException: Path WEB-INF/struts-config.xml does not start with a "/" character in server logs, after checking web.xml which has init param as <init-param> <param-name>config</param-name> <param-value>WEB-INF/struts-config.xml</param-value> </init-param> after changing this to <init-param> <param-name>config</param-name> <param-value>/WEB-INF/struts-config.xml</param-value> </init-param> it started working!! regards,
|
 |
 |
|
|
subject: Struts - Error - "Cannot find ActionMappings or ActionFormBeans collection"
|
|
|