Openbravo Issue Tracking System - Openbravo ERP | ||||||||||||
View Issue Details | ||||||||||||
ID | Project | Category | View Status | Date Submitted | Last Update | |||||||
0009780 | Openbravo ERP | A. Platform | public | 2009-07-06 17:53 | 2009-07-27 00:00 | |||||||
Reporter | mtaal | |||||||||||
Assigned To | mtaal | |||||||||||
Priority | normal | Severity | major | Reproducibility | always | |||||||
Status | closed | Resolution | fixed | |||||||||
Platform | OS | 5 | OS Version | |||||||||
Product Version | pi | |||||||||||
Target Version | pi | Fixed in Version | 2.50MP3 | |||||||||
Merge Request Status | ||||||||||||
Review Assigned To | ||||||||||||
OBNetwork customer | ||||||||||||
Web browser | ||||||||||||
Modules | Core | |||||||||||
Support ticket | ||||||||||||
Regression level | ||||||||||||
Regression date | ||||||||||||
Regression introduced in release | ||||||||||||
Regression introduced by commit | ||||||||||||
Triggers an Emergency Pack | No | |||||||||||
Summary | 0009780: Module which add system level information (e.g. ad_ref_list) and add system reference data can not be (un)installed | |||||||||||
Description | This is a description based on the installation of the hcm module (attached). The general problem is that the apply.modules action when initiated from the web interface runs in the same jvm (classloader) as the webapp. I will first describe two specific things with this module: 1) it adds a new treetype and adds system level data which uses this tree type 2) it adds a column to a core table (BusinessPartnerBankAccount) 1) results in a fail during install, when trying to solve 1) --> 2) results in a fail during an uninstall. >> Why does 1) fail First the basic apply.modules process: A) update.database B) apply.module (incl. import of system level reference data) After step A the database has the new model definition (with the new tree-type). However as the in-memory model is not refreshed step B fails as in step B the new tree type is used by imported System level data. Initial solution idea (which does not work because then the uninstall fails): re-initialize the in-memory model after update.database >> Why does 2) fail when we solve 1) In this case the same steps A and B are executed. The module adds a column to BusinessPartnerBankAccount. So during an uninstall after step A, the column is removed from AD_COLUMN. To solve 1), after step A the in-memory model is refreshed. However, the generated classes still have this column, so during the re-initialization of the model the generated class (based on the old model before the uninstall) is encountered and it fails because it sets a default value for a column which does not exist. Initial solution idea for this case: regenerate the entity classes after re-initializing the model. So then the steps would be: A) update.database B) re-initialize in-memory model C) regenerate entity classes D) apply.module However, this flow does not work because the same jvm/classloader is used for all steps (and the webapp as a whole), so eventhough the class files are regenerated and compiled the jvm/classloader will still have the old classes in-memory. So to really solve this the apply.module step in the install and uninstall of a module from the web interface should be running in its own jvm (forked). | |||||||||||
Steps To Reproduce | ||||||||||||
Proposed Solution | ||||||||||||
Additional Information | ||||||||||||
Tags | 250MP3releasecandidate | |||||||||||
Relationships |
| |||||||||||
Attached Files | org.openbravo.hcm.common-1.0.0.obx (221,192) 2009-07-06 17:53 https://issues.openbravo.com/file_download.php?file_id=1517&type=bug | |||||||||||
Issue History | ||||||||||||
Date Modified | Username | Field | Change | |||||||||
2009-07-06 17:53 | mtaal | New Issue | ||||||||||
2009-07-06 17:53 | mtaal | Assigned To | => mtaal | |||||||||
2009-07-06 17:53 | mtaal | File Added: org.openbravo.hcm.common-1.0.0.obx | ||||||||||
2009-07-06 23:27 | hgbot | Checkin | ||||||||||
2009-07-06 23:27 | hgbot | Note Added: 0017947 | ||||||||||
2009-07-06 23:27 | hgbot | Status | new => resolved | |||||||||
2009-07-06 23:27 | hgbot | Resolution | open => fixed | |||||||||
2009-07-06 23:27 | hgbot | Fixed in SCM revision | => http://code.openbravo.com/erp/devel/pi/rev/d3aa261a64fc0882c8e4f2026ad707e2952ae9fc [^] | |||||||||
2009-07-09 16:43 | AinhoaPagola | Note Added: 0018063 | ||||||||||
2009-07-10 10:24 | shuehner | Relationship added | related to 0009822 | |||||||||
2009-07-21 16:24 | psarobe | Fixed in Version | => 2.50MP3 | |||||||||
2009-07-21 16:26 | psarobe | Tag Attached: 250MP3releasecandidate | ||||||||||
2009-07-26 22:05 | psarobe | Status | resolved => closed | |||||||||
2009-07-26 22:05 | psarobe | Note Added: 0018623 | ||||||||||
2009-07-27 00:00 | anonymous | sf_bug_id | 0 => 2827493 |
Notes | |||||
|
|||||
|
|
||||
|
|||||
|
|
||||
|
|||||
|
|