Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0015709Openbravo ERPA. Platformpublic2011-01-19 19:542011-05-24 10:57
shuehner 
shuehner 
urgentmajorhave not tried
closedfixed 
5
 
 
Core
No
0015709: Orphan jar-files are not deleted from deployed webapp in tomcat when they are not present anymore in WebContent (after upgrade)
If during an upgrade some jar-libraries are no longer needed (i.e. uninstall of a module, jar-library update with name-change) then those old/orphan jar-files are never deleted from the deployed webapp in tomcat (in deploy.mode=class)

But this deletion is required to avoid problem like shown by defect: 15289,15319

However just deleting those jarfile while the tomcat doing that update (assume rebuild popup from MMC is used) is not possible as it will trigger tomcat internal errors as the tomcat classloader assumes that an jar-file which existed on deploy does not disappear.
Two use-cases need to be distinguished:

a.) compile/restart from commandline. No change is needed as implicit assumption already that no tomcat is running when doing the rebuild.

b.) compile/restart from within the rebuild UI. Here no deletion should happen in the rebuild, but instead the deletion should be done in the restart or more explicit between stop and start of tomcat.

closingMay2011
related to defect 00152893.0RC4 closed shuehner Login into just updated rc3 (from 3.0rc2) does not work with errror message in server log 
related to defect 0015319 closed shuehner Once you update from RC2 to RC3 the ERP is not able to restart tomcat by itself 
Issue History
2011-01-19 19:54shuehnerNew Issue
2011-01-19 19:54shuehnerAssigned To => shuehner
2011-01-19 19:54shuehnerModules => Core
2011-01-19 19:55shuehnerRelationship addedrelated to 0015289
2011-01-19 19:55shuehnerRelationship addedrelated to 0015319
2011-01-19 19:57shuehnerNote Added: 0033781
2011-01-20 12:06hgbotCheckin
2011-01-20 12:06hgbotNote Added: 0033789
2011-01-20 12:06hgbotStatusnew => resolved
2011-01-20 12:06hgbotResolutionopen => fixed
2011-01-20 12:06hgbotFixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/c7ebe8961ccba5d2b0f2e130ea5e57511c61f201 [^]
2011-05-24 10:03dalsasuaTag Attached: closingMay2011
2011-05-24 10:57dalsasuaStatusresolved => closed

Notes
(0033781)
shuehner   
2011-01-19 19:57   
If a rebuild is done via the Rebuild UI, but the restart should be done manually and not using the "ant restart.tomcat" task or the 'Restart tomcat' button in the UI. Then the new ant task 'copy.files.jarsync' can be used to manually delete the orphan jarfiles.
(0033789)
hgbot   
2011-01-20 12:06   
Repository: erp/devel/pi
Changeset: c7ebe8961ccba5d2b0f2e130ea5e57511c61f201
Author: Stefan Hühner <stefan.huehner <at> openbravo.com>
Date: Thu Jan 20 12:06:03 2011 +0100
URL: http://code.openbravo.com/erp/devel/pi/rev/c7ebe8961ccba5d2b0f2e130ea5e57511c61f201 [^]

Fixed 15709: On update or uninstall remove orphan jarfiles from deployed webapp
When running with deploy.mode class not only update deployed webapp with new
files but also remove orphan jar files from it.
Note: If running from Rebuild UI (MMC) this is done between tomcat stop & start
instead of directly in the rebuild to not delete the files from under the still
running application.

---
M build.xml
M src-core/src/org/openbravo/base/BuildTask.java
M src/build.xml
---