tomcat 经常会报一些莫名其妙的异常:如下
type Exception report
message
description The server encountered an internal error () that prevented it from fulfilling this request.
exception
javax.servlet.ServletException: Servlet.init() for servlet action threw exception org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105) org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148) org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869) org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664) org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527) org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80) org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684) java.lang.Thread.run(Thread.java:595)
root cause
java.lang.NullPointerException org.apache.struts.action.ActionServlet.parseModuleConfigFile(ActionServlet.java:1003) org.apache.struts.action.ActionServlet.initModuleConfig(ActionServlet.java:955) org.apache.struts.action.ActionServlet.init(ActionServlet.java:482) com.dc.idm.ui.action.init.InitServlet.init(InitServlet.java:68) javax.servlet.GenericServlet.init(GenericServlet.java:211) org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105) org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148) org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869) org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664) org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527) org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80) org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684) java.lang.Thread.run(Thread.java:595)
note The full stack trace of the root cause is available in the Apache Tomcat/5.5.20 logs.
这个问题主要是由于配置文件对应不上造成的,也就是说你的web.xml文件中关于struts的配置说明( struts -[*-config.xml])在指定的目录下没找到造成的,如:
<init-param>
<param-name>config/console/workflow</param-name>
<param-value>
/WEB-INF/struts-conf/struts-flow.xml
</param-value>
</init-param>
而在 /WEB-INF/struts-conf/struts-flow.xml 下并没有找到 struts-flow.xml文件,此时,就会报这个错!!请校正~
相关推荐
解决Anolis(龙蜥),解决System.TypeInitializationException: The type initializer for ‘Gdip’ threw an exception.
2020-04-27 22:15:44.892 ERROR 13764 --- [nio-8081-exec-9] o.a.c.c.C.[.[.[/].[dispatcherServlet] : Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Request ...
11. “Servlet.init() for servlet action threw exception” 这个错误通常发生在后面会显示一个关于 ActionServlet 的异常堆栈信息,其中指出了异常具体出现在代码的哪一行。解决方法是检查代码,找到异常的来源,...
严重: Servlet.service() for servlet jsp threw exception java.lang.UnsupportedClassVersionError: com/util/PostUtil at org.apache.jsp.shouye.index_jsp._jspService(index_jsp.java:84) at org.apache....
严重: Servlet /LogMess threw load() exception java.lang.ClassNotFoundException: org.springframework.web.servlet.DispatcherServlet 这个问题应该是spring包所带来的问题,最后还是从新下了一个spring2.5的...
因特网的路由选择协议
<artifactId>struts2-core</artifactId> <version>2.3.16</version> <exclusions> <exclusion> <groupId>javassist</groupId> <artifactId>javassist</artifactId> </exclusion> </exclusions> </...
2011-1-8 20:34:20 org.apache.catalina.core.StandardWrapperValve invoke 严重: Servlet.service() for servlet default threw exception java.lang.IllegalStateException at org.apache.catalina.connector....
通过以上分析和解决方案,我们可以有效地解决在Struts框架开发过程中遇到的`Servlet.service() for servlet jsp threw exception`这一异常问题。希望这些解决方案能够帮助开发者们提高开发效率,减少不必要的麻烦。
- **异常详情**:`javax.servlet.ServletException: Servlet execution threw an exception` - **根本原因**:`java.lang.Error: Unresolved compilation problem: The method setAttribute(String, Object) in the ...
17. throw -> threw 18. catch -> caught 19. fall -> fell 20. do -> did 21. buy -> bought 22. see -> saw 23. shop -> shopped 24. begins -> begins 25. e -> e (不变,可能是拼写错误) 26. take -> took 27. ...
错误八:javax.servlet.ServletException: Servlet.init() for servlet [Springmvc] threw exception 错误原因:web.xml 配置的 servlet 与实体文件不符 解决方式:检查 web.xml 配置是否正确,并确保 servlet 与...
#### 八、Servlet.init() for servlet action threw exception 此异常通常是在 Struts 初始化过程中抛出的,可能是由于配置错误或其他初始化时的问题导致。 **解决方案:** 1. **检查 struts-config.xml 文件**:...
在使用Emgu.CV库进行计算机视觉开发的过程中,可能会遇到标题中提到的问题——“Emgu.CV.CvInvoke”的类型初始值设定项引发异常。这通常是因为缺少必要的依赖库或者配置不正确导致的。Emgu.CV是C#的一个OpenCV封装库...
* Servlet.service() for servlet jsp threw exception java.lang.Error: Unresolved compilation problem: + 解决方案:检查 Servlet 的配置文件是否正确,是否存在语法错误或格式不正确的问题。 * java.lang....
【SLOVED】Atmel.VsIde.AvrStudio.Utils.MemoryPressureReliever exception-附件资源
ServletListenerRegistrationBean<SecondListener> srb = new ServletListenerRegistrationBean<>(new SecondListener()); return srb; } } ``` 这种方式中,我们通过`@Bean`注解告诉Spring这个方法的返回值是...
Servlet.init() for servlet action threw exception **问题描述:** 在初始化 ActionServlet 时抛出异常,通常是因为配置文件存在问题。 **解决方法:** - 检查 `struts-config.xml` 文件是否正确配置。 - 确认...
严重: Servlet.service() for servlet action threw exception java.lang.IllegalArgumentException: argument type mismatch ``` **异常说明**:此异常表明参数类型不匹配。 **成因分析**:Struts框架中的`...