Skip to content

Messages

Dave Nicolette edited this page Feb 11, 2021 · 19 revisions

Home -> User Guide ->

This document was last updated on February 11, 2021.

Messages emitted by Cobol Check

These messages may be attached to an exception or written to a log.

Messages prefixed with "ERR" cause the tool to stop.

ERRxxx

Cobol Check halts

ERR001: variableName is null on entry to classname.methodName() method.

This accompanies PossibleInternalLogicErrorException when the cause is a null reference that should not occur at that point in the application. Typical cause is a caller does not ensure a reference is non-null before making a call. This can happen inadvertently when we modify the calling code.

ERR002: configFilePath does not contain an entry for configKeyValue.

This means a configuration setting that is necessary for the application is missing. You need to add an entry (or entries) in configFilePath with the key or keys given in configKeyValue. The problem can also occur when you're pointing to the wrong config file, and the one you're using doesn't have that entry.

ERR003: IOException accessing config file configFilePath in Config.load(configResourceName).

There was a problem accessing the configuration file at the indicated location. The most likely cause is the file does not exist at that location. Another cause may be read permissions are not set (details vary by platform). Finally, the file may exist but is corrupted; this is unlikely, but possible.

ERR004: Expecting an argument for command line option <option> but got <another option>.

Command line options and arguments were not specified in the correct order. The tool cannot proceed, as it does not know what you want to do. You can try running the tool with the "--help" option to get usage hints.

ERR005: Command line option specification string passed to GetOpt was null.

This is an internal logic error in the tool. The GetOpt class is used only by the main class of the tool. It is not exposed externally. The cause of the error will be in the Driver class. The error can only occur because the string is null on the GetOpt constructor call.

ERR006: Expecting a command line option but got <something else>.

A possible cause is that you forgot to put a dash or dashes on the front of a command line option. The tool cannot proceed, as it does not know what you want to do. For example, you might have typed "config-file foo" instead of "--config-file foo".

Another possibility is you left a space in the middle of an option argument value, like this:

"--config-file my-config file.properties" when you intended "--config-file my-config-file.properties"

It is also possible you typed two arguments in succession and forgot to include an option, like this:

"--config-file foo warn" when you intended "--config-file foo --log-level warn".

ERR007: Generator.runSuite() empty input stream (cobolSourceIn).

This means the Cobol source file for the code under test was empty.

ERR008: %1$s expected to find a copybook name following COPY verb in <%2$s>.

During copybook expansion, cobol-check encountered a COPY statement that was not followed by the name of a copybook. The run is aborted.

ERR009: Undefined keyword <%1$s> was encountered while parsing a test suite.

At a point in the a suite where cobol-check expected to find one of its own keywords, it found something else (or nothing) instead. The run is aborted. The offending token might be a valid keyword, but was found in a context where it makes no sense. This can happen when we mis-type something, like this:

EXPECT TO BE 'value'

or

EXPECT WS-FIELDNAME FALSE

ERR010: Generator.parseTestSuite() empty input stream (testSuiteReader).

The Generator found no data in the test suite input source. This is probably an internal logic error in cobol-check, as the Generator should not be invoked at all when the test suite is empty.

ERR011: Test suite input file not found: filename. Define in config as test.suite.path or on command line as --test-suite-path.

A test suite file specified in the configuration setting test.suite.path or on the command-line option --test-suite-path was not found. The filename may have been mis-keyed or the file may not be located where specified.

ERR012: There was a problem creating or writing the concatenated test suite input file: path.

Multiple test suite input files are concatenated into a single file which is passed along to the Generator to be merged with the program under test. When an exception occurs during creation of this concatenated file, Cobol Check throws ConcatenatedTestSuiteIOException with this message. The most likely cause is permission settings on the file or a directory on its path.

ERR013: TestSuiteConcatenator.concatenateTestSuites() caught IOException while processing test_suite_glob.

An IOException was thrown during Files.walkFileTree() when the TestSuiteConcatenator is looking for test suite files that match an argument passed on the --tests command-line option. This "should not" (magic words) be possible unless a modification to the cobol-check code caused a regression.

ERR014: TestSuiteConcatenator.concatenateTestSuites() caught IOException while reading testsuite files under directory test_suite_directory.

An IOException was thrown while reading test suite files under directory _test_suite_directory. This "should not" (magic words) be possible unless a modification to the cobol-check code caused a regression.

ERR015: TestSuiteConcatenator.concatenateTestSuites() caught IOException while converting the concatenated testsuite file from WRITER to READER.

An IOException was thrown while creating a concatenated testsuite file. This "should not" (magic words) be possible unless a modification to the cobol-check code caused a regression.

