About Me
Facebook
Facebook
Linked In
Linked In
Twitter
Twitter
YouTube
YouTube
Google +
Google +

Wednesday, February 12, 2014

Clearing the Java class caches in IBM WAS, WPS & WESB

Abstract:
Instructions on clearing the java class caches in IBM WebSphere Application Server, WPS & WESB. The JVM's shared class cache and WebSphere Application Server's, WebSphere Process Server and WESB OSGi class cache.
Resolution:
The main reason behind cleaning caches is to delete old class references which have been taken the WebSphere Servers. After an upgrade, it is possible that the class caches are still holding onto previous versions of classes. It is also possible that the caches became corrupted. The best practice to keep our server with updated classes is to clean caches after upgrade of applications.
We need to clean two caches, the JVM's cache and the OSGi cache. The server has to be stopped before clearing the cache.

To clear the OSGi class cache:
For UNIX platforms, run the following script in each profile:
<WebSphere_HOME>/profiles/profile_name/bin/osgiCfgInit.sh
Example:
WAS: /app/wasv7/profiles/was01/bin/osgiCfgInit.sh
WPS: /app/wpsv7/profiles/wps01/bin/osgiCfgInit.sh
WESB: /app/wesbv7/profiles/wesb01/bin/osgiCfgInit.sh
For Windows platforms, run the following script in each profile:
<WebSphere_HOME>\profiles\profile_name\bin\osgiCfgInit.bat
Example:
WAS: C:\IBM\WebSphere\AppServer\bin\osgiCfgInit.bat
WPS: C:\IBM\WID7_WTE\runtimes\bi_v7\profiles\qwps\bin\osgiCfgInit.bat
WESB: C:\IBM\WID7_WTE\runtimes\bi_v7\profiles\qesb\bin\osgiCfgInit.bat

To clear the JVM class cache:
For UNIX platforms, run the following script in each profile:
<WebSphere_HOME>/bin/clearClassCache.sh
Example:
WAS: /app/wasv7/profiles/AppServer/bin/clearClassCache.sh
WPS: /app/wpsv7/profiles/wps01/bin/clearClassCache.sh
WESB: /app/wesbv7/profiles/wesb01/bin/clearClassCache.sh
For Windows platforms, run the following script:
<WebSphere_HOME>\bin\clearClassCache.bat
Example:
WAS: C:\IBM\WebSphere\AppServer\bin\clearClassCache.bat
WPS: C:\IBM\WID7_WTE\runtimes\bi_v7\profiles\qwps\bin\clearClassCache.bat
WESB: C:\IBM\WID7_WTE\runtimes\bi_v7\profiles\qesb\bin\clearClassCache.bat

And clear the following directory contents:
<WinUsers_home>\Local Settings\ApplicationData\javasharedresources\


Where WinUsers_home is either C:\Documents and Settings\DefaultUserOR C:\Users depending on your current version of Windows.

1 comments :

Post a Comment

Designed By AMEER BASHA G