title: Why can't Eclipse resolve the spring-dwr schema?
body: <p>Eclipse is showing the following errors in my Spring's <em>applicationContext.xml</em>:</p>
  
  <pre><code>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
  </code></pre>
  
  <p>When I hover my mouse over the line-item error, it also says:</p>
  
  <pre><code>    - 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 &lt;xsd:schema&gt;.
  </code></pre>
  
  <p>I confirmed that the root element is in fact <em>&lt;xsd:schema></em>. When I use autocomplete by typing <em>&lt;dwr:</em> Eclipse correctly shows me the various options like <em>&lt;dwr:configuration></em>, <em>&lt;dwr:controller></em>, etc. How can Eclipse know this without reading the schema?</p>
  
  <p>I make use of many different namespaces without issue; the DWR schema is the only one that isn't being resolved. Here is the declaration:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;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"&gt;
  </code></pre>
  
  <p>I have the latest DWR 3.0.0.116.rc1 in my classpath. If I crack open the DWR jar, I find <em>META-INF/spring.handlers</em> containing:</p>
  
  <pre><code>http\://www.directwebremoting.org/schema/spring-dwr=org.directwebremoting.spring.DwrAnnotationNamespaceHandler
  </code></pre>
  
  <p>and <em>META-INF/spring.schemas</em> containing:</p>
  
  <pre><code>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
  </code></pre>
  
  <p>The escaping of the colon threw me off a bit, but I assume it's all correct, otherwise everyone's DWR would be broken.</p>
  
  <p>Before I was grabbing this particular schema in real time from the DWR website, but I got bit by this when my production system crashed because the DWR site was down.</p>