"Validation error on supplied value '64': must be less than or equal to 22" error occurs in Cloud Director 10.5.1 Branding Themes UI
search cancel

"Validation error on supplied value '64': must be less than or equal to 22" error occurs in Cloud Director 10.5.1 Branding Themes UI

book

Article ID: 325485

calendar_today

Updated On:

Products

VMware Cloud Director

Issue/Introduction

  • The branding themes page located in the provider portal at 'More > Customize Portal > Themes' fails to load.
  • The message 'validation error on supplied value <number>: must be less than or equal to 22' is displayed.
  • With the log file /opt/vmware/vcloud-director/vcloud-container-debug.log you observe the following error:
ERROR | pool-jetty-<id> | AbstractValidationMethodInterceptor | validation error at method BrandingThemeApi.getBrandingThemes, parameter 5 (field Class.getBrandingThemes.arg1): must be less than or equal to 22 | requestId=<REQUEST_ID>,request=GET https://<VCD_URL>/cloudapi/1.0.0/brandingThemes,requestTime=<REQUEST_TIME>,remoteAddress=<REMOTE_ADDRESS>,userAgent=Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 ...,accept=application/*+json;version 39.0.0-alpha application/json;version 39.0.0-alpha

Environment

VMware Cloud Director 10.5.x

Cause

This issue occurs if a custom restapi.queryservice.maxPageSize setting greater than a value of 22 is applied in the environment.

To validate if this is the case, perform the following checks whilst connected to a Cloud Director cell as root user:

a) Inspect the database settings using the below cell management tool command run from any cell.

/opt/vmware/vcloud-director/bin/cell-management-tool manage-config -n restapi.queryservice.maxPageSize -l

b) Inspect the global.properties file of each cell to see if the value is set locally using the following command.

grep maxPageSize /opt/vmware/vcloud-director/etc/global.properties

Resolution

This matter is resolved in Cloud Director 10.5.1.1 which is available for download here.

Workaround:

To workaround the issue you can perform one of the below:

  1. Remove the custom restapi.queryservice.maxPageSize value from the database using the command command run from any cell.

    /opt/vmware/vcloud-director/bin/cell-management-tool manage-config -n restapi.queryservice.maxPageSize -d

  2. Remove the custom restapi.queryservice.maxPageSize line from the /opt/vmware/vcloud-director/etc/global.properties file on all cells, if present.

    vi /opt/vmware/vcloud-director/etc/global.properties

  3. Set the value to be 22 using this command run from any cell.

    /opt/vmware/vcloud-director/bin/cell-management-tool manage-config -n restapi.queryservice.maxPageSize -v 22