You are currently reviewing an older revision of this page.

DRAFT KB-XXXX Tomcat fails with "BadPaddingException"

Symptoms

Tomcat fails with one of the following errors in <APPIAN_HOME>/logs/tomcat-stdOut.log:

ERROR org.hibernate.connection.DatasourceConnectionProvider - Could not find datasource: jdbc/AppianDS
javax.naming.NameNotFoundException: Name [jdbc/AppianDS] is not bound in this Context. Unable to find [jdbc].
WARNING [localhost-startStop-1] org.apache.catalina.core.NamingContextListener.addResource Failed to register in JMX: [javax.naming.NamingException: Unexpected exception resolving reference [Root exception is javax.crypto.BadPaddingException: Given final block not properly padded]]
WARNING [localhost-startStop-1] org.apache.naming.NamingContext.lookup Unexpected exception resolving reference
javax.crypto.BadPaddingException: Given final block not properly padded.

Cause

When the configure script is run, the content in tomcatResources.xml.<ENVIRONMENT> is copied to suite.xml in <APPIAN_HOME>\tomcat\apache-tomcat\conf\Catalina\localhost.

These errors occur if this content does not copy over correctly or if suite.xml is configured improperly.

Action

  1. Ensure tomcatResources.xml.<ENVIRONMENT> is configured according to installation documentation and manually copy the entire contents of it to suite.xml in between the lines:
    <!-- BEGIN DATASOURCE -->
    <!-- END DATASOURCE -->
  2. Restart Tomcat.

Affected Versions

This article applies to Appian 18.3 and later.

Last Reviewed: September 2018