Project:
View Issue Details[ Jump to Notes ] | [ Issue History ] [ Print ] | |||||||
ID | ||||||||
0039732 | ||||||||
Type | Category | Severity | Reproducibility | Date Submitted | Last Update | |||
defect | [Retail Modules] StoreServer | major | have not tried | 2018-12-03 11:13 | 2018-12-11 13:53 | |||
Reporter | mtaal | View Status | public | |||||
Assigned To | mtaal | |||||||
Priority | normal | Resolution | fixed | Fixed in Version | ||||
Status | closed | Fix in branch | Fixed in SCM revision | d145e0803b92 | ||||
Projection | none | ETA | none | Target Version | ||||
OS | Any | Database | Any | Java version | ||||
OS Version | Database version | Ant version | ||||||
Product Version | SCM revision | |||||||
Review Assigned To | AugustoMauch | |||||||
Regression level | ||||||||
Regression date | ||||||||
Regression introduced in release | ||||||||
Regression introduced by commit | ||||||||
Triggers an Emergency Pack | No | |||||||
Summary | 0039732: NPE When routing BP | |||||||
Description | See stacktrace [1] [1] Caused by: org.openbravo.base.exception.OBException: Error while routing a c_bpartner null at org.openbravo.retail.storeserver.synchronization.router.BusinessPartnerRouter.doRouteToNodes(BusinessPartnerRouter.java:62) ~[BusinessPartnerRouter.class:?] at org.openbravo.replication.symmetricds.extensions.AbstractClientFilteredRouter.routeToNodes(AbstractClientFilteredRouter.java:60) ~[AbstractClientFilteredRouter.class:?] at org.openbravo.retail.storeserver.synchronization.router.BusinessPartnerRouter$Proxy$_$$_WeldClientProxy.routeToNodes(BusinessPartnerRouter$Proxy$_$$_WeldClientProxy.java) ~[BusinessPartnerRouter.class:?] at org.jumpmind.symmetric.service.impl.RouterService.routeData(RouterService.java:940) ~[symmetric-core-3.8.24.jar:?] ... 15 more Caused by: java.lang.NullPointerException at org.openbravo.retail.storeserver.synchronization.utils.BusinessPartnerSegmentationUtils.getNodesForBusinessPartner(BusinessPartnerSegmentationUtils.java:299) ~[BusinessPartnerSegmentationUtils.class:?] at org.openbravo.retail.storeserver.synchronization.router.BusinessPartnerRouter.doRouteToNodes(BusinessPartnerRouter.java:58) ~[BusinessPartnerRouter.class:?] at org.openbravo.replication.symmetricds.extensions.AbstractClientFilteredRouter.routeToNodes(AbstractClientFilteredRouter.java:60) ~[AbstractClientFilteredRouter.class:?] at org.openbravo.retail.storeserver.synchronization.router.BusinessPartnerRouter$Proxy$_$$_WeldClientProxy.routeToNodes(BusinessPartnerRouter$Proxy$_$$_WeldClientProxy.java) ~[BusinessPartnerRouter.class:?] at org.jumpmind.symmetric.service.impl.RouterService.routeData(RouterService.java:940) ~[symmetric-core-3.8.24.jar:?] | |||||||
Steps To Reproduce | handle the case that the BP was deleted set null value in BP record standard customer column | |||||||
Proposed Solution | handle case that BP was deleted use Boolean instead of boolean and assume null value = false | |||||||
Tags | No tags attached. | |||||||
Attached Files | ||||||||
Relationships [ Relation Graph ] [ Dependency Graph ] | |
Notes | |
(0108232) hgbot (developer) 2018-12-03 18:31 |
Repository: erp/pmods/org.openbravo.retail.storeserver.synchronization Changeset: 22b7915550a411ff8a41953cb4cdf6dcd77931d1 Author: Martin Taal <martin.taal <at> openbravo.com> Date: Mon Dec 03 18:31:06 2018 +0100 URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.storeserver.synchronization/rev/22b7915550a411ff8a41953cb4cdf6dcd77931d1 [^] Fixes issue 39732: NPE When routing BP Handle null value in safe way, handle bp deletion also --- M src/org/openbravo/retail/storeserver/synchronization/eventhandler/BusinessPartnerEventHandlerForStandardCustomerFlag.java M src/org/openbravo/retail/storeserver/synchronization/eventhandler/GenericEventHandlerForStandardCustomerFlag.java M src/org/openbravo/retail/storeserver/synchronization/router/BusinessPartnerLocationRouter.java M src/org/openbravo/retail/storeserver/synchronization/router/LocationRouter.java M src/org/openbravo/retail/storeserver/synchronization/utils/BusinessPartnerSegmentationUtils.java --- |
(0108364) AugustoMauch (manager) 2018-12-10 16:11 |
There are two topics that should be addressed: - The isObstsynStoreCustomer is a not-null property, so no need to check it safely. It is the businessPartner itself that can be null. - At this point [1], we cannot assume that the change was a business partner deletion. It could also be, for instance, an update on a user that referenced the missing business partner, and the referenced business partner was deleted before the user change was routed. In that case, it seems the proper logic would be: - If business partner is null-> - It change is deletion -> send to all - otherwise (insert or update) -> send to none [1] https://code.openbravo.com/erp/pmods/org.openbravo.retail.storeserver.synchronization/rev/22b7915550a411ff8a41953cb4cdf6dcd77931d1#l5.1 [^] |
(0108376) hgbot (developer) 2018-12-10 22:37 |
Repository: erp/pmods/org.openbravo.retail.storeserver.synchronization Changeset: 9575f92a0a9eef71d6124253d3b7d1898425ab5b Author: Martin Taal <martin.taal <at> openbravo.com> Date: Mon Dec 10 22:24:47 2018 +0100 URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.storeserver.synchronization/rev/9575f92a0a9eef71d6124253d3b7d1898425ab5b [^] Related to issue 39732: NPE When routing BP Backed out changeset 22b7915550a4 --- M src/org/openbravo/retail/storeserver/synchronization/eventhandler/BusinessPartnerEventHandlerForStandardCustomerFlag.java M src/org/openbravo/retail/storeserver/synchronization/eventhandler/GenericEventHandlerForStandardCustomerFlag.java M src/org/openbravo/retail/storeserver/synchronization/router/BusinessPartnerLocationRouter.java M src/org/openbravo/retail/storeserver/synchronization/router/LocationRouter.java M src/org/openbravo/retail/storeserver/synchronization/utils/BusinessPartnerSegmentationUtils.java --- |
(0108378) hgbot (developer) 2018-12-11 07:57 |
Repository: erp/pmods/org.openbravo.retail.storeserver.synchronization Changeset: d145e0803b9252da89c2fb6984ff941988c3d142 Author: Martin Taal <martin.taal <at> openbravo.com> Date: Tue Dec 11 07:57:42 2018 +0100 URL: http://code.openbravo.com/erp/pmods/org.openbravo.retail.storeserver.synchronization/rev/d145e0803b9252da89c2fb6984ff941988c3d142 [^] Fixes issue 39732: NPE When routing BP Handle the delete in the user/bp routers, log error in case bp is found to be deleted later --- M src/org/openbravo/retail/storeserver/synchronization/router/BusinessPartnerRouter.java M src/org/openbravo/retail/storeserver/synchronization/router/UserRouter.java M src/org/openbravo/retail/storeserver/synchronization/utils/BusinessPartnerSegmentationUtils.java --- |
(0108388) AugustoMauch (manager) 2018-12-11 13:53 |
Code reviewed and verified |
Issue History | |||
Date Modified | Username | Field | Change |
2018-12-03 11:13 | mtaal | New Issue | |
2018-12-03 11:13 | mtaal | Assigned To | => mtaal |
2018-12-03 11:13 | mtaal | Triggers an Emergency Pack | => No |
2018-12-03 18:30 | mtaal | Steps to Reproduce Updated | View Revisions |
2018-12-03 18:30 | mtaal | Proposed Solution updated | |
2018-12-03 18:31 | hgbot | Checkin | |
2018-12-03 18:31 | hgbot | Note Added: 0108232 | |
2018-12-03 18:31 | hgbot | Status | new => resolved |
2018-12-03 18:31 | hgbot | Resolution | open => fixed |
2018-12-03 18:31 | hgbot | Fixed in SCM revision | => http://code.openbravo.com/erp/pmods/org.openbravo.retail.storeserver.synchronization/rev/22b7915550a411ff8a41953cb4cdf6dcd77931d1 [^] |
2018-12-09 22:06 | mtaal | Review Assigned To | => AugustoMauch |
2018-12-10 16:11 | AugustoMauch | Note Added: 0108364 | |
2018-12-10 16:11 | AugustoMauch | Status | resolved => new |
2018-12-10 16:11 | AugustoMauch | Resolution | fixed => open |
2018-12-10 22:37 | hgbot | Checkin | |
2018-12-10 22:37 | hgbot | Note Added: 0108376 | |
2018-12-11 07:57 | hgbot | Checkin | |
2018-12-11 07:57 | hgbot | Note Added: 0108378 | |
2018-12-11 07:57 | hgbot | Status | new => resolved |
2018-12-11 07:57 | hgbot | Resolution | open => fixed |
2018-12-11 07:57 | hgbot | Fixed in SCM revision | http://code.openbravo.com/erp/pmods/org.openbravo.retail.storeserver.synchronization/rev/22b7915550a411ff8a41953cb4cdf6dcd77931d1 [^] => http://code.openbravo.com/erp/pmods/org.openbravo.retail.storeserver.synchronization/rev/d145e0803b9252da89c2fb6984ff941988c3d142 [^] |
2018-12-11 13:53 | AugustoMauch | Note Added: 0108388 | |
2018-12-11 13:53 | AugustoMauch | Status | resolved => closed |
Copyright © 2000 - 2009 MantisBT Group |