KB-1881 "The schema is invalid" error with "Wrong column type in <table_name> for column <column_name>" thrown during Tomcat startup

Symptoms

Tomcat fails to start with the following errors show in the <APPIAN_HOME>/logs/tomcat-stdOut.log:

ERROR org.springframework.web.context.ContextLoader - Context initialization failed
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.security.filterChains': 
Cannot resolve reference to bean 'org.springframework.security.web.DefaultSecurityFilterChain#54' while setting bean property 'sourceList' 
with key [54]; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 
'org.springframework.security.web.DefaultSecurityFilterChain#54': Cannot resolve reference to bean 'mobileClientValidationFilter' 
while setting constructor argument with key [0]; nested exception is org.springframework.beans.factory.BeanCreationException: 
Error creating bean with name 'mobileClientValidationFilter' defined in ServletContext resource [/WEB-INF/conf/security/spring-security-05-web-api.xml]: 
Cannot resolve reference to bean 'httpBasicAuthenticationEntryPoint' while setting constructor argument; nested exception is 
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'httpBasicAuthenticationEntryPoint' 
defined in ServletContext resource [/WEB-INF/conf/security/spring-security-05-web-api.xml]: Instantiation of bean failed; nested 
exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [com.appiancorp.security.auth.HttpBasicAuthenticationEntryPoint]: 
Constructor threw exception; nested exception is org.springframework.transaction.CannotCreateTransactionException: Could not open JPA EntityManager for 
transaction; nested exception is java.lang.IllegalStateException: [<JNDI_NAME>] The schema is invalid.
...
Caused by: org.hibernate.HibernateException: Wrong column type in <TABLE_NAME> for column <COLUMN_NAME>. Found: varchar, expected: longtext

Cause

An unsupported version of the MySQL connector file is being used. 

Action

  1. Gracefully stop the Appian components following this documentation.
  2. Navigate to <REPO_HOME>\tomcat\apache-tomcat\lib.
  3. Remove the current mysql-connector-java<VERSION_NUMBER>.jar.
  4. Add a supported MySQL connector file to <REPO_HOME>\tomcat\apache-tomcat\lib by reviewing the documentation on supported database connections
  5. Navigate to <APPIAN_HOME>\_admin\_scripts\configure and run configure.bat.
  6. Deploy the configurations to Appian.
  7. Start Appian.

Affected Versions

This article applies to Appian 18.3 and later.

Last Reviewed: March 2019

Related
Recommended