Summary

      Method com.atlassian.greenhopper.service.rapid.view.ColumnServiceImpl#validateStatusIds has a logging method which expects number, while method returns string:

      • validateStatusIds:
        ...
            // then check the status IDs
                List<String> statusIds = new ArrayList<String>();
                for (ColumnStatusAO statusAO : statusAOs) {
                    Status status = workflowService.getWorkflowStatusObject(statusAO.getStatusId());
                    // ignore invalid status IDs here
                    if (status != null) {
                        statusIds.add(status.getId());
                    } else {
                        log.info("Invalid status [id %d] mapped to column [id %d], ignoring", statusAO.getStatusId(), columnAO.getId());
                    }
        
      • statusAO.getStatusId() is defined as: `public String getStatusId()`

      Expected Results

      Info message.

      Actual Results

      Error message and the below exception is thrown in the atlassian-greenhopper.log file:

      2019-11-07 08:39:28,857 http-nio-8082-exec-8 ERROR admin 519x3637x1 1e4kogv 1.1.1.1 /secure/GHGoToBoard.jspa [service.rapid.view.ColumnServiceImpl] Unable to format message: Invalid status [id %d] mapped to column [id %d], ignoring
      java.util.IllegalFormatConversionException: d != java.lang.String
      	at java.util.Formatter$FormatSpecifier.failConversion(Formatter.java:4302)
      	at java.util.Formatter$FormatSpecifier.printInteger(Formatter.java:2793)
      	at java.util.Formatter$FormatSpecifier.print(Formatter.java:2747)
      	at java.util.Formatter.format(Formatter.java:2520)
      	at java.util.Formatter.format(Formatter.java:2455)
      	at java.lang.String.format(String.java:2940)
      	at com.atlassian.greenhopper.global.LoggerWrapper.createMessage(LoggerWrapper.java:200)
      	at com.atlassian.greenhopper.global.LoggerWrapper.info(LoggerWrapper.java:176)
      	at com.atlassian.greenhopper.service.rapid.view.ColumnServiceImpl.validateStatusIds(ColumnServiceImpl.java:345)
      	at com.atlassian.greenhopper.service.rapid.view.ColumnServiceImpl.fromAO(ColumnServiceImpl.java:326)
      	at com.atlassian.greenhopper.service.rapid.view.ColumnServiceImpl.access$200(ColumnServiceImpl.java:44)
      	at com.atlassian.greenhopper.service.rapid.view.ColumnServiceImpl$ColumnCacheLoader.load(ColumnServiceImpl.java:472)
      	at com.atlassian.greenhopper.service.rapid.view.ColumnServiceImpl$ColumnCacheLoader.load(ColumnServiceImpl.java:466)
      	at com.atlassian.cache.compat.delegate.DelegatingCacheLoader.load(DelegatingCacheLoader.java:23)
      	at com.atlassian.cache.ehcache.wrapper.ValueProcessorAtlassianCacheLoaderDecorator.load(ValueProcessorAtlassianCacheLoaderDecorator.java:26)
      	at com.atlassian.cache.ehcache.LoadingCache.getFromLoader(LoadingCache.java:133)
      	at com.atlassian.cache.ehcache.SynchronizedLoadingCacheDecorator.synchronizedLoad(SynchronizedLoadingCacheDecorator.java:29)
      	at com.atlassian.cache.ehcache.LoadingCache.loadValueAndReleaseLock(LoadingCache.java:101)
      	at com.atlassian.cache.ehcache.LoadingCache.get(LoadingCache.java:80)
      	at com.atlassian.cache.ehcache.DelegatingCache.get(DelegatingCache.java:108)
      	at com.atlassian.jira.cache.DeferredReplicationCache.get(DeferredReplicationCache.java:48)
      	at com.atlassian.cache.compat.delegate.DelegatingCache.get(DelegatingCache.java:37)
      	at com.atlassian.greenhopper.service.rapid.view.ColumnServiceImpl.getAllColumnsNoUpdate(ColumnServiceImpl.java:127)
      	at com.atlassian.greenhopper.service.rapid.view.ColumnServiceImpl.getAllColumns(ColumnServiceImpl.java:114)
      	at com.atlassian.greenhopper.service.rapid.view.ColumnServiceImpl.getVisibleColumns(ColumnServiceImpl.java:99)
      	at com.atlassian.greenhopper.service.rapid.view.ColumnServiceImpl.getMappedStatuses(ColumnServiceImpl.java:158)
      	at sun.reflect.GeneratedMethodAccessor1738.invoke(Unknown Source)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      	at java.lang.reflect.Method.invoke(Method.java:498)
      	at com.atlassian.activeobjects.tx.TransactionalProxy.invoke(TransactionalProxy.java:60)
      	at com.atlassian.activeobjects.tx.TransactionalProxy.invoke(TransactionalProxy.java:33)
      	at com.sun.proxy.$Proxy3936.getMappedStatuses(Unknown Source)
      	at com.atlassian.greenhopper.service.rapid.RapidViewQueryServiceImpl.getStatusMappingClause(RapidViewQueryServiceImpl.java:138)
      	at com.atlassian.greenhopper.service.rapid.RapidViewQueryServiceImpl.getMappedRapidViewQuery(RapidViewQueryServiceImpl.java:167)
      	at com.atlassian.greenhopper.service.rapid.RapidViewQueryServiceImpl.getWorkModeQuery(RapidViewQueryServiceImpl.java:191)
      	at com.atlassian.greenhopper.service.rapid.RapidViewLocationServiceImpl.getRapidViewsForIssue(RapidViewLocationServiceImpl.java:120)
      	at com.atlassian.greenhopper.web.rapid.RapidViewLocationResolverFactory$IssueRapidViewLocationResolver.getRapidViewsForObject(RapidViewLocationResolverFactory.java:151)
      	at com.atlassian.greenhopper.web.rapid.RapidViewLocationResolverFactory$IssueRapidViewLocationResolver.getRapidViewsForObject(RapidViewLocationResolverFactory.java:130)
      	at com.atlassian.greenhopper.web.rapid.BoardDispatchAction._doGoToBoard(BoardDispatchAction.java:116)
      	at com.atlassian.greenhopper.web.rapid.BoardDispatchAction.doGoToBoard(BoardDispatchAction.java:57)
      ....
      

      or another example:

      2019-11-07 13:44:21,686 SP-bigpicture-JiraServerExtTaskQuerySingleJobExecutor ERROR admin  [service.rapid.view.ColumnServiceImpl] Unable to format message: Invalid status [id %d] mapped to column [id %d], ignoring
      java.util.IllegalFormatConversionException: d != java.lang.String
      	at java.util.Formatter$FormatSpecifier.failConversion(Formatter.java:4302)
      	at java.util.Formatter$FormatSpecifier.printInteger(Formatter.java:2793)
      	at java.util.Formatter$FormatSpecifier.print(Formatter.java:2747)
      	at java.util.Formatter.format(Formatter.java:2520)
      	at java.util.Formatter.format(Formatter.java:2455)
      	at java.lang.String.format(String.java:2940)
      	at com.atlassian.greenhopper.global.LoggerWrapper.createMessage(LoggerWrapper.java:200)
      	at com.atlassian.greenhopper.global.LoggerWrapper.info(LoggerWrapper.java:176)
      	at com.atlassian.greenhopper.service.rapid.view.ColumnServiceImpl.validateStatusIds(ColumnServiceImpl.java:345)
      	at com.atlassian.greenhopper.service.rapid.view.ColumnServiceImpl.fromAO(ColumnServiceImpl.java:326)
      	at com.atlassian.greenhopper.service.rapid.view.ColumnServiceImpl.access$200(ColumnServiceImpl.java:44)
      	at com.atlassian.greenhopper.service.rapid.view.ColumnServiceImpl$ColumnCacheLoader.load(ColumnServiceImpl.java:472)
      	at com.atlassian.greenhopper.service.rapid.view.ColumnServiceImpl$ColumnCacheLoader.load(ColumnServiceImpl.java:466)
      	at com.atlassian.cache.compat.delegate.DelegatingCacheLoader.load(DelegatingCacheLoader.java:23)
      ...
      

      Workaround

      Not available.

            [JSWSERVER-20318] Message format error in ColumnServiceImpl

            Hi gonchik,
            We just need to get this bug fixed up. Once's that's done, the error would show the informative message (bad status X mapped to column Y)
            Cheers, Alex

            Alex [Atlassian,PSE] added a comment - Hi gonchik , We just need to get this bug fixed up. Once's that's done, the error would show the informative message (bad status X mapped to column Y) Cheers, Alex

            Hi Alex, 

            So do you have plans to make log line more informative?

            At the moment a little bit unclear where we need to make cleanup

            Gonchik Tsymzhitov added a comment - Hi Alex,  So do you have plans to make log line more informative? At the moment a little bit unclear where we need to make cleanup

            Hey eddy.fras ,

            We haven't solved it totally yet, but at least, it occurs when we obtain Agile Board data (alldata.json) from the server and try to validate status ID's (workflow status).

            It appears that when an invalid status is found (IE: we can't resolve the status ID to an actual workflow status ID), we try to write out a log line, but fails due to this bug. So we never know the invalid status ID affected.

            I'm sorry but I don't have any more detail at this time than that.

            Cheers, Alex

            Alex [Atlassian,PSE] added a comment - Hey eddy.fras , We haven't solved it totally yet, but at least, it occurs when we obtain Agile Board data (alldata.json) from the server and try to validate status ID's (workflow status). It appears that when an invalid status is found (IE: we can't resolve the status ID to an actual workflow status ID), we try to write out a log line, but fails due to this bug. So we never know the invalid status ID affected. I'm sorry but I don't have any more detail at this time than that. Cheers, Alex

            Eddy Fras added a comment -

            Hi,

            My atlassian-greenhopper.log files are full of this.

            Does someone know when this occurs exactly ?

            Thanks

            Eddy Fras added a comment - Hi, My atlassian-greenhopper.log files are full of this. Does someone know when this occurs exactly ? Thanks

            The message is annoying and this should be a trivial fix.

            Alexey Belostotskiy added a comment - The message is annoying and this should be a trivial fix.

              Unassigned Unassigned
              ayakovlev@atlassian.com Andriy Yakovlev [Atlassian]
              Affected customers:
              9 This affects my team
              Watchers:
              13 Start watching this issue

                Created:
                Updated: