Classloader Problems

Posted by Unknown on

You will most probably run into these issues when you have a custom jar or an open source jar that you would like to use in you custom WCS logic, here are some basics of how WCS classloader and possible steps to solve the classloader issue.


In general there are two different classloaders that load custom jar files that you may place under stores.war/web-inf/lib - The classloader for Stores WAS loads everything under this directory to classpath.
By default, a Web module has its own Web application archive (WAR) class loader to load the contents of the Web module, which are in the WEB-INF/classes and WEB-INF/lib directories.

This can be used as a technique to quickly deploy your customization to a WC server environment by creating jar of patch that overrides a implementation which was packaged in  WebSphereCommerceServerExtensionsLogic.jar and drop it in stores.war/web-inf/lib

you can also place custom jars under following location, but these would require registering the modules
installedApps/WC_guest_cell/WC_guest.ear
installedApps/WC_guest_cell/WC_guest.ear/lib

InitializationServlet.war is OOB WAR file which is used during startup, OOB EJB's are referenced in META-INF file of this WAR file

If you have the utiliy jar being reference and used in any of the class files in these jars you will have to make an entry in META-INF file of corresponding Jar file.

WebSphereCommerceServerExtensionsData.jar
WebSphereCommerceServerExtensionsLogic.jar

MANIFEST.MF from Stores.war needs to reference these jars if they will be placed right under the WC_ear directory.                          

Sill have a classloader problem?
and enable the trace components com.ibm.ws.classloader.*=all and work with your IBM support for diagnose the issue further.

http://www-01.ibm.com/support/docview.wss?uid=swg21296577





3 comments: