CLI Error: Could not find or load main class

book

Article ID: 41797

calendar_today

Updated On:

Products

DSERIES- SERVER CA Workload Automation DE - System Agent (dSeries)

Issue/Introduction

Issue: 

CLI Error: Could not find or load main class
 -Dserver1.host=: not found

 

Environment:  

Unix, Linux, Windows

 

Cause: 

The Command Line Interface (CLI) uses the cli script; cli.sh (Unix/Linux) or cli.bat (Windows) to issue commands against the DE Server and Agents.

The problem was caused by the white space added in the cli script after the line

-Dlog.directory=${CAWA_HOME}/logs \

In the java command options;

"${JAVA_HOME}/bin/java" \
    -Dlog4j.configuration=file:///${CAWA_HOME}/conf/cli.log4j.xml \
    -Dlog.directory=${CAWA_HOME}/logs \
    -Dserver1.host="${PREFERRED_SRV}" \
    -Dserver1.port="${PREFERRED_SRV_PORT}" \
    -Dserver2.host="${STANDBY_SRV}" \
    -Dserver2.port="${STANDBY_SRV_PORT}" \
    -cp "${CLASSPATH}" com.cybermation.library.cli.CliRepl "[email protected]"

Which resulted in the error message;

Unix/Linux - CLI command: Could not find or load main class
                   -Dserver1.host=: not found

Windows - '-Dserver1.host' is not recognized as an internal or external command

 

Resolution:

1. Edit the cli script located in <DE_Install_dir>/bin directory

2. Remove the white space after the line

-Dlog.directory=${CAWA_HOME}/logs \

3. Save the change

 

Environment

Release: DSWAHA01300-12-Workload Automation DE-High Availability
Component: