0
votes

There is a WAR file.

I can deploy it to tomcat7 without any errors. But when trying to deploy it to a Liferay bundled with tomcat this error occures:

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)

Executing the folowing command in unzipped WAR archive root directory: $ grep version=[^\"] -r Gives us the folowing result:

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

Ideas?

1
Go through all the .xml files inside and check their first line? Now you just found properties files. They're not xml at all.Kayaman

1 Answers

0
votes

Try to open all XML files used by LR deploy process (eg portlet.xml, liferay-portlet.xml, etc...) and verify the first row. It should have some error (quotes, doble-quotes, attributes or something else...).

Try to compare it to a new LR project (or to some example in LR SVN repository).