项目使用的是Spring MVC,之前使用的 web.xml 使用的是2.4版本的,今天把它升级至2.5版本,但是升级之后,spring mvc 的 servlet 的声明报错了:
<servlet> <servlet-name>apps</servlet-name> <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class> <load-on-startup>5</load-on-startup> <init-param> <param-name>contextConfigLocation</param-name> <param-value>classpath:resources/applicationContext.xml</param-value> </init-param> </servlet>
报的错如下:
cvc-complex-type.2.4.a: Invalid content was found starting with element 'init-param'. One of '{"http://java.sun.com/xml/ns/javaee":run-as, "http://java.sun.com/ xml/ns/javaee":security-role-ref}' is expected.
这个问题怎么解决呢?其实很简单,只要将“<load-on-startup>5</load-on-startup>”调个位置就好了,见下面:
<servlet> <servlet-name>apps</servlet-name> <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class> <init-param> <param-name>contextConfigLocation</param-name> <param-value>classpath:resources/applicationContext.xml</param-value> </init-param> <load-on-startup>5</load-on-startup> </servlet>
相关推荐
- 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.a: Invalid content was found starting with element 'page-encoding'. One of '{"http:// java.sun.com/xml/ns/javaee":include-prelude, ...
当遇到“cvc-elt.1: 找不到元素 'beans' 的声明”这种异常时,通常意味着Spring在尝试解析XML配置文件时遇到了问题。这个错误提示表明XML解析器无法找到`<beans>`元素的定义,这是一个基本的Spring配置文件结构元素...
- 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 '...
《URL重写过滤器在Java Web开发中的应用》 在Java Web开发中,优雅的URL设计对于提升用户体验和搜索引擎优化(SEO)具有重要意义。`URLRewriteFilter`是一款广泛使用的开源工具,它允许开发者通过XML配置文件对URL...
- 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....
org.xml.sax.SAXParseException: cvc-complex-type.2.4.a: Invalid content was found starting with element 'area'. One of '{MathWorksID, type}' is expected. 运行hosaver: Warning: Could not find an exact ...
- 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 'mvc:resources' 报错
描述中的错误 "cvc-complex-type.2.4.a: Invalid content was found starting with element 错误" 是一种常见的XML验证错误,意味着在XML文档中找到了不符合预期或不合法的元素。这通常发生在尝试添加一个不被其父...
本文实例讲述了Android使用Eclipse 打开时“发现了以元素’d:skin’”开头的无效内容。此处不应含有子元素的解决方法。分享给大家供大家参考,具体如下: 今天打开 Eclipse 时遇到了这个提示,如图所示: ...
CVC-ClinicDB 是MICCAI 2015 结肠镜视频自动息肉检测子挑战赛训练阶段的官方数据集。该数据库由从结肠镜检查视频中提取的612张静态图像组成,这些图像来自29个不同的序列。每张帧图像都附带有一个真值(ground truth...
function add(a, b) { return a + b; } ``` 在JavaScript中,事件处理也是经典的应用之一。当用户与网页交互(如点击按钮、提交表单等)时,可以触发预先定义的JavaScript代码执行。例如,我们可以为一个按钮添加...
计算机视觉中心-01行人数据集(CVC-01PedestrianDataset) 计算机视觉中心-01行人数据集(CVC-01PedestrianDataset)是一种用于评估行人检测算法的数据库,该数据库记录了巴塞罗那周围的行人数据,并由CVC ADAS小组...
使用 dubbo 时需要添加 dubbo 支持,否则会报错 。cvc-complex-type.2.4.c: The matching wildcard is strict, but no declaration can be found for element 'dubbo:application'.
常见人脸识别数据库YALE人脸数据库(美国,耶鲁大学)http://cvc.cs.yale.edu/cvc/projects/yalefaces/yalefaces.html由耶鲁大学计算视觉与控制中心创建,包含15位志愿者的165张图片,包含光照、表情和姿态的变化。...