- 浏览: 699909 次
- 性别:
- 来自: 北京
文章分类
- 全部博客 (362)
- java基础 (33)
- html/css+div/javascript (17)
- Ajax/XML/JSON/XSL (7)
- JQuery (11)
- Extjs (1)
- JSP/Servlet (19)
- MVC模式 (4)
- struts 1 (17)
- Struts 2.3.4 (17)
- Spring 3.2 (26)
- Springmvc (3)
- Hibernate 4.1 (21)
- ibatis (6)
- Velocity模板语言 (2)
- Rose框架 (5)
- EJB (1)
- JUnit测试 (2)
- 数据库DB (24)
- 重构 / 设计模式 (3)
- 开发工具IDE (37)
- 数据结构与算法设计 (3)
- Android (12)
- Linux (4)
- bug集合 (29)
- 缓存技术(redis) (3)
- Lucene全文索引 (15)
- maven3.0.5 (4)
- 小工具集合 (18)
- 面试题 (5)
- 闲聊 (11)
- 其他 (4)
- 接口API (2)
- work (2)
- Flex (0)
- JMS (1)
- 开源项目集合 (1)
- 技术博客 (1)
- 分类04 (0)
- 分类05555 (0)
最新评论
-
小小小羊:
好屌...
java.lang.NoClassDefFoundError: org/aspectj/weaver/reflect/ReflectionWorld$Refle -
liubinli2005:
这个可以脱底spring。单独使用吗?
DAO层:jade -
cangbaotu:
我觉得对于开发者来说,能脚本化编写爬虫是一件挺开心的事情( ̄▽ ...
网页爬取 -
asjava:
很好的文章, 但每段代码清单都重复了一次.
spring 事务 -
xia635317478:
jethypc 写道验证码的session无法传过去啊 还是我 ...
登陆验证码(struts2实现)
引用
log4j:WARN No appenders could be found for logger (org.springframework.web.context.ContextLoader).
log4j:WARN Please initialize the log4j system properly.
log4j:WARN Please initialize the log4j system properly.
搭建spring web项目,使用log4j,在启动tomcat的时候容易出现WARN No appenders could be found for logger警告。
原因是:应该是读入web应用程序的log4j.properties文件之前就报出来了。是在加载org.springframework.web.context.ContextLoader这个listener的时候没找到log4j的配置文件造成的
解决方法:
在web.xml文件中,添加listener “org.springframework.web.util.Log4jConfigListener”,添加要在org.springframework.web.context.ContextLoaderListener 之前。
具体代码:
<!-- 以下3项参数与log4j的配置相关 --> <context-param> <param-name>log4jConfigLocation</param-name> <param-value>/WEB-INF/log4j.properties</param-value> </context-param> <context-param> <param-name>log4jRefreshInterval</param-name> <param-value>60000</param-value> </context-param> <listener> <listener-class> org.springframework.web.util.Log4jConfigListener </listener-class> </listener> <!-- end --> <listener> <listener-class> org.springframework.web.context.ContextLoaderListener </listener-class> </listener>
其中log4jRefreshInterval为60000表示 开一条watchdog线程每60秒扫描一下配置文件的变化 。
发表评论
-
Tomcat:IOException while loading persisted sessions: java.io.EOFException
2013-11-14 17:39 869Tomcat:IOException while loadin ... -
'sessionFactory' or 'hibernateTemplate' is required
2013-08-18 21:35 818'sessionFactory' or 'hibernateT ... -
column: id (should be mapped with insert="false" update="false")
2013-08-18 16:59 2037Spring集成Hibernate:column: id (s ... -
Unsupported major.minor version 51.0
2013-08-17 10:01 1045Unsupported major.minor version ... -
SVN无法提交-RA layer request failed
2013-08-05 09:12 1258SVN无法提交-RA layer request failed ... -
类是ThreadPoolExecutor:时不时的就会在workerDone(this);
2013-07-05 00:17 2650类是ThreadPoolExecutor:时不时的就会在wo ... -
Server Tomcat v6.0 Server at localhost was unable to start within 45 seconds
2013-03-21 15:34 1974一、bug:Server Tomcat v6.0 Server ... -
java.lang.UnsupportedClassVersionError: Bad version number in .class file
2013-03-19 10:33 950bug: java.lang.UnsupportedClas ... -
找不到包:javax.servlet.annotation.WebServlet
2013-03-18 16:54 14826找不到包:javax.servlet.annotation.W ... -
异常:Unable to instantiate default tuplizer [org.hibernate.tuple.entity.PojoEntit
2013-03-08 23:47 3393异常:Unable to instantiate defau ... -
java.sql.SQLException: Can't call commit when autocommit=true
2013-01-29 11:00 5673当我在数据库更新, ... -
java.security.NoSuchAlgorithmException: AES KeyGenerator not available
2013-01-28 10:23 12142java.security.NoSuchAlgorithmEx ... -
java.util.MissingResourceException: Can't find bundle for base name systemConfig
2013-01-28 10:19 23555bug:java.util.MissingResourceEx ... -
Cannot find message resources under key org.apache.struts.action.MESSAGE
2013-01-15 14:53 1062异常1: Cannot find message resour ... -
org.springframework.dao.InvalidDataAccessApiUsageException: OracleLobCreator
2013-01-11 15:35 1760org.springframework.dao.Invalid ... -
org.springframework.orm.hibernate3.HibernateSystemException: Unknown entity
2013-01-11 15:10 8319引用org.springframework.orm.hiber ... -
Configuration problem: Unable to locate Spring NamespaceHandler for XML schema n
2013-01-10 11:06 2712Configuration problem: Unable t ... -
java.lang.NoClassDefFoundError: org/aspectj/weaver/reflect/ReflectionWorld$Refle
2013-01-10 10:57 10313java.lang.NoClassDefFoundError ... -
java.lang.NoClassDefFoundError: org/aopalliance/intercept/MethodInterceptor
2013-01-10 10:53 1012java.lang.NoClassDefFoundError: ... -
java.lang.NoClassDefFoundError: org/aopalliance/aop/Advice
2013-01-10 10:50 998整合SSH的时报错误: java.lang.NoClassDe ...
相关推荐
NULL 博文链接:https://wait7758521.iteye.com/blog/1933964
如果eclipse打印不出日志,在控制台上只显示 1.log4j:WARNNoappenderscouldbefoundforlogger(org.apache.hadoop.util.Shell). 2.log4j:WARNPleaseinitializethelog4jsystemproperly. ...就本文件拷贝到src目录下即可。
log4j:WARN No appenders could be found for logger org apache commons beanutils ConvertUtils 出现这个错误 在web inf classes路径下加了log4j properties文件还是这个错误log4j:WARN Please initialize the ...
首先,错误信息"log4j:WARN No appenders could be found for logger"表明Log4j找不到任何日志输出的目标,也就是没有设置日志appender。日志appender是Log4j用来定义日志输出目的地的组件,比如控制台、文件、邮件...
log4j:WARN No appenders could be found for logger (com.mchange.v2.log.MLog). log4j:WARN Please initialize the log4j system properly.
报错WARN No appenders could be found for logger 或 WARN Please initialize the log4j system properly时需要引入的包。用法可以参考https://blog.csdn.net/u010912188/article/details/79761894
为解决这个问题,log4j引入了ASYNC Appender,它通过异步处理日志事件,将日志写入操作放到单独的线程中执行,从而避免阻塞主线程,提高应用程序的响应速度。 ASYNC Appender的核心在于它使用了`java.util....
模式爬虫配置单元 不幸的是,到目前为止, 似乎是不切实际的。 从hive-1.1.0(CDH5.4)开始,...log4j:WARN No appenders could be found for logger (org.apache.hive.jdbc.Utils). log4j:WARN Please initialize the
clj-hbase 这是一个用于 hbase 0.98.3 的小型且仍然不完整的 clojure 包装器 用法 假设我们有一个带有列族“byte-data...log4j:WARN No appenders could be found for logger ( org.apache.hadoop.metrics2.lib.Mutabl
玩具应用程序可证明参加动物园管理员领导者选举食谱的多个客户可以随时认为自己是领导者。 建造 建立: $ ../gradlew jar 这将在build / libs中创建...log4j:WARN No appenders could be found for logger (org
log4j:WARN No appenders could be found for logger (org.apache.hadoop.metrics2.lib.MutableMetricsFactory). log4j:WARN Please initialize the log4j system properly. log4j:WARN See ...
当出现"log4j:WARN No appenders could be found for logger (org.springframework.web.context.ContextLoader)"这样的警告时,这意味着log4j没有找到任何日志输出目标。这通常是因为日志配置文件未被正确加载。解决...
log4j:WARN No appenders could be found for logger (org.springframework.web.context.ContextLoader). log4j:WARN Please initialize the log4j system properly. 2009-8-29 14:02:12 org.apache.catalina.core....
log4j:WARN No appenders could be found for logger (org.apache.mons.digester.Digester). log4j:WARN Please initialize the log4j system properly. 2009-11-06 21:39:17 org.apache.catalina.core....
例如,在Spring框架的应用中,如果没有正确配置log4j,就可能出现“log4j:WARN No appenders could be found for logger (org.springframework.context.support.ClassPathXmlApplicationContext)”这类警告信息。...