项目使用的是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.d: Invalid content was found 具体参考http://henatne.iteye.com/blog/837186
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-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 '...
主要给大家介绍了关于spring配置文件解析失败报”cvc-elt.1: 找不到元素 'beans' 的声明”异常的解决方法,需要的朋友可以参考下
在写xml的时候又一次总是报cvc-complex-type.2.4.a: Invalid content was found starting with element 错误.解决方案文件
- 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 '...
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 '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 'mvc:resources' 报错
CVC-C07-01:2017A3 强制性产品认证实施细则-家用和类似用途设备.pdf
dubbo.xsd文件,主要解决xml报错cvc-complex-type.2.4.c: The matching wildcard is strict, but no declaratio
使用 dubbo 时需要添加 dubbo 支持,否则会报错 。cvc-complex-type.2.4.c: The matching wildcard is strict, but no declaration can be found for element 'dubbo:application'.
本文实例讲述了Android使用Eclipse 打开时“发现了以元素’d:skin’”开头的无效内容。此处不应含有子元素的解决方法。分享给大家供大家参考,具体如下: 今天打开 Eclipse 时遇到了这个提示,如图所示: ...
BPMN2新规范 业界牛逼,流程建模设计,自动化,的工作流引擎
自动标记图像-android HackNY 2014 秋季参赛作品 使用 Clarifai 的预览 API 在 Android 手机上自动标记图像(您需要被邀请构建/运行——项目中的密钥不起作用)。 通过屏幕内的元素设置场景模式的非常粗糙的相机...
关于javascript经典例子 是一些基础功能