Introduction
The AEM CMS has certain constraints in terms of length or inclusion of some special characters in item or project names, and the AEM connector complies with those principles in the names of your items and projects which you send off for translation in XTM Cloud.
For this reason, you might sometimes come across a pretty generic error in the AEM CMS UI, informing about the failed process to start translation in XTM Cloud:
The next step you should take is to confirm that the issue might indeed be caused by the naming character constraints. For this purpose, browse through AEM logs. Since a great deal of logs are generated on the AEM side, if you contact the XTM International Support team for issue troubleshooting, you will most probably be asked to supply relevant logs from your AEM instance, in the form of a file, especially if the Support team does not have access to your server. Read the following article to find out how to extract logs: AEM: Where are logs located and what information do they contain?.
Details on JCR code-based character restrictions
One of the logs related to naming character restriction looks as follows:
Caused by: com.xtm.aem.rest.openapi.ApiException: {"reason":"Incorrect parameters were passed.","incorrectParameters":"NAME_TOO_LONG"}
That is sometimes the reason the project cannot be started.
Since the AEM CMS is based on the JCR code, see the most important information concerning character constraints that this code imposes:
According to the JCR specification, the following characters are generally forbidden in JCR names:
/ (forward slash),
: (colon) – except as part of a namespace prefix,
[ (left square bracket),
] (right square bracket),
* (asterisk),
' (single quote),
" (double quote),
| (vertical bar),
(space) – specifically leading and trailing spaces are not allowed,
Any control characters (ASCII characters in the range 0 to 31).
These restrictions help maintain consistency and avoid parsing errors or conflicts within the repository.
If you are dealing with node names or property names in JCR, it is important to ensure that they do not contain any of these forbidden characters. If you still need to include any of these characters, consider encoding or otherwise transforming the names to fit within the allowed character set.
For the most accurate and detailed information, refer to the specific version of the JCR specification you are working with or the documentation of the JCR implementation you are using (e.g., Apache Jackrabbit). Jackrabbit Oak – Constraints.
The Java Content Repository (JCR) specification itself does not explicitly define a character limit for node names or property names. However, practical limitations may be imposed by the specific implementation of JCR you are using, as well as underlying storage systems and databases.
For instance, if you are using Apache Jackrabbit, which is a common implementation of JCR, the practical limits are influenced by several factors, including:
Underlying Database Constraints: The database used to store the repository data might have its own limits on string lengths. For example, many relational databases have a limit of 255 characters for column names, which might affect property names.
Path Length: The overall path length (including all node names in the hierarchy) can be constrained by the filesystem or database. This is less about individual name limits and more about the total length of the full path.
Implementation-Specific Constraints: Jackrabbit or other JCR implementations might impose additional constraints for performance or other reasons. These constraints should be documented in the implementation's official documentation.
Namespace and Node Name Length: While the JCR specification does not define a hard limit, it is advisable to keep node and property names within a reasonable length (typically under 255 characters), to avoid issues with various storage back-ends and to ensure good performance.
In the example shown above, the name was simply too long; hence the error.