2010-04-22 18 views
5

पर तैनाती करते समय VelocityEngine को तुरंत चालू करने में असमर्थ, मैं युद्ध फ़ाइल का उपयोग करके टॉमकैट 6 पर एक एप्लिकेशन तैनात कर रहा हूं। मैं एक ही मशीन पर विक्रेता द्वारा दिए गए स्रोत कोड संकलित किया है, तो बेहतर है {बिल्ला-घर} युद्ध फ़ाइल ले जाया गया/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) 

मैंने एक और मशीन पर एक ही कदम का पालन किया और यह सही ढंग से स्थापित किया गया।

मुझे समझ में नहीं आता कि त्रुटि मुझे क्या बता रही है।

क्या मुझे जार फाइलें याद आ रही हैं? (लेकिन यह ठीक संकलित)।

क्या मैं पर्यावरण चर सेट करना भूल गया हूं?

मुझे यकीन नहीं है कि इसका क्या बनाना है, मुझे नहीं पता कि VelocityEngine क्या है या करता है।

+0

मुझे लगता है कि जब मैं unpackWARs = "true" को रोकने के लिए server.xml बदल पाया, अब यह ठीक से काम करता –

उत्तर

3

यह वेग-केवल लॉग-इन फ़ोल्डर या यहां तक ​​कि जार फ़ाइल पर लॉग इन करने का प्रयास करने की वजह से हो सकता है।

* 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 देखें)

+0

अजीब बात मैं एक unexploded के रूप में इस तैनात किया गया है Jboss पर WAR फ़ाइल और यह सही ढंग से काम किया। काम करने के लिए मुझे टोमकैट में युद्ध को अनपैक करने की आवश्यकता थी। –

संबंधित मुद्दे