An exception is logged when commenting in Jira that is integrated with Confluence.

Platform notice: Server and Data Center only. This article only applies to Atlassian products on the Server and Data Center platforms.

Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.

*Except Fisheye and Crucible

Summary

When an emoticon or other 4 byte character has been typed/copied into a text field or a comment, Jira displays the emoticon properly, but prints a message like to following to the atlassian-jira.log

com.atlassian.sal.api.net.ResponseException: 500 -
at com.atlassian.mywork.client.reliability.DefaultUnreliableWorker$2.handle(DefaultUnreliableWorker.java:121)
at com.atlassian.mywork.client.reliability.DefaultUnreliableWorker$2.handle(DefaultUnreliableWorker.java:109)
at com.atlassian.applinks.oauth.auth.OAuthApplinksResponseHandler$1.handle(OAuthApplinksResponseHandler.java:122)
at com.atlassian.applinks.oauth.auth.OAuthApplinksResponseHandler.handle(OAuthApplinksResponseHandler.java:78)
at com.atlassian.plugins.rest.module.jersey.JerseyRequest$2.handle(JerseyRequest.java:134)
at com.atlassian.sal.core.net.HttpClientRequest.executeAndReturn(HttpClientRequest.java:102)
at com.atlassian.plugins.rest.module.jersey.JerseyRequest.executeAndReturn(JerseyRequest.java:131)
at com.atlassian.applinks.core.auth.ApplicationLinkRequestAdaptor.execute(ApplicationLinkRequestAdaptor.java:61)
at com.atlassian.applinks.oauth.auth.OAuthRequest.execute(OAuthRequest.java:58)
at com.atlassian.mywork.client.reliability.DefaultUnreliableWorker.send(DefaultUnreliableWorker.java:109)
at com.atlassian.mywork.client.reliability.DefaultUnreliableWorker.access$200(DefaultUnreliableWorker.java:27)
at com.atlassian.mywork.client.reliability.DefaultUnreliableWorker$1$1.run(DefaultUnreliableWorker.java:72)
at com.atlassian.sal.core.executor.ThreadLocalDelegateRunnable.run(ThreadLocalDelegateRunnable.java:34)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)

On the Confluence side the following error is logged in the atlassian-confluence.log:


java.lang.reflect.UndeclaredThrowableException
at com.sun.proxy.$Proxy3406.save(Unknown Source)
at com.atlassian.mywork.host.dao.ao.AONotificationDao.create(AONotificationDao.java:63)
...
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.lang.Thread.run(Thread.java:748)
Caused by: java.sql.SQLException: Incorrect string value: '\xF0\x9F\x98\x89</...' for column 'DESCRIPTION' at row 1
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:965)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3933)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3869)
at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2524)
at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2675)
at com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2465)
at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1915)
at com.mysql.jdbc.PreparedStatement.executeUpdateInternal(PreparedStatement.java:2136)
at com.mysql.jdbc.PreparedStatement.executeUpdateInternal(PreparedStatement.java:2070)
at com.mysql.jdbc.PreparedStatement.executeLargeUpdate(PreparedStatement.java:5187)
at com.mysql.jdbc.PreparedStatement.executeUpdate(PreparedStatement.java:2055)
at com.mchange.v2.c3p0.impl.NewProxyPreparedStatement.executeUpdate(NewProxyPreparedStatement.java:462)
at net.java.ao.ForwardingPreparedStatement.executeUpdate(ForwardingPreparedStatement.java:45)
at net.java.ao.ParameterMetadataCachingPreparedStatement.executeUpdate(ParameterMetadataCachingPreparedStatement.java:10)
at net.java.ao.EntityProxy.save(EntityProxy.java:579)
at net.java.ao.EntityProxy.invoke(EntityProxy.java:115)
... 399 more

Environment

Jira 8.20.1

Confluence 7.4

Diagnosis

Upon closer inspection Jira is running with a supported collation utf8mb4 needed to display 4 byte characters, however Confluence is running with an UTF8 collation that does not support 4 byte characters. 

Solution

Update the collation in the Confluence database to utf8mb4 with the help of the following document.
How to fix the collation and character set of a mysql database manually

Last modified on Aug 18, 2022

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.