Patches Installation
Contents
- 1 Instructions for Patches Installation
- 1.1 DISCLAIMER
- 1.2 IMPORTANT NOTICE
- 1.3 Quick Instructions
- 1.4 Detailed Instructions
- 1.4.1 Download patches file from sourceforge
- 1.4.2 Backup your lib/patches.jar, lib/zkpatches.jar and lib/webuiOriginal.war
- 1.4.3 Copy the downloaded file lib/patches.jar
- 1.4.4 Stop the app server
- 1.4.5 RUN_setup
- 1.4.6 Database Migration
- 1.4.7 Start the app server
- 1.4.8 Reinstall local clients if needed
Instructions for Patches Installation
As announced stable versions are going to be maintained for some time (still not determined) for production purposes.
Here are the latest patches files from sourceforge (these download links are always pointing to the latest for your convenience):
You just need to download the latest released patches file, it contains all the classes patched in previous releases
DISCLAIMER
These patches are provided for free from Adempiere community. You're responsible to test it and check the patches fit for your specific needs and project. So, to enforce this we're adding this disclaimer: (Taken from the GPLv3)
15. Disclaimer of Warranty.
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM “AS IS” WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
16. Limitation of Liability.
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
17. Interpretation of Sections 15 and 16.
If the disclaimer of warranty and limitation of liability provided above cannot be given local legal effect according to their terms, reviewing courts shall apply local law that most closely approximates an absolute waiver of all civil liability in connection with the Program, unless a warranty or assumption of liability accompanies a copy of the Program in return for a fee.
IMPORTANT NOTICE
patches.jar file is intended for official releases from Adempiere project
You can do a similar approach with your customized classes using customization.jar file in lib directory.
Just take note that customization.jar classes have greater priority than patches.jar, so if you customized a class that is patched in patches.jar file - it's your responsibility to patch it also in customization.jar (otherwise it won't be taken by the process depicted here)
Quick Instructions
- Download latest patches file from sourceforge.net
- Backup your $ADEMPIERE_HOME/lib/patches.jar
- Copy the downloaded file to $ADEMPIERE_HOME/lib/patches.jar
- Stop the app server (RUN_Server2Stop)
- RUN_setup
- Start the app server (RUN_Server2)
- Reinstall local clients if needed (for java webstart clients the reinstall is automatic)
Same instructions apply to the zkpatches.jar file - both can be downloaded and replaced at the same time.
Detailed Instructions
Download patches file from sourceforge
Please download patches file according to the version you're running (check latest timestamp in download page)
- Download page for all patches in sourceforge here: ADempiere Patches
The naming convention for patches is:
patches_[version]_[date].jar zkpatches_[version]_[date].jar webuiOriginal_[version]_[date].war
i.e. patches_360lts_20101005.jar can be downloaded here: patches_360lts_20101005.jar, the same for zkpatches_not_released_yet and webuiOriginal_not_required_yet
Backup your lib/patches.jar, lib/zkpatches.jar and lib/webuiOriginal.war
Directory: $ADEMPIERE_HOME/lib (it depends where you unzipped the installation release files)
i.e. Windows: C:\Adempiere\lib i.e. Linux : /home/adempiere/Adempiere/lib
In case you have problems with the new downloaded file it's good to preserve the previous (you-know-working) patches.jar.
Suggestion: just rename patches.jar to patches.jar.working_ok, zkpatches.jar to zkpatches.jar.working_ok and webiuOriginal.war to webiuOriginal.war.working_ok
Copy the downloaded file lib/patches.jar
Now you can copy the just-downloaded file to $ADEMPIERE_HOME/lib as patches.jar
following the example:
i.e. Windows: copy patches_360lts_20101005.jar C:\Adempiere\lib\patches.jar i.e. Linux: cp patches_360lts_20101005.jar /home/adempiere/Adempiere/lib/patches.jar
i.e. Windows: copy zkpatches_not_released_yet C:\Adempiere\lib\zkpatches.jar i.e. Linux: cp zkpatches_not_released_yet /home/adempiere/Adempiere/lib/zkpatches.jar
i.e. Windows: copy webuiOriginal_not_required_yet C:\Adempiere\lib\webiuOriginal.war i.e. Linux: cp webuiOriginal_not_required_yet /home/adempiere/Adempiere/lib/webiuOriginal.war
Please take account this command is a copy and rename at the same time. The downloaded file is being copied to lib directory and renamed to patches.jar, and zkpatches.jar (yes, the files you just backed up)
Stop the app server
Now you must stop the app server - it depends on your installation, it can be shutting down adempiere service or running utils/RUN_Server2Stop.[bat/sh]
RUN_setup
Now run the RUN_setup.[bat/sh] - same as you did when you installed the stable version.
You can also run the RUN_silentsetup.[bat/sh]
Database Migration
In some cases the patch is accompanied with some migration scripts, you need to ensure you apply all the migration scripts successfully on your database to avoid posterior problems.
When needed patches are not applied a warning is shown when you log in the system.
Please note that patches.jar are incremental, this is, the latest patches.jar includes all the previous patched classes. But the migration scripts are not, you need to keep a log of the migration scripts applied to avoid applying them the next time you download patches, you just need to apply the new scripts that appeared since last patches installation.
Start the app server
If the previous step finished ok, then you can now start again the app server - it depends on your installation, it can be starting adempiere service or running utils/RUN_Server2.[bat/sh]
Reinstall local clients if needed
If you have clients installed locally (i.e. with the zip client), you must reinstall them. (They also could be used just copying patches.jar to the lib directory on client, but it is recommended to do a complete install - and in fact is better recommended to use java webstart)
For java webstart clients the reinstall is automatic.