Eclipse está mostrando los siguientes errores en applicationContext.xml de mi primavera:¿Por qué Eclipse no puede resolver el esquema de spring-dwr?
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
Cuando se ciernen mi ratón sobre el error de partidas individuales, también dice:
- 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>.
confirmé que el elemento raíz es, de hecho, < xsd: esquema>. Cuando uso autocompletar escribiendo < DWR: Eclipse me muestra correctamente las diversas opciones como < DWR: Configuración>, < DWR: controlador>, etc. ¿Cómo puede eclipsar sabe esto sin leer el esquema?
Hago uso de muchos espacios de nombres diferentes sin problema; el esquema DWR es el único que no se está resolviendo. Aquí está la declaración:
<?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">
tengo la última 3.0.0.116.rc1 DWR en mi ruta de clase. Si destapar el tarro de DWR, encuentro META-INF/spring.handlers que contiene:
http\://www.directwebremoting.org/schema/spring-dwr=org.directwebremoting.spring.DwrAnnotationNamespaceHandler
y META-INF/spring.schemas que contienen:
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
El escape de el colon me desanimó un poco, pero supongo que es correcto, de lo contrario, el DWR de todos se rompería.
Antes de obtener este esquema en particular en tiempo real del sitio web de DWR, pero me molestó cuando mi sistema de producción se bloqueó porque el sitio DWR estaba inactivo.
¿Hay alguna manera de hacer esto cuando el .xsd está dentro de un archivo .jar? ¿Debería la configuración en '/ META-INF/spring.schemas' hacerse cargo de esto ya? – Stewart