IBM Support

How to deploy Sterling Business Center or Field Sales customizations

Question & Answer


Question

Which steps should be followed to include extensions such as custom struts, mashups, Jasper reports, servlets being specific to SBC or SFS etc. in the EAR file?

Cause

If customizations are not placed at the correct position inside the EAR/WAR file, errors like NoClassDefFoundError or ClassNotFoundException can be thrown during launching the SBC or SFS application, for example:

com.ibm.ws.webcontainer.webapp.WebApp logError SRVE0293E: [Servlet Error]-[com.opensymphony.xwork2.ActionSupport]: java.lang.NoClassDefFoundError: com.opensymphony.xwork2.ActionSupport
at java.lang.ClassLoader.defineClassImpl(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:265)

or:

java.lang.NoClassDefFoundError: javax/servlet/ServletConfig
at com.ibm._jsp._systemError._jspInit(_systemError.java:53)
at com.ibm.ws.jsp.runtime.HttpJspBase.init(HttpJspBase.java:77)
at com.ibm.ws.webcontainer.servlet.ServletWrapper.init(ServletWrapper.java:358)

This is due to the fact that application servers use isolation: The code that resides in EAR root is not allowed to access code inside the WAR.

Now when writing custom code, it might use or refer to Sterling code that resides inside the WAR:

import com.sterlingcommerce.ui.web.platform.struts.SCUIXAPIMashupAction;
public class MyCustomMashupAction extends SCUIXAPIMashupAction {

If this code is placed in EAR root using the install3rdparty script, it will throw an error as above during initialization. This is because com.sterlingcommerce.ui.web.platform.struts.SCUIXAPIMashupAction is part of platform_afc_ui_impl_ui.jar that resides in WAR/WEB-INF/lib.

Answer

Any custom code which is specific to the application SBC or SFS (like custom mashups, custom strut actions, specific servlets etc), should be placed inside the WAR. Whereas, Jasper-related JARs can be kept at the EAR root.

1.) Create a custom JAR file containing JSPs/Servlets/struts actions/mashups etc.

2.) Create the following new directory structure: INSTALL_DIR/repository/eardata/<module>/extn/WEB-INF/lib and place this JAR there.

where <module> is e.g. sfs (for Sterling Field Sales) or sbc (for Sterling Business Center)

3.) Create another custom JAR file containing the Jasper reports and run the install3rdParty command on it.

4.) Build and deploy the application.

[{"Product":{"code":"SS6PEW","label":"IBM Sterling Order Management"},"Business Unit":{"code":"BU048","label":"IBM Software"},"Component":"Extensions","Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"9.2.1;9.2;9.1","Edition":"","Line of Business":{"code":"LOB59","label":"Sustainability Software"}}]

Document Information

Modified date:
16 June 2018

UID

swg21605440