You are currently reviewing an older revision of this page.
When attempting to write text containing emojis and certain other Unicode characters to the MySQL business database from a Write to Data Store node, the following error is logged:
ERROR org.hibernate.util.JDBCExceptionReporter - Incorrect string value: 'blah' for column 'blah' at row 1ERROR com.appiancorp.type.external.writetodatastore.WriteToDataStoreCore - Error when trying to write to the data store. com.appiancorp.suiteapi.process.exceptions.SmartServiceException: userMsg[error.duringWrite.userMsg=An error occurred while trying to write to the entity <entity> [id=<uuid>, type=<type> (id=<id>)] (data store: <data store>). Details: org.hibernate.exception.GenericJDBCException: could not insert: [<entity>]: java.sql.SQLException: Incorrect string value: '<value>' for column '<column>' at row <rownum> Data: TypedValue[it=<id>,v={<value>}
This is caused by the default character set configuration of the MySQL database not supporting the full set of unicode characters.
select *from performance_schema.global_variableswhere variable_name like '%character%'or variable_name like '%collation%';
set global character_set_server = 'utf8mb4';set global collation_server = 'utf8mb4_unicode_ci';
Any new tables created will inherit the default character set and collation. However, any tables that are already created with the previous character set and collation will not automatically switch their character set to the new one.
select table_name, column_name, ordinal_position, column_default, is_nullable, data_type, character_maximum_length, character_set_name, collation_name, column_typefrom information_schema.columnswhere character_set_name is not null and table_schema = 'Appian'order by table_name, ordinal_position;
<table_name>
alter table <table_name> convert to character set utf8mb4;
This article applies to all versions of Appian.
Last Reviewed: September 2019