这几天突然遇到了一个问题:Tomcat跑不起来了!提示错误信息:
Error Listener Start
org.springframework.web.context.ContextLoaderListener
Error Listener Start
....
就这么2行,让人一头雾水。昨天检查了一个下午也没发现问题。今天突然在查看错误日志时发现:
Context initialization failed
org.springframework.beans.factory.BeanDefinitionStoreException: Line 14 in XML document from ServletContext resource [/WEB-INF/springctx-datareport.xml] is invalid; nested exception is org.xml.sax.SAXParseException: Element type "bean" must be followed by either attribute specifications, ">" or "/>".
仔细查看了一下配置文件,原来是同组的组员在写配置文件的时候在class="...."后面多了一个引号!
这个Listener Start的问题太隐蔽,如果没有做错误日志估计一直很难发现了
不过这次有了教训,以后也有方向了
分享到:
相关推荐
Spring的监听器ContextLoaderListener的作用
web.xml中ContextLoaderListener的运行
java解决org.springframework.web.context.ContextLoaderListener
ssh整合时 被虐的经验之谈。内容虽然比较少,也是前人的工作经验。
NULL 博文链接:https://angie.iteye.com/blog/2334955
一、Web项目中使用Spring ...在 Web 项目中使用 Spring 框架,首先要解决在 web 层(这里指 Servlet)中获取到 Spring容器的问题。只要在 web 层获取到了 Spring 容器,便可从容器中获取到 Service 对象
在web应用启动读取web.xml时,发现配置了ContextLoaderListener,而ContextLoaderListener实现了ServletCo
Web服务器实例化ApplicationContext容器时,通常会使用ContextLoaderListener来实现,此种方式只需要在web.xml中添加如下代码: <context-param> <param-name>contextConfigLocation</param-name> <param-value> ...
proxool.0.9.1基础上做了修改。 改jar名称为:proxool-0.9.1.1,主要修改为以下3点: ... <listener-class>org.springframework.web.context.ContextLoaderListener 4.修正了proxool在多线程环境下的的错误。
下载的伙伴反应有些问题,解决方法如下: 1:找不到数据库。数据库文件在WebRoot下,叫hrmsys.sql。 2:验证码无法显示。UserAction中屏蔽47至50行代码。 3:项目无法运行。在web.xml的display-name标签与...
Spring framework 5.1.5源码 Main: spring-web/org.springframework.web.context.ContextLoaderListener
org.springframework.web.context.ContextLoaderListener <listener> <listener-class>org.springframework.web.context.request.RequestContextListener</listener-class> </listener>
SSH笔记-分别使用通过配置listener类和调用HttpServlet类和通过配置ContextLoaderListener,实现web中使用Spring
<listener-class>org.springframework.web.context.ContextLoaderListener <servlet-name>test <servlet-class>org.springframework.web.servlet.DispatcherServlet <load-on-startup>1 <servlet-name>...
java.lang.ClassNotFoundException: org.springframework.web.context.ContextLoaderListener 解决方法: 项目 —> 属性 -> Deployment Assembly -> Add -> Java Build Path Entries -> 选择Maven Dependencies -> ...
只需基本的spring包即可 注:要是项目报错 java.lang.ClassNotFoundException: org.springframework.web.context.ContextLoaderListener 缺少jar包,这个jar包在以上压缩包中就有
发生的情况是 Jersey 的SringWebInitializer注册了它自己的ContextLoaderListener并且我们尝试从我们的WebApplicationInitializer加载另一个的尝试导致抛出异常。 这让我很头疼。 然后我发现了这个,它有一些变通...
<listener-class>org.springframework.web.context.ContextLoaderListener <!-- Listener log4jConfigLocation --> <listener-class>org.springframework.web.util.Log4jConfigListener </listener>
<listener-class>org.springframework.web.context.ContextLoaderListener </listener> <param-name>contextConfigLocation <param-value>classpath:applicationContext.xml </context-param>
<listener-class>org.springframework.web.context.ContextLoaderListener </listener> <param-name>contextConfigLocation <param-value>classpath:applicationContext.xml </context-param>