Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0014002Openbravo ERPA. Platformpublic2010-07-19 18:232010-07-24 22:54
marvintm 
marvintm 
urgentmajorsometimes
closedfixed 
5
 
 
Core
No
0014002: When different versions of a modulescript exist in the system, update.database may fail
If more than one different version of a .class file used by a modulescript exist in the system (for example, one in build/classes, and one inside the module folder), then update.database may fail.
- Install module org.openbravo.advpaymentmngt (revision 64c5add7d960)
- update the module repository to latest version
- do update.database. It will fail.
the classpath will be changed so that it gets files from the module folder first, so that this problem doesn't happen.
No tags attached.
Issue History
2010-07-19 18:23marvintmNew Issue
2010-07-19 18:23marvintmAssigned To => marvintm
2010-07-19 18:29hgbotCheckin
2010-07-19 18:29hgbotNote Added: 0029390
2010-07-19 18:29hgbotStatusnew => resolved
2010-07-19 18:29hgbotResolutionopen => fixed
2010-07-19 18:29hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/10a6e520f525fe11824a04ce38219682c57a7808 [^]
2010-07-20 12:27shuehnerNote Added: 0029400
2010-07-20 12:27shuehnerStatusresolved => closed
2010-07-21 00:00anonymoussf_bug_id0 => 3032309
2010-07-24 22:54hudsonbotCheckin
2010-07-24 22:54hudsonbotNote Added: 0029540

Notes
(0029390)
hgbot   
2010-07-19 18:29   
Repository: erp/devel/pi
Changeset: 10a6e520f525fe11824a04ce38219682c57a7808
Author: Antonio Moreno <antonio.moreno <at> openbravo.com>
Date: Mon Jul 19 18:25:56 2010 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/10a6e520f525fe11824a04ce38219682c57a7808 [^]

Fixed issue 14002. Modulescripts with outdated classes won't fail.
Changed the classpath of the build.xml files so that the Java classes in the module folders are loaded first. This fixes a problem which could happen if an older version of a modulescript class used some method or class which no longer exists.

---
M build.xml
M src-db/database/build.xml
---
(0029400)
shuehner   
2010-07-20 12:27   
Change reviewed. Order of classpath entries is changed. Now modules/*/build/classes (which do/should only contain .class files for modulescript & buildvalidations) comes first in the classpath order so the current uptodate script are always used. As no other files will be/should be present in those folder this has no extra impact on other classloading.

Tested using steps to reproduce:
clone the mentioned old module version
ant compile -Dtab=xx to copy older .class files to the 'wrong' location (see 14000)
run update.database
fails with this 14002 changeset applied, works fine with the changeset applied
(0029540)
hudsonbot   
2010-07-24 22:54   
A changeset related to this issue has been promoted to main after passing a series of tests and an OBX has been generated:

Changeset: http://code.openbravo.com/erp/devel/main/rev/10a6e520f525 [^]
Merge Changeset: http://code.openbravo.com/erp/devel/main/rev/eb739d47ff2b [^]
Tests: http://builds.openbravo.com/view/int/ [^]
OBX: http://builds.openbravo.com/erp/core/obx/OpenbravoERP-2.50CI.17900.obx [^]