关注JEECG发展历程 关注最新动态和版本, 记录JEECG成长点滴 更新日志 - 技术支持 - 招聘英才

JEECG最新版本下载 JEECG智能开发平台 - 显著提高开发效率 常见问题 - 入门视频 - 参与开源团队

商务QQ: 69893005、418799587 商务热线(5*8小时): 010-64808099 官方邮箱: jeecgos@163.com

查看: 18647|回复: 5

[环境搭建] 启动报启动Velocity失败如何解决

[复制链接]
发表于 2017-3-6 16:19:17 | 显示全部楼层 |阅读模式
[org.springframework.web.context.support.XmlWebApplicationContext]Exception encountered during context initialization - cancelling refresh attempt
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失败
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1554)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:539)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:475)
        at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:302)
        at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:229)
        at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:298)
        at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:193)
        at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:706)
        at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:762)
        at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:482)
        at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:403)
        at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:306)
        at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:106)
        at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4717)
        at org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5179)
        at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183)
        at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1419)
        at org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1409)
        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)
Caused by: java.lang.Exception: 启动Velocity失败
        at org.jeecgframework.p3.core.util.plugin.ViewVelocity.afterPropertiesSet(ViewVelocity.java:81)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1613)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1550)
        ... 21 more
Caused by: org.apache.velocity.exception.VelocityException: Failed to initialize an instance of org.apache.velocity.runtime.log.Log4JLogChute with the current runtime configuration.
        at org.apache.velocity.runtime.log.LogManager.createLogChute(LogManager.java:206)
        at org.apache.velocity.runtime.log.LogManager.updateLog(LogManager.java:255)
        at org.apache.velocity.runtime.RuntimeInstance.initializeLog(RuntimeInstance.java:795)
        at org.apache.velocity.runtime.RuntimeInstance.init(RuntimeInstance.java:250)
        at org.apache.velocity.runtime.RuntimeInstance.init(RuntimeInstance.java:589)
        at org.apache.velocity.runtime.RuntimeSingleton.init(RuntimeSingleton.java:229)
        at org.apache.velocity.app.Velocity.init(Velocity.java:107)
        at org.jeecgframework.p3.core.util.plugin.ViewVelocity.afterPropertiesSet(ViewVelocity.java:71)
        ... 23 more


jeecg报错.rar

4.88 KB, 下载次数: 10

发表于 2017-7-14 09:57:29 | 显示全部楼层
同问,哪位大神能出来解决一下!
发表于 2017-7-14 12:43:41 | 显示全部楼层
删除本地仓库,重新下载
发表于 2017-10-9 10:56:17 | 显示全部楼层
admin 发表于 2017-7-14 12:43
删除本地仓库,重新下载

jeecg-p3-core-1.1.1.jar删除重新下载么?还是不可以 我这也报这个错误 麻烦详细解释下 谢谢
发表于 2017-10-9 16:34:07 | 显示全部楼层
clean下项目,看看常见问题贴
发表于 2017-10-12 13:46:20 | 显示全部楼层
自问自答吧,能帮助遇到同样问题的人最好了。。。
是velocity初始化引擎的问题,修改下配置就可以了
修改velocity.property  
注释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

runtime.log = velocity.log

启动成功
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

快速回复 返回顶部 返回列表