解决老项目jecgg项目启动时报无法初始化velocity

报错内容:

org.apache.catalina.core.StandardContext listenerStart
严重: 异常将上下文初始化事件发送到类的侦听器实例.[org.jeecgframework.web.system.listener.OnlineListener]
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.jeecgframework.p3.core.util.plugin.ViewVelocity#0' defined in class path resource [config/spring-config-p3.xml]: Invocation of init method failed; nested exception is java.lang.Exception: 启动Velocity失败
		... 30 more
Caused by: java.io.FileNotFoundException: velocity.log (拒绝访问。)

解决方案:
在项目中的velocity.properties配置文件修改一段配置
以前项目中配置为

runtime.log.logsystem.class = org.apache.velocity.runtime.log.Log4JLogChute

修改为

#runtime.log.logsystem.class = org.apache.velocity.runtime.log.Log4JLogChute
runtime.log.logsystem.class=org.apache.velocity.runtime.log.SimpleLog4JLogSystem
runtime.log.logsystem.log4j.category=velocity
runtime.log.logsystem.log4j.logger=velocity

重新启动tomcat报错就没了,项目正常启动

你可能感兴趣的:(tomcat,java)