[ 
https://issues.apache.org/jira/browse/OFBIZ-5699?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14160138#comment-14160138
 ] 

Guillaume Sigoigne commented on OFBIZ-5699:
-------------------------------------------

This NPE can be tested with demo data.

Normal use without NPE: 
Create a selling order with product PIZZA
Order -> Order Entry
Select 'DemoCustomer' as Customer in Sales order part -> Continue -> Continue
Select PIZZA
Quantity = 1
Add to Order

As it is a configurable good, you have the configuration page with the option 
"Select the toppings".
This option has two virtual products as answers: Peppers and Sauce

To make NPE occures:
Catalog -> Products -> Select PIZZA -> Configurations
Toppings option [PZ0001] has 'isMandatory' to 'N'
Change it to 'Y'
Update

Create a selling order with PIZZA as seen previously
After clicking on Add to Order, this error message appears : 
:ERROR MESSAGE:
org.ofbiz.widget.screen.ScreenRenderException: Error rendering screen 
[component://order/widget/ordermgr/OrderEntryCatalogScreens.xml#configproductdetail]:
 java.lang.IllegalArgumentException: Error running script at location 
[component://order/webapp/ordermgr/WEB-INF/actions/entry/catalog/PrepareConfigForm.groovy]:
 java.lang.NullPointerException (Error running script at location 
[component://order/webapp/ordermgr/WEB-INF/actions/entry/catalog/PrepareConfigForm.groovy]:
 java.lang.NullPointerException)


> NPE on a virtual product in configurable good
> ---------------------------------------------
>
>                 Key: OFBIZ-5699
>                 URL: https://issues.apache.org/jira/browse/OFBIZ-5699
>             Project: OFBiz
>          Issue Type: Bug
>          Components: product
>    Affects Versions: Release Branch 13.07
>            Reporter: Guillaume Sigoigne
>            Assignee: Nicolas Malin
>
> In a configurable good, I have an option with a component.
> This component is a virtual product with several variants products.
> When the configurable good is ordered, a NPE appears instead of configuration 
> page.
> The NPE is here : ProductConfigWorker.storeProductConfigWrapper() l.347
> String componentOption = 
> oneOption.componentOptions.get(component.getString("productId"));
> oneOption exists, but oneOption.componentOptions is null



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to