You are currently reviewing an older revision of this page.

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

Symptoms

Appian starts successfully, but when starting tomcat, tomcat fails to start during verifying schema.

YYYY-MM-DD HH:MM:SS.mmm [localhost-startStop-1] INFO com.appiancorp.common.persistence.search.SearchServerClientConfiguration - Using the Search Server client configuration specified in appian-topology.xml.
YYYY-MM-DD HH:MM:SS.mmm [localhost-startStop-1] INFO com.appiancorp.rdbms.hb.DataSourceManagerHbImpl - [<JNDI_NAME>] Checking schema and migrating if necessary (appian/db/changelog/db-changelog-master.xml)...
YYYY-MM-DD HH:MM:SS.mmm [localhost-startStop-1] INFO com.appiancorp.rdbms.hb.DataSourceManagerHbImpl - [<JNDI_NAME>] Schema check/migration completed successfully.
YYYY-MM-DD HH:MM:SS.mmm [localhost-startStop-1] INFO com.appiancorp.rdbms.hb.DataSourceManagerHbImpl - [<JNDI_NAME>] Verifying that entity mappings match the schema...
YYYY-MM-DD HH:MM:SS.mmm [localhost-startStop-1] INFO com.appian.dl.repo.es.client.TransportClientManager - Shutting down client.
YYYY-MM-DD HH:MM:SS.mmm [localhost-startStop-1] ERROR org.springframework.web.context.ContextLoader - Context initialization failed

The <APPIAN_HOME>\logs\tomcat-stdOut.log file shows the following errors:

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: [jdbc/AppianConfigDS] The schema is invalid.

 

Caused by: org.hibernate.HibernateException: Wrong column type in <TABLE_NAME> for column <COLUMN_NAME>. Found: varchar, expected: longtext

Cause

 The MySQL connector file, located in: <APPIAN_HOME>\tomcat\apache-tomcat\lib being used is an unsupported version. 

Action

  1. Gracefully shutdown Appian and Tomcat.
  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 following Appian Documentation: Supported Connector Version.
  5. Navigate to <APPIAN_HOME>\_admin\_scripts\configure and run configure.bat.
  6. Deploy the configurations to Appian.
  7. Start Appian and Tomcat.

Workaround

  1. Gracefully shutdown tomcat.
  2. Navigate to <APPIAN_HOME>\tomcat\apache-tomcat\lib and find the mysql-connector-java<VERSION_NUMBER>.jar file.
  3. Remove the current mysql-connector-java<VERSION_NUMBER>.jar.
  4. Add a supported MySQL connector file to <APPIAN_HOME>\tomcat\apache-tomcat\lib by reviewing the following Appian Documentation: Supported Connector Version.
  5. Start tomcat.

Affected Versions

This article applies to Appian 18.3 and above where Tomcat is the supported Application Server.