Troubleshooting: The application displays an error while modifying or creating a custom error message
The Remote Store displays a custom error message which is shown by the transaction server when you create or modify your own custom error messages on the HCL Commerce remote storefront.
Problem
The transaction server shows the following ECApplicationException with an error
message:
TypedProperty hshNVPs = new TypedProperty();
hshNVPs.put("ErrorCode","2280");
Object[] msgParams = ECMessageHelper.generateMsgParms(new Integer(
this.inMininumRequiredPasswordLength), new Integer(
this.inMinimumRequiredDigits), new Integer(
this.inMinimumRequiredLetters));
hshNVPs.put("excMsgParm", msgParams);
ECApplicationException expTmp = new ECApplicationException(new ECMessage(1L,1,"_ERR_AUTHENTICATION_MINIMUMCAPITALLETTERS_PASSWORD"), super
.getClass().getName(), "validatePasswordCompliance", msgParams, ERRTASK_NAME, hshNVPs); "
This error generally occurs when you define the following error key in properties
files such as the ecServerMessages.properties file in the WC
server and the CRS server.
_ERR_AUTHENTICATION_MINIMUMCAPITALLETTERS_PASSWORD.2280 = Passwords must be at least
{0} characters in length, and include {1} digit(s), {2} letter(s) and a capital letter. Please enter a different password.
This error key must only be defined in the storeErrorMessages.properties files.
Solution
Enter the following code snippet into all of the storeErrorMessages.properties
files.
_ERR_AUTHENTICATION_MINIMUMCAPITALLETTERS_PASSWORD = Passwords must be at least
{0} characters in length, and include {1} digit(s), {2} letter(s) and a capital letter. Please enter a different password.
You will now be able to see the message in the storefront without any error.