0
点赞
收藏
分享

微信扫一扫

报错:StandardContext.listenerStart Error configuring application listener of...

一枚路过的程序猿 2022-01-26 阅读 45


​intellij​​​报错:​​StandardContext.listenerStart Error configuring application listener of...​

1.报错信息

StandardContext.listenerStart Error configuring application listener of...

2.解决方法

  • 检查​​WEB-INF​​​下面的文件是不是有报错,主要是​​log4j.xml​​​文件,其次是​​web.xml​​文件;如果里面有报错的消息,全部删掉,如下:
<?xml version="1.0" encoding="UTF-8"?>
···

<!--
- This is the Cocoon web-app configurations file
-
- $Id$
-->
<web-app version="2.4"
xmlns="http://java.sun.com/xml/ns/j2ee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">


<!-- Servlet Context Listener ======================================= -->

<!--
- Declare Spring context listener which sets up the Spring Application Context
- containing all Cocoon components (and user defined beans as well).
-->
<listener>
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
</listener>

···

<!--
- Cocoon handles all the URL space assigned to the webapp using its sitemap.
- It is recommended to leave it unchanged. Under some circumstances though
- (like integration with proprietary webapps or servlets) you might have
- to change this parameter.
-->
<servlet-mapping>
<servlet-name>DispatcherServlet</servlet-name>
<url-pattern>/*</url-pattern>
</servlet-mapping>

</web-app>

其中报错的信息有:

报错:StandardContext.listenerStart Error configuring application listener of..._java全部删除,得到如下:

<?xml version="1.0" encoding="UTF-8"?>

<web-app version="2.4"
xmlns="http://java.sun.com/xml/ns/j2ee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">

</web-app>

同样处理​​log4j.xml​​文件,即可运行。



举报

相关推荐

0 条评论