报错:
[/WEB-INF/user-servlet.xml] is invalid; nested exception is org.xml.sax.SAXParseException: cvc-complex-type.2.4.c: The matching wildcard is strict, but no declaration can be found for element 'mvc:resources'.
解决:1,下载spring-mvc-3.0.xsd,切记大小为84KB以上,如右图:
2,选中项目mlxc001,然后单击菜单栏window--properties 输入xml 选择XML Catalog
从图 1 中可以看到有两种 xml catalog entity , 用户定义的实体及插件的实体。用手动方式生成的配置属于用户配置的实体;
参考文档:http://www.wcode.net/plus/view.php?aid=951775
如图所示,Location 标签指定了 xsd 的位置,在这里是工作空间的相对路径;Key Type 标签表明了在这里我们使用的是命名空间的名字作为 xml 和 xsd 的关联;Key 标签的值是 xml 命名空间的值。
3, 图3 OK,保存!重启
4,如果还不能解决,那原因只有一个了:导入的jar包不全,这一点我测试过,JAR包不全也是一个重要方面
相关推荐
- cvc-complex-type.2.4.c: The matching wildcard is strict, but no declaration can be found for element 'dubbo:application'. - schema_reference.4: Failed to read schema document '...
- cvc-complex-type.2.4.c: The matching wildcard is strict, but no declaration can be found for element 'dubbo:application'. - schema_reference.4: Failed to read schema document '...
- cvc-complex-type.2.4.c: The matching wildcard is strict, but no declaration can be found for element 'dubbo:application'. - schema_reference.4: Failed to read schema document '...
- cvc-complex-type.2.4.c: The matching wildcard is strict, but no declaration can be found for element 'dubbo:application'. - schema_reference.4: Failed to read schema document 'http:// code....
- cvc-complex-type.2.4.c: The matching wildcard is strict, but no declaration can be found for element 'dubbo:application'. - schema_reference.4: Failed to read schema document '...
cvc-complex-type.2.4.c: The matching wildcard is strict, but no declaration can be found for element 'mvc:resources' 报错
- cvc-complex-type.2.4.c: The matching wildcard is strict, but no declaration can be found for element 'dubbo:application'. - schema_reference.4: Failed to read schema document '...
使用 dubbo 时需要添加 dubbo 支持,否则会报错 。cvc-complex-type.2.4.c: The matching wildcard is strict, but no declaration can be found for element 'dubbo:application'.
在Spring框架中,配置文件是核心组件之一,它定义了bean的实例化、依赖注入以及其他的设置。当遇到“cvc-elt.1: 找不到元素 'beans' 的声明”这种异常时,通常意味着Spring在尝试解析XML配置文件时遇到了问题。...
当我们遇到描述中的错误——"cvc-complex-type.2.4.c: The matching wildcard is strict, but no declaration can be found for element 'dubbo:reference'"时,这通常意味着XML解析器在尝试解析配置文件时找不到...