Java 部署war文件时无法实例化VelocityEngine
我正在使用war文件在Tomcat6上部署一个应用程序。我在同一台机器上编译了供应商提供的源代码,然后将war文件移动到{tomcat home}/webapps/ 启动应用程序时,我看到一条错误消息:Java 部署war文件时无法实例化VelocityEngine,java,tomcat,tomcat6,velocity,java-war,Java,Tomcat,Tomcat6,Velocity,Java War,我正在使用war文件在Tomcat6上部署一个应用程序。我在同一台机器上编译了供应商提供的源代码,然后将war文件移动到{tomcat home}/webapps/ 启动应用程序时,我看到一条错误消息: The SystemInformationService could not be retrieved from the container. Therefore very limited information is available in this error report. The S
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是什么,或者是做什么的。这可能是因为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
(请参阅原始帖子)我发现,当我将server.xml改为包含unpackWARs=“true”时,它现在可以正常工作了。奇怪的是,我将它作为未爆炸的WAR文件部署在Jboss上,并且工作正常。我需要在Tomcat中打开战争的包装,才能让它工作。