0

有一个WAR文件。

我可以将它部署到tomcat7而不会出现任何错误。但是当尝试将其部署到与 tomcat 捆绑的 Liferay 时,会发生此错误:

11:04:37,739 ERROR [com.liferay.portal.kernel.deploy.auto.AutoDeployScanner][AutoDeployDir:210] com.liferay.portal.kernel.deploy.auto.AutoDeployException: com.liferay.portal.kernel.xml.Docume
ntException: 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 declaratio
n 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)

在解压缩的 WAR 存档根目录中执行以下命令: $ grep version=[^\"] -r 给我们以下结果:

WEB-INF/i3-label.properties:file.reversion=Version History
WEB-INF/classes/web/zssapp/labels/i3-label.properties:file.reversion=Version History
WEB-INF/classes/web/zssapp/labels/i3-label_zh_TW.properties:file.reversion=版本歷史
WEB-INF/i3-label_zh_TW.properties:file.reversion=版本歷史
WEB-INF/liferay-plugin-package.properties:module-incremental-version=1

想法?

4

1 回答 1

0

尝试打开 LR 部署过程使用的所有 XML 文件(例如 portlet.xml、liferay-portlet.xml 等)并验证第一行。它应该有一些错误(引号,双引号,属性或其他东西......)。

尝试将其与新的 LR 项目(或 LR SVN 存储库中的某些示例)进行比较。

于 2013-07-31T11:41:33.687 回答