Userservice command line utility fails in FOM 402-HF11

Userservice command line utility fails in FOM 402-HF11

book

Article ID: KB0072283

calendar_today

Updated On:

Products Versions
TIBCO Fulfillment Order Management 4.0.2 HF-11

Description

When using userservice utility ($AF_HOME/bin/userservice.sh) in FOM 4.0.2 + HF011, "Error: Could not find or load main class com.tibco.aff.oms.client.UserServiceApp" error is returned. This is encountered for all the operations (add/delete users...).

Ex:
===
$AF_HOME/bin/userservice.sh -help
/opt/SP/tibco/af/4.0/bin
******************************************************************************************
******************************************************************************************
Current JAVA_HOME /opt/SP/tibco/af/4.0/bin/../../../tibcojre64/1.8.0
java version "1.8.0_181"
Java(TM) SE Runtime Environment (build 1.8.0_181-b13)
Java HotSpot(TM) 64-Bit Server VM (build 25.181-b13, mixed mode)
******************************************************************************************
******************************************************************************************
Error: Could not find or load main class com.tibco.aff.oms.client.UserServiceApp
===

Issue/Introduction

This KB article explains how to resolve "Error: Could not find or load main class com.tibco.aff.oms.client.UserServiceApp" error hit when using userservice utility (userservice.sh or userservice.bat) in FOM_4.0.2HF11.

Environment

ALL

Resolution

This is due to a library path issue in userservice.sh and userservice.bat files. Actually, in HF11, "externalLib" directory is used instead of "lib" directory. So updating the classpath in userservice.sh and userservice.bat files is needed. To resolve the issue, please change the following:
===
java -DAF_OMS_CONTEXT_URL=$AF_OMS_CONTEXT_URL -classpath ../lib/commons-codec-1.4.jar:../lib/omsCommon-4.0.2-SNAPSHOT.jar:../lib/commons-logging-1.1.1.jar:../lib/httpclient-4.4.1.jar:../lib/httpcore-4.0.1.jar:../lib/spring-core-4.3.19.RELEASE.jar:../lib/spring-oxm-4.3.19.RELEASE.jar:../lib/spring-web-4.3.19.RELEASE.jar:../lib/spring-context-4.3.19.RELEASE.jar:../lib/spring-beans-4.3.19.RELEASE.jar:../lib/spring-expression-4.3.19.RELEASE.jar:../lib/userClient.jar com.tibco.aff.oms.client.UserServiceApp $action $actionval $adminuser $adminuserval $adminpwd $adminpwdval $username $usernameval $userpwd $userpwdval $userrole $userroleval
===

to
===
java -DAF_OMS_CONTEXT_URL=$AF_OMS_CONTEXT_URL -classpath ../externalLib/commons-codec-1.4.jar:../externalLib/omsCommon-4.0.2-SNAPSHOT.jar:../externalLib/commons-logging-1.1.1.jar:../externalLib/httpclient-4.4.1.jar:../externalLib/httpcore-4.0.1.jar:../externalLib/spring-core-4.3.19.RELEASE.jar:../externalLib/spring-oxm-4.3.19.RELEASE.jar:../externalLib/spring-web-4.3.19.RELEASE.jar:../externalLib/spring-context-4.3.19.RELEASE.jar:../externalLib/spring-beans-4.3.19.RELEASE.jar:../externalLib/spring-expression-4.3.19.RELEASE.jar:../externalLib/userClient.jar com.tibco.aff.oms.client.UserServiceApp $action $actionval $adminuser $adminuserval $adminpwd $adminpwdval $username $usernameval $userpwd $userpwdval $userrole $userroleval

===

Please note this issue is fixed in FOM 402-HF12.