weixin_43827435
weixin_43827435
采纳率33.3%
2018-12-21 17:17 阅读 1.8k

Invalid 'log4jConfigLocation' parameter

启动服务器报错
严重: Exception sending context initialized event to listener instance of class [org.springframework.web.util.Log4jConfigListener]
java.lang.IllegalArgumentException: Invalid 'log4jConfigLocation' parameter: class path resource [log4j.properties] cannot be resolved to URL because it does not exist
at org.springframework.web.util.Log4jWebConfigurer.initLogging(Log4jWebConfigurer.java:157)
at org.springframework.web.util.Log4jConfigListener.contextInitialized(Log4jConfigListener.java:46)
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4792)
at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5256)
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1421)
at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1411)
at java.util.concurrent.FutureTask.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)

jre引进来了,web-xml中也配置了图片说明

log4j.properties在src下。
请教大神这是什么原因呀
  • 点赞
  • 写回答
  • 关注问题
  • 收藏
  • 复制链接分享

1条回答 默认 最新

  • qq_16127313 爱码少年 2018-12-21 11:23

    查看编译的classes目录下是否有此文件,没有的话,再看看为啥没有

    点赞 评论 复制链接分享

相关推荐