log4j:ERROR Could not read configuration file from URL [file:/C:/WebProj/apache-tomcat-7.0.73/webapps/J_QNZ_MERCHANT_PC/WEB-INF/classes/log4j.properties].
java.io.FileNotFoundException: C:\WebProj\apache-tomcat-7.0.73\webapps\J_QNZ_MERCHANT_PC\WEB-INF\classes\log4j.properties (系统找不到指定的文件。)
出现以上的问题,就是\WEB-INF\classes\log4j.properties找不到文件,追溯到配置文件的配置,可以设置为如下:
<!-- ServletContext初始化参数 -->
<context-param>
<param-name>log4jConfigLocation</param-name>
<param-value>classpath:log4j.properties</param-value>
</context-param>
最后,clean,publish,start就ok