Announcement Announcement Module
Collapse
No announcement yet.
webmvc-config.xml has errors Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • 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.

    Any suggestions?

  • #2
    I looked into the jar file and the schema online they both have the required elements in the xml schema.

    However, eclipse IDE will recognise only following elements from schema.

    <mvc:annotation-driven/>
    <mvc:interceptors />
    <mvc:view-controller path=""/>

    How can we make IDE recognize other two elements namely <mvc:resources/> and <mvc:default-servlet-handler/>

    Comment


    • #3
      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.
      Last edited by MiB; Mar 3rd, 2011, 05:30 AM.

      Comment

      Working...
      X