liferay 6.1.1中的xml-parsing错误

我尝试在liferay 6.1.1上部署我的应用程序并得到此错误(当我在6.0.6上测试此应用程序时一切正常).这是什么意思?

Caused by: com.liferay.portal.kernel.xml.DocumentException: Error on
line 1 of document : The value following “version” in the XML
declaration must be a quoted string. nested exception: The value
following “version” in the XML declaration must be a quoted string.

up:我不知道哪个文件出现此错误.
完整日志

I don’t kNow which file giving this error…
All log
[#|2012-08-09T15:12:20.322+0400|INFO|glassfish3.1.2|javax.enterprise.system.std.com.sun.enterprise.server.logging|_ThreadID=17;_ThreadName=Thread-3;|15:12:20,321 ERROR [com.liferay.portal.kernel.deploy.auto.AutoDeployScanner][AutoDeployDir:210] com.liferay.portal.kernel.deploy.auto.AutoDeployException: com.liferay.portal.kernel.xml.DocumentException: Error on line 1 of document : The value following “version” in the XML declaration must be a quoted string. nested exception: The value following “version” in the XML declaration must be a quoted string.
com.liferay.portal.kernel.deploy.auto.AutoDeployException: com.liferay.portal.kernel.xml.DocumentException: Error on line 1 of document : The value following “version” in the XML declaration must be a quoted string. nested exception: The value following “version” in the XML declaration must be a quoted string.
at com.liferay.portal.tools.deploy.BaseDeployer.autoDeploy(BaseDeployer.java:201)
at com.liferay.portal.deploy.auto.PortletAutoDeployListener.deploy(PortletAutoDeployListener.java:84)
at com.liferay.portal.kernel.deploy.auto.AutoDeployDir.processFile(AutoDeployDir.java:193)
at com.liferay.portal.kernel.deploy.auto.AutoDeployDir.scanDirectory(AutoDeployDir.java:235)
at com.liferay.portal.kernel.deploy.auto.AutoDeployScanner.run(AutoDeployScanner.java:54)
Caused by: com.liferay.portal.kernel.xml.DocumentException: Error on line 1 of document : The value following “version” in the XML declaration must be a quoted string. nested exception: The value following “version” in the XML declaration must be a quoted string.
at com.liferay.portal.xml.SAXReaderImpl.read(SAXReaderImpl.java:399)
at com.liferay.portal.xml.SAXReaderImpl.read(SAXReaderImpl.java:378)
at com.liferay.portal.xml.SAXReaderImpl.read(SAXReaderImpl.java:409)
at com.liferay.portal.kernel.xml.SAXReaderUtil.read(SAXReaderUtil.java:155)
at com.liferay.portal.tools.WebXMLBuilder.organizeWebXML(WebXMLBuilder.java:60)
at com.liferay.portal.tools.deploy.BaseDeployer.updateWebXml(BaseDeployer.java:2078)
at com.liferay.portal.tools.deploy.BaseDeployer.deployDirectory(BaseDeployer.java:576)
at com.liferay.portal.tools.deploy.BaseDeployer.deployFile(BaseDeployer.java:957)
at com.liferay.portal.tools.deploy.BaseDeployer.deployFile(BaseDeployer.java:889)
at com.liferay.portal.tools.deploy.BaseDeployer.autoDeploy(BaseDeployer.java:198)
… 4 more
Caused by: org.dom4j.DocumentException: Error on line 1 of document : The value following “version” in the XML declaration must be a quoted string. nested exception: The value following “version” in the XML declaration must be a quoted string.
at org.dom4j.io.SAXReader.read(SAXReader.java:482)
at org.dom4j.io.SAXReader.read(SAXReader.java:365)
at com.liferay.portal.xml.SAXReaderImpl.read(SAXReaderImpl.java:396)
… 13 more
|#]

问题可能出在您的web.xml文件中.我有一个类似的问题,一个portlet在6.1GA1下工作正常但不是6.1GA2.当Liferay部署portlet(和钩子等)时,它会重写文件和其他文件添加过滤器,库等.因此,错误可能不是您最初创建它时的文件,而是Liferay生成文件.

就我而言,Liferay改变了web.xml的第一部分

<?xml version="1.0" encoding="UTF-8"?>
<web-app version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee"
 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
 xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">

喜欢的东西

<?xml version=<filters>[other stuff]</filters>
<web-app version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee"
 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
 xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">

所以这是一个修改过的第一行导致了这个问题.我使用<! - - >注释掉了一些XML并删除这些部分解决了问题.但这是一个错误恕我直言.

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。

相关推荐


php输出xml格式字符串
J2ME Mobile 3D入门教程系列文章之一
XML轻松学习手册
XML入门的常见问题(一)
XML入门的常见问题(三)
XML轻松学习手册(2)XML概念
xml文件介绍及使用
xml编程(一)-xml语法
XML文件结构和基本语法
第2章 包装类
XML入门的常见问题(二)
Java对象的强、软、弱和虚引用
JS解析XML文件和XML字符串详解
java中枚举的详细使用介绍
了解Xml格式
XML入门的常见问题(四)
深入SQLite多线程的使用总结详解
PlayFramework完整实现一个APP(一)
XML和YAML的使用方法
XML轻松学习总节篇