一个容易换错的问题 有时候 建立ActionForm没有用图形化界面是 容易忘记继承ActionForm就会找成如下的错。
严重: Servlet.service() for servlet action threw exception
java.lang.IllegalArgumentException: Resources cannot be null.
at org.apache.commons.validator.Validator.<init>(Validator.java:188)
at org.apache.struts.validator.Resources.initValidator(Resources.java:475)
at org.apache.struts.validator.ValidatorForm.validate(ValidatorForm.java:104)
at org.apache.struts.action.RequestProcessor.processValidate(RequestProcessor.java:950)
at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:207)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1196)
at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:432)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.springframework.web.filter.CharacterEncodingFilter.doFilterInternal(CharacterEncodingFilter.java:96)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:76)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:849)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:454)
at java.lang.Thread.run(Unknown Source)
当做struts1 spring 2.5 ,Hibernate3.2 集成开发时若 struts-config.xml 的action 引用了 ActionFrom 时 当 一个JavaBean被 当成ActionForm 时没有继承 ActionForm 就会造成上面的异常