Issue
- When deploying Spring MVC custom portlet, an exception is thrown "DocumentException: Error on line -1 of document: Premature end of the file. "
- Issue reproduced With 7.1 GA1 release as below when deployed the Spring MVC custom portlet,
2019-06-25 06:14:08.705 ERROR [fileinstall-C:/Users/admin/Downloads/Deploynment-issue/New folder/GA1/liferay-dxp-7.1.10-ga1/osgi/war][PortletLocalServiceImpl:881] com.liferay.portal.kernel.xml.DocumentException: Error on line -1 of document : Premature end of file. Nested exception: Premature end of file.
com.liferay.portal.kernel.xml.DocumentException: Error on line -1 of document : Premature end of file. Nested exception: Premature end of file.
at com.liferay.portal.xml.SAXReaderImpl.read(SAXReaderImpl.java:408)
at com.liferay.portal.xml.SAXReaderImpl.read(SAXReaderImpl.java:426)
at com.liferay.portal.kernel.xml.UnsecureSAXReaderUtil.read(UnsecureSAXReaderUtil.java:74)
at com.liferay.portal.service.impl.PortletLocalServiceImpl.readPortletXML(PortletLocalServiceImpl.java:2501)
at com.liferay.portal.service.impl.PortletLocalServiceImpl.initWAR(PortletLocalServiceImpl.java:857)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
2019-06-25 06:14:08.720 INFO [fileinstall-C:/Users/admin/Downloads/Deploynment-issue/New folder/GA1/liferay-dxp-7.1.10-ga1/osgi/war][PortletHotDeployListener:303] 0 portlets for testnew are available for use
Environment
- Liferay portal DXP 7.1 GA1 [by default no fix pack available with this GA release]
Resolution
- The above error gets resolved by updating with fix pack dxp-11 which is Latest fix pack currently when tested the issue.