We're updating the issue view to help you get more done. 

NPE editing product-supplier relationship

Description

From a 1.7.1-SNAPSHOT error report:

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 java.lang.NullPointerException at org.openvpms.web.component.im.edit.IMTableCollectionEditor.onCurrentEditorModified(IMTableCollectionEditor.java:673) at org.openvpms.web.component.im.edit.IMTableCollectionEditor$2.modified(IMTableCollectionEditor.java:187) at org.openvpms.web.component.property.ModifiableListeners.notifyListeners(ModifiableListeners.java:92) at org.openvpms.web.component.edit.Editors.onModified(Editors.java:374) at org.openvpms.web.component.edit.Editors$1.modified(Editors.java:98) at org.openvpms.web.component.property.ModifiableListeners.notifyListeners(ModifiableListeners.java:92) at org.openvpms.web.component.property.AbstractProperty.refresh(AbstractProperty.java:283) at org.openvpms.web.component.property.PropertySet.updateDerivedProperties(PropertySet.java:205) at org.openvpms.web.component.property.PropertySet.updateDerivedProperties(PropertySet.java:242) at org.openvpms.web.component.property.PropertySet.access$000(PropertySet.java:43) at org.openvpms.web.component.property.PropertySet$1.modified(PropertySet.java:226) at org.openvpms.web.component.property.ModifiableListeners.notifyListeners(ModifiableListeners.java:92) at org.openvpms.web.component.property.AbstractProperty.refresh(AbstractProperty.java:283) at org.openvpms.web.component.im.product.ProductPriceEditor.refresh(ProductPriceEditor.java:115) at org.openvpms.web.component.im.product.ProductEditor.updatePriceEditor(ProductEditor.java:109) at org.openvpms.web.component.im.product.ProductEditor.onSupplierChanged(ProductEditor.java:94) at org.openvpms.web.component.im.product.ProductEditor.access$000(ProductEditor.java:43) at org.openvpms.web.component.im.product.ProductEditor$1.modified(ProductEditor.java:75) at org.openvpms.web.component.property.ModifiableListeners.notifyListeners(ModifiableListeners.java:92) at org.openvpms.web.component.im.edit.AbstractIMObjectCollectionEditor.onModified(AbstractIMObjectCollectionEditor.java:518) at org.openvpms.web.component.im.edit.AbstractIMObjectCollectionEditor$1.modified(AbstractIMObjectCollectionEditor.java:128) at org.openvpms.web.component.property.ModifiableListeners.notifyListeners(ModifiableListeners.java:92) at org.openvpms.web.component.edit.Editors.onModified(Editors.java:374) at org.openvpms.web.component.edit.Editors$1.modified(Editors.java:98) at org.openvpms.web.component.property.ModifiableListeners.notifyListeners(ModifiableListeners.java:92) at org.openvpms.web.component.property.AbstractProperty.refresh(AbstractProperty.java:283) at org.openvpms.web.component.property.IMObjectProperty.modified(IMObjectProperty.java:494) at org.openvpms.web.component.property.IMObjectProperty.setValue(IMObjectProperty.java:125) at org.openvpms.web.component.bound.Binder.setProperty(Binder.java:137) at org.openvpms.web.component.bound.Binder.setProperty(Binder.java:93) at org.openvpms.web.component.bound.BoundCheckBox$1.stateChanged(BoundCheckBox.java:62) at nextapp.echo2.app.button.ToggleButton.fireStateChanged(ToggleButton.java:93) at nextapp.echo2.app.button.ToggleButton$1.stateChanged(ToggleButton.java:67) at nextapp.echo2.app.button.DefaultToggleButtonModel.fireStateChanged(DefaultToggleButtonModel.java:59) at nextapp.echo2.app.button.DefaultToggleButtonModel.setSelected(DefaultToggleButtonModel.java:82) at nextapp.echo2.app.button.ToggleButton.setSelected(ToggleButton.java:292) at nextapp.echo2.app.button.ToggleButton.processInput(ToggleButton.java:204) at nextapp.echo2.app.update.ClientUpdateManager.process(ClientUpdateManager.java:110) at nextapp.echo2.app.update.UpdateManager.processClientUpdates(UpdateManager.java:89) at nextapp.echo2.webcontainer.ContainerSynchronizeService.renderUpdate(ContainerSynchronizeService.java:471) at nextapp.echo2.webrender.service.SynchronizeService.service(SynchronizeService.java:279) at nextapp.echo2.webrender.WebRenderServlet.process(WebRenderServlet.java:273) at org.openvpms.web.echo.servlet.SpringWebContainerServlet.process(SpringWebContainerServlet.java:174) at nextapp.echo2.webrender.WebRenderServlet.doPost(WebRenderServlet.java:189) at javax.servlet.http.HttpServlet.service(HttpServlet.java:637) at javax.servlet.http.HttpServlet.service(HttpServlet.java:717) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:343) at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:109) at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:83) at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:355) at org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:78) at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:355) at org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter.doFilter(AbstractAuthenticationProcessingFilter.java:187) at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:355) at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:97) at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:355) at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:79) at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:355) at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:149) at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:237) at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:167) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:859) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588) at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489) at java.lang.Thread.run(Unknown Source)

To reproduce:
1. edit a product with a fixed price and a unit price
2. on the Prices tab, click on both prices
3. delete the fixed price. There should now be no price selected
4. on the Suppliers tab, add a new supplier relationship.
5. enter a Package Size, List Price and click Auto Price Update. The NPE should occur

Environment

None

Status

Assignee

Tim Anderson

Reporter

Tim Anderson

Labels

None

Components

Fix versions

Affects versions

1.7

Priority

Minor