Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: 6.1.1 CE GA2, 6.1.20 EE GA2
-
Fix Version/s: 6.1.X EE, 6.2.0 CE M2
-
Component/s: Tools, Tools > Plugins SDK > Hook
-
Labels:
-
Environment:Liferay Portal Community Edition 6.1.1 CE GA2 (Paton / Build 6101 / July 31, 2012)
-
Branch Version/s:6.1.x
-
Backported to Branch:Committed
-
Fix Priority:3
-
Similar Issues:
Description
When you try to deploy a hook (but probably just every Liferay plugin that contains a web.xml, e.g.: portlet) that has a web.xml that contains a section in comments (<!-- -->) the deployment will fail with the following message:
14:03:59,418 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.WebAutoDeployListener.deploy(WebAutoDeployListener.java:51) 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
A similar issue description was found on Stackoverflow, http://stackoverflow.com/questions/11883813/xml-parsing-error-in-liferay-6-1-1, and the workaround they propose there, completely removing the commented section, seems to work.

I get this bug on Liferay 6.1.20 EE GA2.