Legacy Knowledge Base
Published Jul. 2, 2025

Product Detail Portlet breaks and a nullpointerexception is printed in the logs

Written By

Anishq Sharma

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

  • When the product options are not complete the Product Detail Portlet breaks and a nullpointerexception is printed in the logs.
  • Steps to reproduce:
    • Create a product with a REQUIRED option with two variants: 1 and 2
    • Generate all the SKUs: it will result in 2 additional SKUs (1 and 2).
    • Add an additional REQUIRED option for the product, also with two variants 1 and 2.
    • Click again on "Generate all SKUs"
    • This has the effect of 4 additional SKUs being created, for all the combinations of the two options (11, 12, 21, 22). HOWEVER, the 2 SKUs generated at step 2 will remain there, and they are empty for the second option, these 2 old SKUs are not valid anymore, and they cause the failure when user clicks on "See all variants" button on the product.

Environment

  • Liferay Commerce-2.0.7

Resolution

  • The observed behavior is a known issue/bug and is resolved in Commerce 2.1.2
  • If the Hotfix is required for this issue, please create a support ticket requesting Hotfix by attaching patch details.
Did this article resolve your issue ?

Legacy Knowledge Base