cvc-complex-type.2.4.d: Invalid content was found starting with element

lwenmingbb 2014-07-03 04:19:48
<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:web="http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd "
version="2.4">
<display-name>Travel</display-name>
<!-- tta 4.0 -->
<!-- 系统控制参数 -->
<!-- 使用ContextLoaderListener配置时,需要告诉它Spring配置文件的位置 -->
<!-- 如果没有指定,上下文载入器会在/WEB-INF/applicationContext.xml中找Spring配置文件 -->
<!-- 我们可以通过在Servlet上下文中设置contextConfigLocation参数,来为上下文载入器指定一个或多个Spring配置文件 -->
<!-- 注意:contextConfigLocation参数是一个用逗号分隔的路径列表,其路径是相对于Web系统的根路径的 -->
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>/WEB-INF/classes/travelservice-*.xml</param-value>
</context-param>
<!-- <context-param>Log4j配置 在同一容器中部署多个应用不能使用默认的webAppRootKey,必须指定唯一KEY,以免冲突
<param-name>webAppRootKey</param-name> <param-value>trustWeb.root</param-value>
在log4j.properties中设置日志路径log4j.appender.file.File=${trustWeb.root}/WEB-INF/itservice.log
</context-param> -->
<context-param>
<param-name>log4jConfigLocation</param-name>
<param-value>/WEB-INF/classes/log4j.properties</param-value>
</context-param>

<!-- 配置上下文载入器 -->
<!-- 上下文载入器载入除DispatcherServlet载入的配置文件之外的其它上下文配置文件 -->
<!-- 最常用的上下文载入器是一个Servlet监听器,其名称为ContextLoaderListener -->
<listener>
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
<listener-class>org.springframework.web.util.Log4jConfigListener</listener-class>
</listener>

<!-- SpringMVC的前端控制器 -->
<!-- 当DispatcherServlet载入后,它将从一个XML文件中载入Spring的应用上下文,该XML文件的名字取决于<servlet-name> -->
<!-- 这里DispatcherServlet将试图从一个叫做springmvc-servlet.xml的文件中载入应用上下文,其默认位于WEB-INF目录下 -->
<!-- 所以ContextLoaderListener参数值也可写成<param-value>classpath:applicationContext-*.xml</param-value> -->
<servlet>
<servlet-name>springmvc</servlet-name>
<servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
<init-param>
<param-name>contextConfigLocation</param-name>
<param-value>/WEB-INF/classes/travelservice-*.xml</param-value>
</init-param>
<load-on-startup>2</load-on-startup>
</servlet>

<servlet-mapping>
<servlet-name>springmvc</servlet-name>
<url-pattern>*.jho</url-pattern>
</servlet-mapping>
</web-app>

在listener中的第二个listener-class报错,错误信息:cvc-complex-type.2.4.d: Invalid content was found starting with element 'listener-class'. No child element is expected at this point.
...全文
5531 1 打赏 收藏 转发到动态 举报
写回复
用AI写文章
1 条回复
切换为时间正序
请发表友善的回复…
发表回复
解决??? XML-file failed validation against schema located in: D:\Program Files\MATLAB\R2007b\sys\namespace\info\v1\info.xsd XML-file name: d:\program files\matlab\r2007b\toolbox\hosa_d\hosa\info.xml To retest the XML-file against the schema, call the following java method: com.mathworks.xml.XMLValidator.validate(... 'd:\program files\matlab\r2007b\toolbox\hosa_d\hosa\info.xml',... 'D:\Program Files\MATLAB\R2007b\sys\namespace\info\v1\info.xsd', true) Errors: 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 (case-sensitive) match for 'hosaver'. D:\Program Files\MATLAB\R2007b\toolbox\hosa_d\hosa\HOSAVER.M is a case-insensitive match and will be used instead. You can improve the performance of your code by using exact name matches and we therefore recommend that you update your usage accordingly. Alternatively, you can disable this warning using warning('off','MATLAB:dispatcher:InexactMatch'). Higher-Order Spectral Analysis Toolbox. Version 2.0.3 (R12 compliant) 27 Dec 2000 安装原版工具箱之所以出现问题是因为没有将文件名全部改成小写,无法运行hosademo是因为缺少choices.m文件,参考http://cn.mathworks.com/matlabcentral/fileexchange/3013-hosa-higher-order-spectral-analysis-toolbox。本资源是整理后的工具箱,直接安装就可使用,运行hosaver显示成功安装信息,运行hosademo查看示例。

8,906

社区成员

发帖
与我相关
我的任务
社区描述
XML/XSL相关问题讨论专区
社区管理员
  • XML/XSL社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