This forum is now a read-only archive. All commenting, posting, registration services have been turned off. Those needing community support and/or wanting to ask questions should refer to the Tag/Forum map, and to http://spring.io/questions for a curated list of stackoverflow tags that Pivotal engineers, and the community, monitor.

webmvc-config.xml has errors

As per the roo documentation, I should be able to import roo projects into any supported IDE.

So when I import ten-minutes project into eclipse, everything else is fine except for following two errors:

Code:

Description Resource Path Location Type
cvc-complex-type.2.4.c: The matching wildcard is strict, but no declaration can be found for element 'mvc:default-servlet-handler'. webmvc-config.xml /tenminutes/src/main/webapp/WEB-INF/spring line 27 XML Problem
Description Resource Path Location Type
cvc-complex-type.2.4.c: The matching wildcard is strict, but no declaration can be found for element 'mvc:resources'. webmvc-config.xml /tenminutes/src/main/webapp/WEB-INF/spring line 24 XML Problem

NOTE: There was already a JIRA bug on this issue ROO-1328 which is closed suggesting we should use STS.

Comment

I've also seen this set of validation errors when I'm using the latest versions of different Spring packages.

This is what Keith Donald said in his blog about a similar situation july 2010:

The reason STS flags the tag is because it refers to the version of the mvc namespace in its XML Catalog when validating the XML file. This version is different than the version of spring-mvc-3.0.xsd in the org.springframework.web.servlet.config package of the spring-webmvc-3.0.4.BUILD-SNAPSHOT jar file included in your classpath, which is what actually gets used at runtime. Once the Spring Framework 3.0.4 release is out and STS has updated its catalog, the error marker will go away. But, I promise, the issue is just a tooling thing and will not effect the actual application at runtime (unless you comment the tag out, Dan

Rossen Stoyanchev suggested to me that using a local XML catalog entry could be a solution when the proper DTD isn't available online.