我正在使用war文件在Tomcat 6上部署应用程序。我在同一台机器上编译了供应商提供的源代码,然后将war文件移到{tomcat-home} / webapps /
当我启动应用程序时,我看到一条错误消息:
The SystemInformationService could not be retrieved from the container. Therefore very limited information is available in this error report.
The SystemInformationService could not be retrieved due to the following error: java.lang.IllegalStateException: Spring Application context has not been set
Cause
java.lang.RuntimeException: Unable to instantiate VelocityEngine!
at com.opensymphony.webwork.views.velocity.VelocityManager.newVelocityEngine(VelocityManager.java:333)
Stack Trace:[hide]
java.lang.RuntimeException: Unable to instantiate VelocityEngine!
at com.opensymphony.webwork.views.velocity.VelocityManager.newVelocityEngine(VelocityManager.java:333)
at com.opensymphony.webwork.views.velocity.VelocityManager.init(VelocityManager.java:146)
at com.opensymphony.webwork.dispatcher.VelocityResult.doExecute(VelocityResult.java:61)
我在另一台机器上执行了相同的步骤并正确安装。
我不明白错误告诉我的是什么。
我可以丢失jar文件吗? (但编译得很好)。
我忘了设置环境变量吗?
我不知道该怎么做,我不知道VelocityEngine是什么,或者是什么。
答案 0 :(得分:3)
可能是因为Velocity的日志记录尝试登录到只读文件夹,甚至是jar文件。
* create a file "velocity.properties" and place it in the WEB-INF/classes folder.
* Inside the file, write
runtime.log.logsystem.class=org.apache.velocity.runtime.log.NullLogSystem
(原始帖子见here)