无法在liferay中部署WAR文件

时间:2013-07-31 11:31:27

标签: java tomcat liferay war

有一个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

想法?

1 个答案:

答案 0 :(得分:0)

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

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