我正在使用war文件在Tomcat 6上部署應用程序。我已經編制由同一臺機器上的供應商提供的源代碼,然後移動war文件到tomcat的{家庭}/webapps /下在部署war文件時無法實例化VelocityEngine
當我啓動應用程序,我看到一個錯誤信息:
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是什麼,或者不知道。
我發現,當我改變server.xml中含有unpackWARs =「真」,現在它工作正常 – 2010-04-22 21:30:19