initBundle FAILED when creating a Liferay Workspace Project in Liferay Developer Studio with "Download Liferay bundle" option checked

Issue

  • When creating a Liferay Workspace Project in Liferay Developer Studio with "Download Liferay bundle" option checked, the following initBundle FAILED error is reported in the console:
    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

    (The 'New Liferay Workspace' screenshot)

     Selection_017.png

Environment

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

Resolution

  • The error is usually reported when the bundle file is not downloaded completely. To confirm this, please go into {USER_HOME}/.liferay/bundles/ folder and unzip the downloaded bundle. There should be error reported when unzipping the bundle zip.
  • To resolve this:
    1. Go to {USER_HOME}/.liferay/bundles/ folder and remove the incomplete zip file.
    2. In Developer Studio, click Initialize Server Bundle as in the screenshot.Selection_015.png
    3. Output similar to the following should be logged in the console:
      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
这篇文章有帮助吗?
5 人中有 3 人觉得有帮助