Anonymous | Login
Project:
RSS
  
News | My View | View Issues | Roadmap | Summary

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0048893
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Openbravo ERP] A. Platformminoralways2022-03-25 08:052022-03-25 11:59
ReporteralostaleView Statuspublic 
Assigned Toalostale 
PrioritynormalResolutionfixedFixed in VersionPR22Q2
StatusclosedFix in branchFixed in SCM revision
ProjectionnoneETAnoneTarget VersionPR22Q2
OSAnyDatabaseAnyJava version
OS VersionDatabase versionAnt version
Product VersionSCM revision 
Review Assigned To
Web browser
ModulesCore
Regression levelProduction - Confirmed Stable
Regression date2019-07-18
Regression introduced in release3.0PR19Q4
Regression introduced by commithttps://gitlab.com/openbravo/product/openbravo/-/commit/00303fc65a67c7009566bbb7662682c23ba48927 [^]
Triggers an Emergency PackNo
Summary

0048893: MMC cannot update a module merging another one

DescriptionGiven module A with a version 2 that merges module B, and an instance with module A version 1 and module B installed. Scan for updates correctly finds the new A version and detects it will merge B, but an error is thrown when trying to install them.
Steps To Reproduce0. The situation can be emulated executing the following script:
insert into ad_module 
   (ad_module_id,
    ad_client_id,    ad_org_id   ,    createdby   ,    updatedby   ,
    name        ,    version     ,    description ,    javapackage)
values    
   ('D0D3E67E47664CEAB9AA81F712DB9C22',
    '0',  '0'   ,    '0',    '0',
    'Old masterdata fr'        ,    '1.0.100',
    'will be merged' ,    'org.openbravo.france.old');

insert into ad_module 
   (ad_module_id,
    ad_client_id,    ad_org_id   ,    createdby   ,    updatedby   ,
    name        ,    version     ,    description ,    javapackage)
values    
   ('5C4060A3E6CC4A32ADED3252ACD79E82',
    '0',  '0'   ,    '0',    '0',
    'Master Data France - Payment Methods'        ,    '1.0.100',
    'will merge' ,    'org.openbravo.france.paymentmethods');

update ad_system_info set last_dbupdate = now();    


1. As system admin, in Module Management window, Scan for updates
  -> OK: Note and update in Master Data France - Payment Methods is found

2. Click on Install Updates Now
  -> ERROR:
 2022-03-25 07:55:40,438 [http-nio-8080-exec-1] ERROR org.openbravo.erpCommon.ad_forms.ModuleManagement 
- org.openbravo.base.exception.OBException: org.codehaus.jettison.json.JSONException: JSONObject["dependencies"] 
is not a JSONArray.
org.openbravo.base.exception.OBException: org.openbravo.base.exception.OBException: org.codehaus.jettison.json.JSONException: 
JSONObject["dependencies"] is not a JSONArray.
    at org.openbravo.service.centralrepository.ModuleInstallDetail.fromJson(ModuleInstallDetail.java:64) 
~[classes/:?]
    at org.openbravo.erpCommon.modules.VersionUtility.checkRemote(VersionUtility.java:679) ~[classes/:?]
    
at org.openbravo.erpCommon.modules.ImportModule.checkDependenciesId(ImportModule.java:298) ~[classes/:?]
    
at org.openbravo.erpCommon.ad_forms.ModuleManagement.printPageInstall1(ModuleManagement.java:1226) [classes/:?]
    
at org.openbravo.erpCommon.ad_forms.ModuleManagement.doPost(ModuleManagement.java:204) [classes/:?]
    
...
Caused by: org.openbravo.base.exception.OBException: org.codehaus.jettison.json.JSONException: JSONObject["dependencies"] 
is not a JSONArray.
    at org.openbravo.service.centralrepository.Module.fromJson(Module.java:116) ~[classes/:?]
    at org.openbravo.service.centralrepository.Module.fromJson(Module.java:125) ~[classes/:?]
    at org.openbravo.service.centralrepository.ModuleInstallDetail.fromJson(ModuleInstallDetail.java:58) 
~[classes/:?]
    ... 49 more

Proposed SolutionTemporary workaround while the issue is not fixed: manually uninstall the module that will be merged before doing the update.
TagsNo tags attached.
Attached Filespng file icon Selection_240.png [^] (42,105 bytes) 2022-03-25 08:14

- Relationships Relation Graph ] Dependency Graph ]
depends on backport 0048894PR22Q1.2 closedalostale MMC cannot update a module merging another one 
depends on backport 0048895PR21Q4.5 closedalostale MMC cannot update a module merging another one 
caused by feature request 0041104 closedalostale refactor CR services not to depend on axis 

-  Notes
(0136012)
hgbot (developer)
2022-03-25 08:52

Merge Request created: https://gitlab.com/openbravo/product/openbravo/-/merge_requests/543 [^]
(0136047)
hgbot (developer)
2022-03-25 11:59

Directly closing issue as related merge request is already approved.

Repository: https://gitlab.com/openbravo/product/openbravo [^]
Changeset: 3a84a59afeaca1fc25f088dffb15903d186ecf6a
Author: Asier Lostalé <asier.lostale@openbravo.com>
Date: 25-03-2022 08:53:42
URL: https://gitlab.com/openbravo/product/openbravo/-/commit/3a84a59afeaca1fc25f088dffb15903d186ecf6a [^]

fixes BUG-48893: MMC cannot update a module merging another one

When updating a module that is merged, Central Repository replies with
an object that does not contain information about its dependencies (as
they won't be used anyway). We expected this information to always be
available and update crashed when it was not.

---
M src/org/openbravo/service/centralrepository/Module.java
M src/org/openbravo/service/centralrepository/ModuleDependency.java
M src/org/openbravo/service/centralrepository/ModuleInstallDetail.java
---
(0136048)
hgbot (developer)
2022-03-25 11:59

Merge request merged: https://gitlab.com/openbravo/product/openbravo/-/merge_requests/543 [^]

- Issue History
Date Modified Username Field Change
2022-03-25 08:05 alostale New Issue
2022-03-25 08:05 alostale Assigned To => Triage Platform Base
2022-03-25 08:05 alostale Modules => Core
2022-03-25 08:05 alostale Triggers an Emergency Pack => No
2022-03-25 08:09 alostale Relationship added caused by 0041104
2022-03-25 08:12 alostale Regression level => Production - Confirmed Stable
2022-03-25 08:12 alostale Regression date => 2019-07-18
2022-03-25 08:12 alostale Regression introduced in release => 3.0PR19Q4
2022-03-25 08:12 alostale Regression introduced by commit => https://gitlab.com/openbravo/product/openbravo/-/commit/00303fc65a67c7009566bbb7662682c23ba48927 [^]
2022-03-25 08:13 alostale Assigned To Triage Platform Base => alostale
2022-03-25 08:14 alostale File Added: Selection_240.png
2022-03-25 08:15 alostale Status new => scheduled
2022-03-25 08:15 alostale Target Version => PR22Q2
2022-03-25 08:52 hgbot Note Added: 0136012
2022-03-25 11:59 hgbot Resolution open => fixed
2022-03-25 11:59 hgbot Status scheduled => closed
2022-03-25 11:59 hgbot Fixed in Version => PR22Q2
2022-03-25 11:59 hgbot Note Added: 0136047
2022-03-25 11:59 hgbot Note Added: 0136048


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker