CAST HIGHLIGHT - CLI - Error code 2 - Command Line options parse error

User is getting the error message "ERROR console -- (2) Command Line options parse error"

 

Action Plan

  1. Check the command to find out if all the parameters passed are correct
      1. Check f there are errors like Missing required option(s) [workingDir] and Some characters of the command line may not be escaped properly. Please refer to your shell documentation. It could be because,  Double quotes are not there for workingDir as shown below.  

        Missing required option(s) [workingDir]
        [ERR2] HighlightAutomation --sourceDir C:\Users\ast\source\repos\CastAutomation" --workingDir

        C:\Users\ast\castoutput" --skipUpload failed with code 2
        joptsimple.MissingRequiredOptionsException: Missing required option(s) [workingDir]
        at joptsimple.OptionParser.ensureRequiredOptions(OptionParser.java:426)
        at joptsimple.OptionParser.parse(OptionParser.java:400)
        at com.castsoftware.highlight.CommandLine.run(CommandLine.java:532)
        at com.castsoftware.highlight.HighlightAutomation.main(HighlightAutomation.java:24)
        Some characters of the command line may not be escaped properly. Please refer to your shell documentation.
        Dump of program arguments (separated by newline):
        --sourceDir
        C:\Users\ xxx \source\repos\CastAutomation" –workingDir

         C:\Users\ xxx \castoutput" --skipUpload
        [main] ERROR console -- (2) Command Line options parse error

        The working directory should have been "C:\Users\xxx\castoutput" with Double quotes
      2. The source directory and working directory should be different.
      3. The command should be run in the directory where the HighlightAutomation.jar is located.

 

 

Ticket

49099, 43100

 

Related Pages

Highlight Automated Code Scan (Command Line)

CAST HIGHLIGHT - CLI - Error Codes

CAST HIGHLIGHT - CLI - Error code 3 - Command Line techno discovery error

CAST HIGHLIGHT - CLI - Error code 4 - Command Line analysis error

CAST HIGHLIGHT - CLI - Error code 5 - Command Line result upload error

CAST HIGHLIGHT - CLI - Error code 9 - Command Line unziping jars or zip error

CAST HIGHLIGHT - CLI - Docker - Results Upload - Upload failed with code 5 when using Docker

CAST HIGHLIGHT - CLI - ERROR: Failed to fetch company with id when using  --basicAuth

CAST HIGHLIGHT - CLI - Scan fails for an application with an error Failed to fetch company with id XXXSTDERR

CAST HIGHLIGHT - CLI - ERROR Failed to upload submission for application result id='XXXXXX' with company [name='XXX',id='XXXX'] and application [name='XXX',id=XXXXX] message: 400 highlight.server.client.campaignApplication.update.NoAnalysis

CAST HIGHLIGHT - Results Upload - CLI - UTF-8 "\xE7" does not map to Unicode at perl/FileList.pm line xx

 

Additional Resources

CAST Highlight Troubleshooting Guides

CAST Highlight Product Documentation

 

 

Have more questions? Submit a request

Comments

Powered by Zendesk