Product Information > JADE Error Messages and System Messages > 1300 through 1399 - Collection Exception Errors > 1322 - Total key size exceeds 512 characters

1322   Total key size exceeds 512 characters

Cause

This error is raised by the dynamic dictionary addMemberKey method or addExternalKey method if the total size of your keys when concatenated exceeds the dictionary limit of 512 character units.

Action

Ensure that the total concatenated key size is less than or equal to the documented limit of 512 character units.

The limit of 512 character units applies to the total concatenated length of the dictionary key. For example, in practice a single binary key is restricted to exactly 512 octets in an ANSI build and 1024 octets in a Unicode build, since in the Windows UTF16 encoding a character unit is two octets in length. If you have multiple keys of different length, the limit is still precisely 512 octets for ANSI and 1024 octets for Unicode. However, a single string key is restricted to 511 effective characters in that the null termination character subsumes one additional character. If you had two concatenated string keys, they would be limited to 510 characters between them, as each string key requires a null termination character.

The only reason the physical (octet) length doubles in a Unicode system is to enable a schema containing dictionary key definitions that are at the logical (character length) limit in an ANSI system to load in Unicode without exceeding the physical key size limit.