ERR016: Driver.prepareInputAndOutputFiles() caught IOException while creating the WRITER to produce the test program for programname.

An IOException was thrown while creating the WRITER to create the test copy of program programname. This "should not" (magic words) be possible unless a modification to the cobol-check code caused a regression.

ERR017: Driver caught IOException while closing the WRITER for test program programname after returning from merge.

An IOException was thrown when the Driver attempted to close the WRITER it had just written to. This "should not" (magic words) be possible unless a modification to the cobol-check code caused a regression.

ERR018: Driver caught IOException attempting to create READER for the program under test programname.

An IOException was thrown when the Driver attempted to create a READER to read the source of the program under test. This "should not" (magic words) be possible unless a modification to the cobol-check code caused a regression.

ERR019: Driver caught IOException while walking the testsuite directory tree for the program under test programname.

This "should not" (magic words) be possible unless a modification to the cobol-check code caused a regression.

ERR020: LinuxProcessLauncher was invoked without a test program name.

This "should not" (magic words) be possible unless a modification to the cobol-check code caused a regression.

ERR021: No script name found in config for key %1$s.

This "should not" (magic words) be possible unless a modification to the cobol-check code caused a regression.

ERR022: No script directory name found in config for key %1$s.

This "should not" (magic words) be possible unless a modification to the cobol-check code caused a regression.

ERR023: Process failed to start with arguments: scriptname, programname.

A ProcessLauncher instance tried to start an OS process as defined in config setting xxxx.process, passing the name of the script and the name of the test program to be compiled and executed, but the process could not be started. This may be caused by a mis-named config setting, a script file in a different directory than specified in config setting cobolcheck.script.directory, a permissions problem, or a programming error.

ERR024: Generator.insertExpandedCopyStatements() copyTokens list is empty or 1st entry is not COPY.

This cannot be caused by user error. It indicates logic in the Generator class has a regression. When the Generator encounters a COPY statement under an FD in the program under test, it expands the copybook and copies the source lines to Working-Storage. This message means the method that performs the copy expansion was called with a list of tokens (from the source line(s) containing the COPY statement) that is empty or whose first entry is not the word, "COPY". Report this to the project maintainers.

ERR025: Unknown command line argument value was passed.

The user entered a command-line option that is not defined for cobol-check. Try cobolcheck --help for information about command-line options.

WRNxxx

Cobol-check does not halt, but it may not be doing what you think it's doing.

WRN001: No test suite directory for program %1$s was found under directory %2$s.

A program name was specified in command-line option --programs for which a corresponding subdirectory does not exist under the test suite directory given in config option test.suite.directory.

For example, if you specify this config setting:

test.suite.directory = src/test/cobol

and execute cobol-check with this command line:

cobolcheck -p ALPHA 

then cobol-check will look for test suite files in a directory named [project-root]/src/test/cobol/ALPHA.

WRN002: No test suite files were found under directory [directory-name]

A test suite subdirectory was found for a program name given in command-line option --programs, but it contained no test suite files that matched the filename glob given in --tests, or no test suite files at all if the --tests option was not given on the command line.

WRN003: DirectoryNameMatcher caught IOException on file filename.

After the filename matched a filename glob, an IOException was caught when trying to reference the file while concatenating test suite files. Cobol Check attempts to continue processing.

INFxxx

INF001: Attempting to load config from configFilePath.

Class Config method load() logs this message at the info level just before it tries to load the configuration data.

INF002: Config loaded successfully from configFilePath.

Class Config method load() logs this message on completion of loading and computing the configuration settings.

INF003: Cobol-Check starting

Informational message emitted when Cobol Check starts batch execution.

INF004: Cobol-Check terminating

Informational message emitted when Cobol Check ends batch execution.

INF005: Log level is FATAL | ERROR | WARN | INFO | DEBUG | TRACE

Informational message emitted during batch startup when the log level is INFO or higher.

INF006: Configuration settings: production | test | user-defined

Informational message emitted during batch startup when the log level is INFO or higher. Indicates which configuration file was read. Echoes the value of config.loaded in that config file.

INF007: Concatenating test suite input file path-to-a-test-suite-file to path-to-concatenated-test-suite-file.

During startup, Cobol Check concatenates test suite input files into a single file to pass along to the Generator. This is an informational message to state which input file is about to be concatenated. In case of problems creating the concatenated file, this message may help with debugging.

INF008: About to launch process: processname, programname

The Driver is about to launch an OS process to compile and execute a test program that the Generator produced by merging testsuites with the program to be tested.

INF009: Process processname ended with exit code exitcode.

The OS process to compile and execute a test program has finished. Exit code 0 (zero) means all test cases passed. Exit code 4 means at least one test case failed. Any other value indicates an error and should be investigated.

Clone this wiki locally