部署 war 文件时无法实例化 VelocityEngine
我正在 Tomcat 6 上使用 war 文件部署应用程序。我在同一台机器上编译了供应商提供的源代码,然后将 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 是什么,或者做什么。
I am deploying an application on Tomcat 6, using a war file. I've compiled the source code given by the vendor on the same machine, then moved the war file to {tomcat-home}/webapps/
When I start up the application, I see a error message:
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)
I followed the same steps on another machine and it installed correctly.
I don't understand what the error is telling me.
Could I be missing jar files? ( but it compiled fine ).
Have I forgotten to set environment variables?
I'm not sure what to make of this, I don't know what the VelocityEngine is, or does.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
这可能是因为 Velocity 的日志记录尝试记录到只读文件夹,甚至是 jar 文件。
(参见此处查看原始帖子)
It could be because of Velocity's logging trying to log to a read-only folder, or even to the jar file.
(see here for original post)