Legacy Knowledge Base
Published Sep. 10, 2025

Amazon S3 - Report generation leads to multipart upload failed error

Written By

Phil Chapman

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

You are viewing an article from our legacy "FastTrack" publication program, made available for informational purposes. Articles in this program were published without a requirement for independent editing or verification and are provided"as is" without guarantee.

Before using any information from this article, independently verify its suitability for your situation and project.

Issue

  • Cannot generate reports on Liferay 6.2 and Amazon S3
  • Hitting multipart upload error when creating CSV file

    Scenario - With an S3 bucket configured for use and a data-definition in place, we find that when attempting to generate a report (.csv format), it is possible to encounter the following error:
    multipart upload failed

Environment

  • Liferay Portal 6.2

Resolution

This is known behavior with the S3 API when uploading an empty file (0 bytes). See: https://github.com/aws/aws-sdk-php/issues/1649

1. This workaround involves a tweak to our configuration of Jasper Reports. It is better to have empty sections or no-data sections, over having an empty file generated.

For a report template, set attribute "When No Data Type" instead to "No Data Section" or "All Sections No Detail"

Screenshot uses Jaspersoft Studio 6.9.0

jasper.PNG

2. To your data-definition file add the corresponding component into the <jasperReport> tag:

whenNoDataType="AllSectionsNoDetail"
or
whenNoDataType="NoDataSection"

*Further attributes can be added to the <noData></noData> tags. For example:

<noData>
<band height="10">
<staticText>
<reportElement x="" y="" width="" height="" uuid=""/>
<box>
<bottomPen lineWidth="" lineColor=""/>
</box>
<text><![CDATA[message here]]></text>
</staticText>
</band>
</noData>


Additional Information

 

Did this article resolve your issue ?

Legacy Knowledge Base