You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ofbiz.apache.org by Jacopo Cappellato <ja...@gmail.com> on 2008/04/11 11:15:47 UTC
Weird FOP error in the ShipmentManifestReport
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
Re: Weird FOP error in the ShipmentManifestReport
Posted by Anne <an...@cohsoft.com.au>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hi
I had the same error message while experimenting with a few fop-related
things. Never got to the bottom of it, but it was related to having
Prorate Shipping=Y for the productStore. If you've got Prorate Shipping
= Y, try changing it to N and see if the problem goes away.
Once I worked out what Prorate Shipping did, I realised I wanted it off
anyway, so I never looked further. Assumed the problem was related to
other changes I had made.
Cheers,
Anne.
Jacopo Cappellato wrote:
> 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
>
- --
Coherent Software Australia Pty Ltd
PO Box 2773
Cheltenham Vic 3192
Phone: (03) 9585 6788
Fax: (03) 9585 1086
Web: http://www.cohsoft.com.au/
Email: sales@cohsoft.com.au
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFIBYeAtgv4pchABrERAnOxAKDElF7IFZiNauvv68Qhzz62FGxvNQCfciVJ
O+OFi4+PhyCJRVU94HjlvE0=
=N8IW
-----END PGP SIGNATURE-----
Re: Weird FOP error in the ShipmentManifestReport
Posted by Christian Geisert <ch...@isu-gmbh.de>.
Jacopo Cappellato schrieb:
> 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?
I just tried to reproduce this error with revision 647084
and the problem seems to be that the second cell has no fo:block
if there's no weight.
I'll commit the "old version" with a fo:block before the #if
--
Christian