WSO2 Official patch,
Read the readme file.(not a must step, better if you do)
Shutdown the server, if you have already started.
Copy the wso2carbon-version.txt file to /bin.(not a must step,better if you do)
Copy the patchNumber to /repository/components/patches/
Restart the server with :
Linux/Unix : sh wso2server.sh
Windows : wso2server.bat
Patch Created by you
Compile(mvn clean install
) and get the jar from the modified code base. for example, let's say you are creating a patch for carbon-registry extensions. First, clone the carbon-registry and do the fix then go to the extensions module. Using maven build(mvn clean install
) the jar. Then Create a folder with the name of the patch (eg: patch9999) and place the jar(s) inside and copy newly created patch folder (eg: patch9999) to repository/components/patches
. Now simply restart/start the product and the patch will get applied.
./wso2server.sh restart/start
However, if the product is older than carbon 4.2.0 you have to provide -DapplyPatches attribute when starting the product like below.
./wso2server.sh -DapplyPatches
if the patch gets applied successfully you can see below set of lines in the beginning.
[2016-08-24 20:27:25,319] INFO {org.wso2.carbon.server.extensions.PatchInstaller} - Patch changes detected
[2016-08-24 20:27:27,980] INFO {org.wso2.carbon.server.util.PatchUtils.console} - Backed up plugins to patch0000
[2016-08-24 20:27:28,010] INFO {org.wso2.carbon.server.util.PatchUtils.console} - Patch verification started
[2016-08-24 20:27:28,034] INFO {org.wso2.carbon.server.util.PatchUtils.console} - Patch verification successfully completed.