2009-05-23 12 views
12

ग्रहण मेरी स्प्रिंग के applicationContext.xml में निम्न त्रुटियों को दिखा रहा है:वसंत-डीआईआर स्कीमा को ग्रहण क्यों नहीं कर सकता?

cvc-complex-type.2.4.c: The matching wildcard is strict, but no declaration can be found for element 'dwr:configuration'. myappservlet-servlet.xml MyApp/src/main/webapp/WEB-INF line 23 XML Problem 
cvc-complex-type.2.4.c: The matching wildcard is strict, but no declaration can be found for element 'dwr:controller'. myappservlet-servlet.xml MyApp/src/main/webapp/WEB-INF line 21 XML Problem 
cvc-complex-type.2.4.c: The matching wildcard is strict, but no declaration can be found for element 'dwr:remote'. myappservlet-servlet.xml MyApp/src/main/webapp/WEB-INF line 41 XML Problem 

जब मैं लाइन-आइटम त्रुटि पर मेरे माउस होवर करें, यह भी कहते हैं:

- schema_reference.4: Failed to read schema document 'http://www.directwebremoting.org/ 
schema/spring-dwr-3.0.xsd', because 1) could not find the document; 2) the document could not be 
read; 3) the root element of the document is not <xsd:schema>. 

मुझे लगता है कि इस बात की पुष्टि मूल तत्व वास्तव में < xsd: स्कीमा> है। जब मैं टाइप करके स्वत: पूर्ण का उपयोग < डीडब्ल्यूआर: विन्यास>, < डीडब्ल्यूआर: ग्रहण सही ढंग से मुझे < डीडब्ल्यूआर जैसे विभिन्न विकल्पों से पता चलता नियंत्रक>, आदि यह कैसे पता ग्रहण कर सकते हैं स्कीमा पढ़ने के बिना?

मैं बिना किसी मुद्दे के कई अलग-अलग नामस्थानों का उपयोग करता हूं; डीडब्लूआर स्कीमा एकमात्र ऐसा है जिसे हल नहीं किया जा रहा है।

<?xml version="1.0" encoding="utf-8"?> 
<beans xmlns="http://www.springframework.org/schema/beans" 
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
    xmlns:aop="http://www.springframework.org/schema/aop" 
    xmlns:context="http://www.springframework.org/schema/context" 
    xmlns:dwr="http://www.directwebremoting.org/schema/spring-dwr" 
    xsi:schemaLocation="http://www.springframework.org/schema/beans 
       http://www.springframework.org/schema/beans/spring-beans-2.5.xsd 
       http://www.springframework.org/schema/aop 
       http://www.springframework.org/schema/aop/spring-aop-2.5.xsd 
       http://www.springframework.org/schema/context 
       http://www.springframework.org/schema/context/spring-context-2.5.xsd 
       http://www.directwebremoting.org/schema/spring-dwr 
       http://www.directwebremoting.org/schema/spring-dwr-3.0.xsd" 
    default-autowire="byName"> 

मैं अपने classpath में नवीनतम डीडब्ल्यूआर 3.0.0.116.rc1 है: यहाँ घोषणा है। अगर मैं डीडब्ल्यूआर जार खोलने दरार, मैं META-INF/spring.handlers लगता है युक्त

http\://www.directwebremoting.org/schema/spring-dwr=org.directwebremoting.spring.DwrAnnotationNamespaceHandler 

और META-INF/spring.schemas युक्त

http\://www.directwebremoting.org/schema/spring-dwr-2.0.xsd=org/directwebremoting/spring/spring-dwr-2.0.xsd 
http\://www.directwebremoting.org/schema/spring-dwr-3.0.xsd=org/directwebremoting/spring/spring-dwr-3.0.xsd 

की एस्केपिंग कोलन ने मुझे थोड़ा सा फेंक दिया, लेकिन मुझे लगता है कि यह सब सही है, अन्यथा हर किसी का डीडब्लूआर टूट जाएगा।

इससे पहले कि मैं डीडब्लूआर वेबसाइट से वास्तविक समय में इस विशेष स्कीमा को पकड़ रहा था, लेकिन जब मेरा उत्पादन सिस्टम दुर्घटनाग्रस्त हो गया तो मुझे थोड़ा सा पता चला क्योंकि डीडब्लूआर साइट डाउन थी।

उत्तर

11

आप ग्रहण में उपयोगकर्ता निर्दिष्ट कैटलॉग योगदान जोड़ने का प्रयास कर सकते हैं। के तहत विंडो-> प्राथमिकताएं-> एक्सएमएल-> एक्सएमएल कैटलॉगउपयोगकर्ता निर्दिष्ट प्रविष्टियां और फिर बटन जोड़ें।

फिर आप स्कीमा के लिए विवरण जोड़ सकते हैं (आप गिराए गए कनेक्शन के मामले में स्थानीय रूप से फ़ाइल की प्रतिलिपि बना सकते हैं)। ग्रहण के बाद सत्यापन के दौरान स्कीमा तक पहुंच होगी।

+1

क्या यह करने का कोई तरीका है जब .xsd .jar फ़ाइल के अंदर है? क्या '/ META-INF/spring.schemas' में कॉन्फ़िगरेशन पहले से ही इसका ख्याल रखेगा? – Stewart

2

मुझे यकीन नहीं है कि आपका प्रश्न यहां क्या है। आप पिछले पैराग्राफ में स्वयं का जवाब देते हैं - डीडब्लूआर साइट नीचे जाती है, ग्रहण में स्कीमा सत्यापन विफल रहता है। ध्यान दें कि ग्रहण (वसंत आईडीई प्लगइन के साथ भी) नामस्थान को हल करने के लिए मेटा-आईएनएफ/spring.schemas का उपयोग नहीं करता है, जो ग्रहण प्लेटफॉर्म द्वारा किया जाता है। यदि स्कीमा स्कीमा स्थान पर नहीं मिल पाती है, तो आपको ये त्रुटियां मिलती हैं।

ऑटो-पूर्ण होने के लिए, ग्रहण अभी भी आपके दस्तावेज़ में मौजूदा संरचनाओं का उल्लंघन करके प्रदान करेगा, अगर इसे स्कीमा नहीं मिल रहा है।

यह एप्लिकेशन में कोई समस्या नहीं है, क्योंकि वसंत JAR से स्कीमा को हल करने के लिए मेटा-आईएनएफ/spring.schemas फ़ाइल का उपयोग करेगा।

2

एक्लिप्स ऑफ़लाइन का उपयोग करते समय यह एक आम समस्या है। यह नेट से स्कीमा को पकड़ने की कोशिश कर रहा है।जब यह नहीं मिल पाता है, तो यह एक सत्यापन त्रुटि इंगित करता है।

मैं इन त्रुटियों को अनदेखा करता हूं। जब आप ऑनलाइन वापस आते हैं, तो परियोजना को साफ करें और वे चले जाएं।

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