Code Is Not Updating After Deploying In Weblogic Cluster

Code Is Not Updating After Deploying In Weblogic Cluster

Problem Description:

Development team says that their code changes are not reflected after deployment.

Problem Details:

You have been given an EAR file to deploy in a WebLogic cluster and this has been performed correctly from your side, however development team claims that deployment is not proper as sometimes it shows the change and some times not. Moreover you don’t see any issues in any log files or WebLogic admin console.

Suggested Resolution:

WebLogic server internally maintains caching of application files and they are not updated after deploy, due to which you see code update issue. In order to fix this, you have to remove cached files and directories and perform the deployment again.
In WLS 8.1, delete the directory .wlnotdelete, available under domain_directory/server_directory/.wlnotdelete (note that .wlnotdelete is a hidden file, so used ls –a to list)
From WLS 9.0 onwards, delete stage and cache directory available under domain_directory/servers/server_directory/stage and cache.