Hi all,

I'm stuck trying to fix an error happening when you try to run the shipment manifest report:

https://demo.hotwaxmedia.com/facility/control/ShipmentManifest.pdf?shipmentId=10000

The error is:

Unable to transform FO file: java.lang.IndexOutOfBoundsException: Index: 0, Size: 0

and the code that is causing it is at line 93:

<fo:block>$ {uiLabelMap.FormFieldTitle_shipmentPackageSeqId}: $ {shipmentPackage.shipmentPackageSeqId}</fo:block>

This is weird because the error only happens if that block has content.

For example, the following code works well:

                                    <fo:block></fo:block>

and this one trows the error:

                                    <fo:block>Some text here</fo:block>

For your reference, here is the complete table definition that contains the block:

                    <fo:table>
                        <fo:table-column column-width="225pt"/>
                        <fo:table-column column-width="225pt"/>
                        <fo:table-body>
                            <fo:table-row font-weight="bold">
<fo:table-cell padding="2pt" background-color="#D4D0C8"> <fo:block>$ {uiLabelMap.FormFieldTitle_shipmentPackageSeqId}: $ {shipmentPackage.shipmentPackageSeqId}</fo:block>
                                </fo:table-cell>
<fo:table-cell padding="2pt" background-color="#D4D0C8"> <#if shipmentPackage.weight? has_content && shipmentPackage.weightUomId?has_content> <#assign weightUom = shipmentPackage.getRelatedOne("WeightUom")> <fo:block text-align="center"> ${uiLabelMap.ProductWeight}: ${shipmentPackage.weight} $ {weightUom.get("description",locale)}</fo:block>
                                    </#if>
                                </fo:table-cell>
                            </fo:table-row>
                        </fo:table-body>
                    </fo:table>

Any ideas on this?

Jacopo

Reply via email to