powered by Jive Software

Error archive message data

In my Openfire 4.7.0 build e020f58 with Monitoring Plugin 2.3.0 and Mysql 8.0.27 i receive some errors when archiving data

log…

2022.01.25 08:59:04 e[1;31mERRORe[m [archive-service-worker-3]: org.jivesoftware.openfire.archive.ConversationManager - Unable to archive message data!
java.sql.BatchUpdateException: Incorrect string value: '\xC5\x9Bo me...' for column 'body' at row 1
	at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) ~[?:1.8.0_312]
	at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) ~[?:1.8.0_312]
	at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) ~[?:1.8.0_312]
	at java.lang.reflect.Constructor.newInstance(Constructor.java:423) ~[?:1.8.0_312]
	at com.mysql.cj.util.Util.handleNewInstance(Util.java:192) ~[mysql-connector-java-8.0.27.jar:8.0.27]
	at com.mysql.cj.util.Util.getInstance(Util.java:167) ~[mysql-connector-java-8.0.27.jar:8.0.27]
	at com.mysql.cj.util.Util.getInstance(Util.java:174) ~[mysql-connector-java-8.0.27.jar:8.0.27]
	at com.mysql.cj.jdbc.exceptions.SQLError.createBatchUpdateException(SQLError.java:224) ~[mysql-connector-java-8.0.27.jar:8.0.27]
	at com.mysql.cj.jdbc.ClientPreparedStatement.executeBatchedInserts(ClientPreparedStatement.java:755) ~[mysql-connector-java-8.0.27.jar:8.0.27]
	at com.mysql.cj.jdbc.ClientPreparedStatement.executeBatchInternal(ClientPreparedStatement.java:426) ~[mysql-connector-java-8.0.27.jar:8.0.27]
	at com.mysql.cj.jdbc.StatementImpl.executeBatch(StatementImpl.java:800) ~[mysql-connector-java-8.0.27.jar:8.0.27]
	at org.apache.commons.dbcp2.DelegatingStatement.executeBatch(DelegatingStatement.java:241) ~[commons-dbcp2-2.9.0.jar:2.9.0]
	at org.apache.commons.dbcp2.DelegatingStatement.executeBatch(DelegatingStatement.java:241) ~[commons-dbcp2-2.9.0.jar:2.9.0]
	at org.jivesoftware.openfire.archive.ConversationManager$MessageArchivingRunnable.store(ConversationManager.java:1335) [monitoring-2.3.0.jar!/:4.7.0]
	at org.jivesoftware.openfire.archive.Archiver.run(Archiver.java:154) [xmppserver-4.7.0.jar:4.7.0]
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [?:1.8.0_312]
	at java.util.concurrent.FutureTask.run(FutureTask.java:266) [?:1.8.0_312]
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:1.8.0_312]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:1.8.0_312]
	at java.lang.Thread.run(Thread.java:748) [?:1.8.0_312]
Caused by: java.sql.SQLException: Incorrect string value: '\xC5\x9Bo me...' for column 'body' at row 1
	at com.mysql.cj.jdbc.exceptions.SQLError.createSQLException(SQLError.java:129) ~[mysql-connector-java-8.0.27.jar:8.0.27]
	at com.mysql.cj.jdbc.exceptions.SQLExceptionsMapping.translateException(SQLExceptionsMapping.java:122) ~[mysql-connector-java-8.0.27.jar:8.0.27]
	at com.mysql.cj.jdbc.ClientPreparedStatement.executeInternal(ClientPreparedStatement.java:953) ~[mysql-connector-java-8.0.27.jar:8.0.27]
	at com.mysql.cj.jdbc.ClientPreparedStatement.executeUpdateInternal(ClientPreparedStatement.java:1098) ~[mysql-connector-java-8.0.27.jar:8.0.27]
	at com.mysql.cj.jdbc.ClientPreparedStatement.executeUpdateInternal(ClientPreparedStatement.java:1046) ~[mysql-connector-java-8.0.27.jar:8.0.27]
	at com.mysql.cj.jdbc.ClientPreparedStatement.executeLargeUpdate(ClientPreparedStatement.java:1371) ~[mysql-connector-java-8.0.27.jar:8.0.27]
	at com.mysql.cj.jdbc.ClientPreparedStatement.executeBatchedInserts(ClientPreparedStatement.java:716) ~[mysql-connector-java-8.0.27.jar:8.0.27]
	... 11 more

I think this means that the Monitoring plugin is trying to archive a message that starts with “śo me”. The very first character seems to be this character: Unicode Utilities: Character Properties and apparently, your database can’t store that in this table.

This might be fixed by using a different charset in the database table definition.