UAA job fails with IllegalArgumentException during Java bean `clientAdminBootstrap` initialization
search cancel

UAA job fails with IllegalArgumentException during Java bean `clientAdminBootstrap` initialization

book

Article ID: 298249

calendar_today

Updated On:

Products

VMware Tanzu Application Service for VMs

Issue/Introduction

When deploying VMware Tanzu Application Service (TAS) for VMs, the deployment fails at the UAA VM / UAA job.

The error in UAA logs reports an IllegalArgumentException when initializing bean `clientAdminBootstrap`, due to decoding an invalid base64 string.

The detailed error message could be different based on the base64 string:

[2020-01-27 08:57:13.612] uaa - 6 [main] .... ERROR --- RecognizeFailureDispatcherServlet: Unable to start UAA application.

org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'clientAdminBootstrap' defined in ServletContext resource [/WEB-INF/spring/oauth-clients.xml]: 

Invocation of init method failed; nested exception is java.lang.IllegalArgumentException: Input byte array has incorrect ending byte at 26620
...
        at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:344)
        at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:475)
        
Caused by: java.lang.IllegalArgumentException: Input byte array has incorrect ending byte at 26620
        at java.util.Base64$Decoder.decode0(Base64.java:742)
        at java.util.Base64$Decoder.decode(Base64.java:526)
        at org.springframework.util.Base64Utils$JdkBase64Delegate.decode(Base64Utils.java:232)
        at org.springframework.util.Base64Utils.decode(Base64Utils.java:98)
        at org.cloudfoundry.identity.uaa.client.JdbcClientMetadataProvisioning.lambda$update$0(JdbcClientMetadataProvisioning.java:90)
        at org.springframework.jdbc.core.JdbcTemplate$2.doInPreparedStatement(JdbcTemplate.java:881)
        at org.springframework.jdbc.core.JdbcTemplate$2.doInPreparedStatement(JdbcTemplate.java:876)
        at org.springframework.jdbc.core.JdbcTemplate.execute(JdbcTemplate.java:639)
        at org.springframework.jdbc.core.JdbcTemplate.update(JdbcTemplate.java:876)
        at org.springframework.jdbc.core.JdbcTemplate.update(JdbcTemplate.java:937)
        at org.cloudfoundry.identity.uaa.client.JdbcClientMetadataProvisioning.update(JdbcClientMetadataProvisioning.java:83)
        at org.cloudfoundry.identity.uaa.client.ClientAdminBootstrap.addNewClients(ClientAdminBootstrap.java:244)
        at org.cloudfoundry.identity.uaa.client.ClientAdminBootstrap.afterPropertiesSet(ClientAdminBootstrap.java:136)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1689)
        at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1627)
        ... 61 more


Environment

Product Version: 2.10

Resolution

Got to Ops Manager > VMware Tanzu Application Service > Custom Branding. The login page icon and logo can be configured with base64-encoded PNG image strings. The string must be valid base64 string, otherwise UAA can't decode it during Java bean `clientAdminBootstrap` initialization. 

For example, if the base64 string starts with an incorrect `<` character, UAA will report "Illegal base64 character 3c" in the logs, as "3c" is ASCII code of `<`. 

To resolve the problem, please verify the base64 string with a base64 encode/decode tool and make the change.