OMEGAMON Data Connect fails with charset.MalformedInputException

Symptoms

The OMEGAMON® Data Connect log contains the following message:
hh:mm:ss.SSS [main] ERROR org.springframework.boot.SpringApplication - Application run failed
org.yaml.snakeyaml.error.YAMLException: java.nio.charset.MalformedInputException: Input length = 1

Causes

The OMEGAMON Data Connect configuration file config/connect.yaml is incorrectly encoded. The file must be encoded in UTF-8.

Example incorrect encodings:

  • EBCDIC
  • ISO8559-1, where the file includes byte values that are valid in ISO8559-1 but invalid in UTF-8

Resolving the problem

Ensure that the file is valid UTF-8.

For compatibility with common z/OS UNIX tools and applications, the sample connect.yaml is supplied on z/OS UNIX tagged as being encoded in ISO8559-1 (CCSID 819).

The supplied sample file only uses ASCII characters. ASCII characters have 7-bit byte values; byte values under 128. In this case, there is no difference between ISO8859-1 and UTF-8, because both encodings are supersets of ASCII. However, outside of the common subset of ASCII characters, byte values that are valid in ISO8859-1 can be invalid in UTF-8.

If you use an editor that interprets and writes the file using ISO8859-1, only use ASCII characters. Otherwise, you could insert byte values that are invalid in UTF-8.

For example, in ISO8859-1, the byte value X'A9' represents the copyright symbol (©). However, in UTF-8, X'A9' is valid only as a continuation byte in a multi-byte sequence. If you insert a copyright symbol in an editor that uses ISO8859-1, then the file will be invalid UTF-8. Instead, to insert a copyright symbol, your editor must use UTF-8, which will insert the correct 2-byte sequence X'C2A9'.