End event threw exception

 

 SEVERE: End event threw exception
java.lang.reflect.InvocationTargetException

 

这个异常是由于xml配置文件解析错误引起的。

以最近在用ServletContext获取上下文信息时遇到的错误为例:

在web.xml中配置驱动信息:

 

1 <context-param>
2         <param-name>driver</param-name>
3         <param-value>com.microsoft.sqlserver.jdbc.SQLServerDriver</param-value>
4     </context-param>
5     <context-param>
6         <param-name>driver</param-name>
7         <param-value>jdbc:sqlserver://localhost:1433;DataBaseName=javawebDb</param-value>
8     </context-param>

 

 

 

控制台错误截图:

Servlet中 End event threw exception,错误404  的解决方法

 

 

浏览器错误截图:

Servlet中 End event threw exception,错误404  的解决方法 

其实原因很简单,就是红色部分,参数名配置重复了,修改如下:

1 <param-name>url</param-name>

 

解决!

相关文章:

  • 2022-12-23
  • 2021-06-13
  • 2021-05-06
  • 2022-01-11
  • 2021-07-29
  • 2021-12-05
猜你喜欢
  • 2021-05-21
  • 2021-07-30
  • 2021-12-27
  • 2022-12-23
  • 2022-12-23
  • 2021-10-23
  • 2021-12-05
相关资源
相似解决方案