You are currently reviewing an older revision of this page.
An issue with a bad key encryption occurs when starting tomcat after performing an upgrade of Appian from a version which required the customer to install their own application server.
When starting up tomcat for the first time the following warning is logged within the application server log:
WARNING [HOSTNAME-startStop-1] org.apache.naming.NamingContext.lookup Unexpected exception resolving reference javax.crypto.BadPaddingException: Given final block not properly padded. Such issues can arise if a bad key is used during decryption.
This occurs due to using the wrong encryption for the password section within your <APPIAN_HOME>/tomcat/apache-tomcat/tomcatResources.xml file.
<APPIAN_HOME>/tomcat/apache-tomcat/tomcatResources.xml
Use the Configure Script to encode your data source password and use the output to fill in the password property in your <APPIAN_HOME>/tomcat/apache-tomcat/tomcatResources.xml file.
This article applies to Appian 18.3 and later.