After upgrading Service Management, seeing error "Customer notifications missing"
Platform Notice: Data Center - This article applies to Atlassian products on the Data Center platform.
Note that this knowledge base article was created for the Data Center version of the product. Data Center knowledge base articles for non-Data Center-specific features may also work for Server versions of the product, however they have not been tested. 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
Problem
After performing an upgrade to Jira Service Management, seeing this error in UI:
Attempting to restore email rules doesn't work and causes the following to appear in atlassian-jira.log
2017-03-02 16:43:54,042 http-nio-8880-exec-4 ERROR xxxxxx 1003x1370x1 xxxxxx x.x.x.x,x.x.x.x /rest/servicedesk/notifications/1/misconfiguration/EXAMPLE/fix [c.a.p.r.c.error.jersey.ThrowableExceptionMapper] Uncaught exception thrown by REST service: Failed to insert rule component configuration data
com.atlassian.servicedesk.plugins.automation.internal.configuration.ruleset.dao.RuleSetDaoException: Failed to insert rule component configuration data
at com.atlassian.servicedesk.plugins.automation.internal.configuration.common.dao.QueryDslDaoHelper.executeWithExceptionMessage(QueryDslDaoHelper.java:55)
at com.atlassian.servicedesk.plugins.automation.internal.configuration.common.dao.QueryDslDaoHelper.executeExpectingNRowUpdates(QueryDslDaoHelper.java:65)
at com.atlassian.servicedesk.plugins.automation.internal.configuration.ruleset.dao.querydsl.ConfigDataDao.create(ConfigDataDao.java:35)
at com.atlassian.servicedesk.plugins.automation.internal.configuration.ruleset.dao.querydsl.ThenActionConfigDao.create(ThenActionConfigDao.java:53)
at com.atlassian.servicedesk.plugins.automation.internal.configuration.ruleset.dao.querydsl.IfThenDao.insertThenActionConfigs(IfThenDao.java:93)
at com.atlassian.servicedesk.plugins.automation.internal.configuration.ruleset.dao.querydsl.IfThenDao.create(IfThenDao.java:57)
at com.atlassian.servicedesk.plugins.automation.internal.configuration.ruleset.dao.querydsl.RuleDao.insertIfThens(RuleDao.java:89)
at com.atlassian.servicedesk.plugins.automation.internal.configuration.ruleset.dao.querydsl.RuleDao.create(RuleDao.java:58)
at com.atlassian.servicedesk.plugins.automation.internal.configuration.ruleset.dao.querydsl.RuleSetRevisionDao.insertRules(RuleSetRevisionDao.java:126)
at com.atlassian.servicedesk.plugins.automation.internal.configuration.ruleset.dao.querydsl.RuleSetRevisionDao.create(RuleSetRevisionDao.java:76)
at com.atlassian.servicedesk.plugins.automation.internal.configuration.ruleset.dao.querydsl.RuleSetDaoImpl.insertRuleSetRevisionAndUpdateActiveRevisionId(RuleSetDaoImpl.java:139)
at com.atlassian.servicedesk.plugins.automation.internal.configuration.ruleset.dao.querydsl.RuleSetDaoImpl.lambda$create$0(RuleSetDaoImpl.java:84)
at com.atlassian.pocketknife.internal.querydsl.DatabaseAccessorImpl.lambda$execute$0(DatabaseAccessorImpl.java:68)
at com.atlassian.sal.core.rdbms.DefaultTransactionalExecutor.executeInternal(DefaultTransactionalExecutor.java:91)
at com.atlassian.sal.core.rdbms.DefaultTransactionalExecutor$1.execute(DefaultTransactionalExecutor.java:45)
at com.atlassian.sal.jira.rdbms.JiraHostConnectionAccessor.lambda$borrowConnectionAndExecute$0(JiraHostConnectionAccessor.java:62)
at com.atlassian.jira.database.DatabaseAccessorImpl.executeQuery(DatabaseAccessorImpl.java:67)
... 2 filtered
at java.lang.reflect.Method.invoke(Method.java:498)
at com.atlassian.plugin.util.ContextClassLoaderSettingInvocationHandler.invoke(ContextClassLoaderSettingInvocationHandler.java:26)
at com.sun.proxy.$Proxy146.executeQuery(Unknown Source)
... 2 filtered
at java.lang.reflect.Method.invoke(Method.java:498)
at com.atlassian.plugin.osgi.bridge.external.HostComponentFactoryBean$DynamicServiceInvocationHandler.invoke(HostComponentFactoryBean.java:136)
at com.sun.proxy.$Proxy146.executeQuery(Unknown Source)
at com.atlassian.sal.jira.rdbms.JiraHostConnectionAccessor.borrowConnectionAndExecute(JiraHostConnectionAccessor.java:50)
at com.atlassian.sal.jira.rdbms.JiraHostConnectionAccessor.execute(JiraHostConnectionAccessor.java:40)
at com.atlassian.sal.core.rdbms.DefaultTransactionalExecutor.execute(DefaultTransactionalExecutor.java:42)
at com.atlassian.pocketknife.internal.querydsl.DatabaseAccessorImpl.execute(DatabaseAccessorImpl.java:66)
at com.atlassian.pocketknife.internal.querydsl.DatabaseAccessorImpl.runInTransaction(DatabaseAccessorImpl.java:42)
at com.atlassian.servicedesk.plugins.automation.internal.configuration.ruleset.dao.querydsl.RuleSetDaoImpl.create(RuleSetDaoImpl.java:79)
at com.atlassian.servicedesk.plugins.automation.internal.configuration.ruleset.RuleSetManagerImpl.create(RuleSetManagerImpl.java:89)
at com.atlassian.servicedesk.plugins.automation.internal.configuration.ruleset.RuleSetServiceImpl.create(RuleSetServiceImpl.java:89)
... 3 filtered
at java.lang.reflect.Method.invoke(Method.java:498)
at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:317)
at org.eclipse.gemini.blueprint.service.importer.support.internal.aop.ServiceInvoker.doInvoke(ServiceInvoker.java:56)
at org.eclipse.gemini.blueprint.service.importer.support.internal.aop.ServiceInvoker.invoke(ServiceInvoker.java:60)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
at org.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:133)
at org.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:121)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
at org.eclipse.gemini.blueprint.service.util.internal.aop.ServiceTCCLInterceptor.invokeUnprivileged(ServiceTCCLInterceptor.java:70)
at org.eclipse.gemini.blueprint.service.util.internal.aop.ServiceTCCLInterceptor.invoke(ServiceTCCLInterceptor.java:53)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
at org.eclipse.gemini.blueprint.service.importer.support.LocalBundleContextAdvice.invoke(LocalBundleContextAdvice.java:57)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
at org.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:133)
at org.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:121)
at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:179)
at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:207)
at com.sun.proxy.$Proxy3344.create(Unknown Source)
at com.atlassian.servicedesk.plugins.notifications.internal.bootstrap.upgrade.task.NotificationDefaultRuleManager.lambda$createSystemRule$1(NotificationDefaultRuleManager.java:56)
at io.atlassian.fugue.Either$RightProjection.flatMap(Either.java:870)
at io.atlassian.fugue.Either.flatMap(Either.java:230)
at com.atlassian.servicedesk.plugins.notifications.internal.bootstrap.upgrade.task.NotificationDefaultRuleManager.createSystemRule(NotificationDefaultRuleManager.java:56)
at com.atlassian.servicedesk.plugins.notifications.internal.defaultrules.migration.NotificationDefaultRuleGenerator.createRulesFromDescriptorList(NotificationDefaultRuleGenerator.java:70)
at com.atlassian.servicedesk.plugins.notifications.internal.defaultrules.migration.NotificationDefaultRuleGenerator.lambda$createMissingRules$0(NotificationDefaultRuleGenerator.java:50)
at io.atlassian.fugue.Either$RightProjection.flatMap(Either.java:870)
at io.atlassian.fugue.Either.flatMap(Either.java:230)
at com.atlassian.servicedesk.plugins.notifications.internal.defaultrules.migration.NotificationDefaultRuleGenerator.createMissingRules(NotificationDefaultRuleGenerator.java:49)
at com.atlassian.servicedesk.plugins.notifications.internal.feature.precondition.NotificationMisconfigurationService.lambda$fixMissingNotificationRules$0(NotificationMisconfigurationService.java:55)
at io.atlassian.fugue.Either$RightProjection.flatMap(Either.java:870)
at io.atlassian.fugue.Either.flatMap(Either.java:230)
at com.atlassian.servicedesk.plugins.notifications.internal.feature.precondition.NotificationMisconfigurationService.fixMissingNotificationRules(NotificationMisconfigurationService.java:54)
at com.atlassian.servicedesk.plugins.notifications.internal.rest.NotificationMisconfigurationResource.lambda$fixNotificationMisconfiguration$1(NotificationMisconfigurationResource.java:58)
at com.atlassian.pocketknife.step.EitherStep2.lambda$null$0(EitherStep2.java:20)
at io.atlassian.fugue.Either$RightProjection.flatMap(Either.java:870)
at io.atlassian.fugue.Either.flatMap(Either.java:230)
at com.atlassian.pocketknife.step.EitherStep2.lambda$then$1(EitherStep2.java:20)
at io.atlassian.fugue.Either$RightProjection.flatMap(Either.java:870)
at io.atlassian.fugue.Either.flatMap(Either.java:230)
at com.atlassian.pocketknife.step.EitherStep2.then(EitherStep2.java:20)
at com.atlassian.servicedesk.plugins.notifications.internal.rest.NotificationMisconfigurationResource.fixNotificationMisconfiguration(NotificationMisconfigurationResource.java:58)
... 3 filtered
at java.lang.reflect.Method.invoke(Method.java:498)
... 18 filtered
at com.atlassian.plugins.rest.module.RestDelegatingServletFilter$JerseyOsgiServletContainer.doFilter(RestDelegatingServletFilter.java:154)
... 1 filtered
at com.atlassian.plugins.rest.module.RestDelegatingServletFilter.doFilter(RestDelegatingServletFilter.java:68)
... 32 filtered
at com.atlassian.servicedesk.internal.web.ExternalCustomerLockoutFilter.doFilter(ExternalCustomerLockoutFilter.java:56)
... 4 filtered
at com.atlassian.servicedesk.internal.web.UrlOperationalStatusCheckFilter.doFilterWhenLicensed(UrlOperationalStatusCheckFilter.java:38)
at com.atlassian.servicedesk.internal.web.OperationalStatusAwareHttpFilter.doFilter(OperationalStatusAwareHttpFilter.java:27)
... 4 filtered
at com.atlassian.servicedesk.internal.web.PopulateEyeballForRestFilter.doFilterWhenLicensed(PopulateEyeballForRestFilter.java:36)
at com.atlassian.servicedesk.internal.web.OperationalStatusAwareHttpFilter.doFilter(OperationalStatusAwareHttpFilter.java:27)
... 8 filtered
at com.atlassian.web.servlet.plugin.request.RedirectInterceptingFilter.doFilter(RedirectInterceptingFilter.java:21)
... 53 filtered
at com.atlassian.jira.security.JiraSecurityFilter.lambda$doFilter$0(JiraSecurityFilter.java:80)
... 1 filtered
at com.atlassian.jira.security.JiraSecurityFilter.doFilter(JiraSecurityFilter.java:78)
... 16 filtered
at com.atlassian.plugins.rest.module.servlet.RestSeraphFilter.doFilter(RestSeraphFilter.java:37)
... 20 filtered
at com.atlassian.jira.servermetrics.CorrelationIdPopulatorFilter.doFilter(CorrelationIdPopulatorFilter.java:30)
... 5 filtered
at com.atlassian.servicedesk.internal.web.CustomerContextSettingFilter.lambda$invokeFilterChain$0(CustomerContextSettingFilter.java:181)
at com.atlassian.servicedesk.internal.utils.context.ReentrantThreadLocalBasedCodeContext.rteInvoke(ReentrantThreadLocalBasedCodeContext.java:139)
at com.atlassian.servicedesk.internal.utils.context.ReentrantThreadLocalBasedCodeContext.runOutOfContext(ReentrantThreadLocalBasedCodeContext.java:92)
at com.atlassian.servicedesk.internal.utils.context.CustomerContextServiceImpl.runOutOfCustomerContext(CustomerContextServiceImpl.java:64)
at com.atlassian.servicedesk.internal.web.CustomerContextSettingFilter.outOfCustomerContext(CustomerContextSettingFilter.java:174)
at com.atlassian.servicedesk.internal.web.CustomerContextSettingFilter.doFilterImpl(CustomerContextSettingFilter.java:130)
at com.atlassian.servicedesk.internal.web.CustomerContextSettingFilter.doFilter(CustomerContextSettingFilter.java:121)
... 4 filtered
at com.atlassian.jwt.internal.servlet.JwtAuthFilter.doFilter(JwtAuthFilter.java:32)
... 8 filtered
at com.atlassian.web.servlet.plugin.request.RedirectInterceptingFilter.doFilter(RedirectInterceptingFilter.java:21)
... 4 filtered
at com.atlassian.web.servlet.plugin.LocationCleanerFilter.doFilter(LocationCleanerFilter.java:36)
... 29 filtered
at com.atlassian.jira.servermetrics.MetricsCollectorFilter.doFilter(MetricsCollectorFilter.java:25)
... 28 filtered
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.lang.Thread.run(Thread.java:745)
Caused by: com.querydsl.core.QueryException: Caught BatchUpdateException for insert into `AO_9B2E3B_THEN_ACT_CONF_DATA` (`THEN_ACTION_CONFIG_ID`, `CONFIG_DATA_KEY`, `CONFIG_DATA_VALUE`) values (?, ?, ?)
at com.querydsl.sql.DefaultSQLExceptionTranslator.translate(DefaultSQLExceptionTranslator.java:50)
at com.querydsl.sql.Configuration.translate(Configuration.java:453)
at com.querydsl.sql.dml.SQLInsertClause.execute(SQLInsertClause.java:396)
at com.atlassian.servicedesk.plugins.automation.internal.configuration.common.dao.QueryDslDaoHelper.executeWithExceptionMessage(QueryDslDaoHelper.java:53)
... 343 more
... 3 filtered
at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
at com.mysql.jdbc.Util.handleNewInstance(Util.java:404)
at com.mysql.jdbc.Util.getInstance(Util.java:387)
at com.mysql.jdbc.SQLError.createBatchUpdateException(SQLError.java:1154)
at com.mysql.jdbc.PreparedStatement.executeBatchSerially(PreparedStatement.java:1773)
at com.mysql.jdbc.PreparedStatement.executeBatchInternal(PreparedStatement.java:1257)
at com.mysql.jdbc.StatementImpl.executeBatch(StatementImpl.java:959)
at org.apache.commons.dbcp2.DelegatingStatement.executeBatch(DelegatingStatement.java:345)
at org.apache.commons.dbcp2.DelegatingStatement.executeBatch(DelegatingStatement.java:345)
at com.querydsl.sql.dml.AbstractSQLClause.executeBatch(AbstractSQLClause.java:168)
at com.querydsl.sql.dml.AbstractSQLClause.executeBatch(AbstractSQLClause.java:178)
at com.querydsl.sql.dml.SQLInsertClause.execute(SQLInsertClause.java:390)
... 344 more
Caused by: java.sql.SQLException: Incorrect string value: '\xE4\xBB\x8A\xE3\x80\x81...' for column 'CONFIG_DATA_VALUE' at row 1
at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:957)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3878)
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3814)
at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:2478)
at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2625)
at com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1861)
at com.mysql.jdbc.PreparedStatement.executeUpdateInternal(PreparedStatement.java:2073)
at com.mysql.jdbc.PreparedStatement.executeBatchSerially(PreparedStatement.java:1751)
... 351 more
Diagnosis
Environment
- This specific error is related to using MySQL for Jira's database.
Checking Collation
You can use this query to verify tables collation is set correctly to
utf8_bin
SELECT DISTINCT C.collation_name, T.table_name FROM information_schema.tables AS T, information_schema.`collation_character_set_applicability` AS C WHERE C.collation_name = T.table_collation AND T.table_schema = DATABASE() AND C.collation_name != 'utf8_bin';
You can use this query to verify that database collation is set correctly to
utf8_bin
:
SELECT default_collation_name FROM information_schema.schemata S WHERE schema_name = (SELECT DATABASE() FROM DUAL);
Cause
The problem arises from a misconfiguration of database or table collation.
Resolution
Use the steps provided in How to Fix the Collation and Character Set of a MySQL Database manually to correct collation.