legacy-knowledge-base
公開されました Sep. 10, 2025

DocumentException。ファイルの早期終了

written-by

Thanga Meena

How To articles are not official guidelines or officially supported documentation. They are community-contributed content and may not always reflect the latest updates to Liferay DXP. We welcome your feedback to improve How To articles!

While we make every effort to ensure this Knowledge Base is accurate, it may not always reflect the most recent updates or official guidelines.We appreciate your understanding and encourage you to reach out with any feedback or concerns.

legacy-article

learn-legacy-article-disclaimer-text

問題

  • Spring MVCカスタムポートレットをデプロイすると例外がスローされる "DocumentException.ドキュメントの1行目でエラーが発生しました。ファイルの早期終了。 "
  • 7.1 GA1リリースでSpring MVCカスタムポートレットをデプロイした際に以下のような問題が再現された。
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

環境への配慮

  • LiferayポータルDXP 7.1GA1 [デフォルトではこのGAリリースで利用可能な修正パックはありません] GA1 [デフォルトではこのGAリリースで利用可能な修正パックはありません

決議

  • 上記のエラーは、テスト時に最新の修正パックであるの修正パックdxp-11 でアップデートすることで解決します。

追加情報

did-this-article-resolve-your-issue

legacy-knowledge-base