GRLoader ends with Exit Code:2

Document ID : KB000111034
Last Modified Date : 14/08/2018
Show Technical Document Details
Issue:
When running GRLoader, "Exit Code:2" is received.  

For example, from the "C:\PROGRA~2\CA\SERVIC~1\samples\GRLoader", run the GRLoader command with parameters like these:
 
grloader -s http://localhost:8080 -i grloader_sample_spreadsheet.xlsx -u servicedesk -p mypassword -a -E 

The result could be:

Error returned from command. Command: "C:/Program Files (x86)/CA/SC/jre/1.8.0_171/bin/java.exe" -Xmx512M -cp .;"C:/PROGRA~2/CA/SERVIC~1/java/lib" -jar "C:/PROGRA~2/CA/SERVIC~1/java/lib/GRLoader.jar" -s http://localhost:8080 -i grloader_sample_spreadsheet.xlsx -u servicedesk -p interOP@123 -a -E -N "C:/PROGRA~2/CA/SERVIC~1" . Exit Code:2
Environment:
CA Service Desk Manager 14.1.03
Cause:
The error has been seen when the JRE installed is 1.8.0_171 and the location specified in the NX.env does not exist.

 
Resolution:
  1. Find the value of NX_JRE_INSTALL_DIR in the NX.env file.  Confirm that the path exists on the server.
  2. Ensure that the JRE is installed in that directory (i.e. there is a lib and bin subdirectory and other files of the JRE as expected).