部署 war 文件时无法实例化 VelocityEngine

发布于 2024-08-30 09:48:36 字数 1158 浏览 8 评论 0原文

我正在 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

独﹏钓一江月 2024-09-06 09:48:36

这可能是因为 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

(参见此处查看原始帖子)

It could be because of Velocity's logging trying to log to a read-only folder, or even to the jar file.

* 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

(see here for original post)

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文