legacy-knowledge-base
公開されました Jul. 2, 2025

「Liferayバンドルをダウンロード」オプションがオンになっているLiferay Developer StudioでLiferayワークスペースプロジェクトを作成すると、initBundleが失敗しました

written-by

Emma Liu

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

問題

  • 「Liferay バンドルをダウンロード」オプションをオンにして Liferay Developer Studio で Liferay ワークスペース プロジェクトを作成すると、次の initBundle FAILED エラーがコンソールに報告されます。
    CONFIGURE SUCCESSFUL in 15s

    CONFIGURE SUCCESSFUL in 0s
    > Task :downloadBundle

    > Task :initBundle
    Exception in thread "main" java.io.EOFException
    at org.apache.commons.compress.compressors.gzip.GzipCompressorInputStream.read(GzipCompressorInputStream.java:303)
    at org.apache.commons.compress.archivers.tar.TarArchiveInputStream.read(TarArchiveInputStream.java:608)
    at java.base/java.io.InputStream.transferTo(InputStream.java:704)
    at java.base/java.nio.file.Files.copy(Files.java:3077)
    at com.liferay.portal.tools.bundle.support.internal.util.FileUtil._writeArchiveEntryFile(FileUtil.java:511)
    at com.liferay.portal.tools.bundle.support.internal.util.FileUtil._untar(FileUtil.java:444)
    at com.liferay.portal.tools.bundle.support.internal.util.FileUtil.unpack(FileUtil.java:271)
    at com.liferay.portal.tools.bundle.support.commands.InitBundleCommand.execute(InitBundleCommand.java:58)
    at com.liferay.portal.tools.bundle.support.BundleSupport.main(BundleSupport.java:73)

    > Task :initBundle FAILED

    FAILURE: Build failed with an exception.

    * What went wrong:
    Execution failed for task ':initBundle'.
    > Process 'command 'C:\Program Files\AdoptOpenJDK\jdk-11.0.4.11-hotspot\bin\java.exe'' finished with non-zero exit value 1

    * Try:
    Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

    * Get more help at https://help.gradle.org

    BUILD FAILED in 22s
    2 actionable tasks: 2 executed

    (「新しい Liferay ワークスペース」のスクリーンショット)

    Selection_017.png

環境

  • Liferay DXP 7.2
  • Liferay DXP 7.3
  • Liferay DXP 7.4

解決策

  • このエラーは通常、バンドル ファイルが完全にダウンロードされていない場合に報告されます。 これを確認するには、 {USER_HOME}/.liferay/bundles/ フォルダーに移動し、ダウンロードしたバンドルを解凍してください。 バンドル zip を解凍すると、エラーが報告されるはずです。
  • これを解決するには:
    1. {USER_HOME}/.liferay/bundles/ フォルダーに移動し、不完全な zip ファイルを削除します。
    2. Developer Studio で、スクリーンショットのように [サーバー バンドルの初期化] をクリックします。Selection_015.png
    3. 次のような出力がコンソールに記録されます。
      CONFIGURE SUCCESSFUL in 0s
      Download https://releases-cdn.liferay.com/portal/7.2.0-ga1/liferay-ce-portal-tomcat-7.2.0-ga1-20190531153709761.tar.gz
      > Task :downloadBundle
      > Task :initBundle

      BUILD SUCCESSFUL in 2m 26s
      2 actionable tasks: 2 executed
did-this-article-resolve-your-issue

legacy-knowledge-base