Uploaded image for project: 'Jira Data Center'
  1. Jira Data Center
  2. JRASERVER-38333

Workflow Import Fails Due to Violation of Comparator Contract

      Steps to reproduce

      1. import the workflow xml file.
      2. edit/view the workflow.
      3. change the mode to Diagram View.
      4. the following error will appears:
         "The JIRA server was contacted but has returned an error response. We are unsure of the result of this operation." 
      5. with this stack trace in the atlassian-jira.log:
        2014-05-14 23:57:14,286 http-bio-8625-exec-23 ERROR admin 1437x240x1 1jvzekl 0:0:0:0:0:0:0:1 /rest/workflowDesigner/latest/workflows [common.error.jersey.ThrowableExceptionMapper] Uncaught exception thrown by REST service: java.lang.IllegalArgumentException: Comparison method violates its general contract!
        java.lang.RuntimeException: java.lang.IllegalArgumentException: Comparison method violates its general contract!
        	at com.sysbliss.jira.plugins.workflow.manager.WorkflowLayoutManagerImpl.getOldLayout(WorkflowLayoutManagerImpl.java:350)
        	at com.sysbliss.jira.plugins.workflow.manager.WorkflowLayoutManagerImpl.generateNewLayout(WorkflowLayoutManagerImpl.java:292)
        	at com.sysbliss.jira.plugins.workflow.manager.WorkflowLayoutManagerImpl.getNewLayoutJson(WorkflowLayoutManagerImpl.java:282)
        	at com.atlassian.jira.plugins.workflowdesigner.layout.WorkflowLayoutsImpl.getLayoutJson(WorkflowLayoutsImpl.java:95)
        	at com.atlassian.jira.plugins.workflowdesigner.rest.WorkflowsResource.getWorkflow(WorkflowsResource.java:67)  <+3>
        	at java.lang.reflect.Method.invoke(Unknown Source)  <+18> (DispatchProviderHelper.java:234) (DispatchProviderHelper.java:100) (DefaultMethodInvocation.java:61) (ExpandInterceptor.java:38) (DefaultMethodInvocation.java:61) (DispatchProviderHelper.java:132) (DispatchProviderHelper.java:230) (ResourceJavaMethodDispatcher.java:75) (HttpMethodRule.java:288) (ResourceClassRule.java:108) (RightHandPathRule.java:147) (RootResourceClassesRule.java:84) (WebApplicationImpl.java:1469) (WebApplicationImpl.java:1400) (WebApplicationImpl.java:1349) (WebApplicationImpl.java:1339) (WebComponent.java:416) (ServletContainer.java:537)
        	at com.atlassian.plugins.rest.module.RestDelegatingServletFilter$JerseyOsgiServletContainer.doFilter(RestDelegatingServletFilter.java:178)  <+1> (ServletContainer.java:795)
        	at com.atlassian.plugins.rest.module.RestDelegatingServletFilter.doFilter(RestDelegatingServletFilter.java:73)  <+16> (DelegatingPluginFilter.java:74) (IteratingFilterChain.java:42) (ServletFilterModuleContainerFilter.java:77) (ServletFilterModuleContainerFilter.java:63) (DelegatingPluginFilter.java:74) (IteratingFilterChain.java:42) (DelegatingPluginFilter.java:66) (RestServletUtilsUpdaterFilter.java:26) (RestServletUtilsUpdaterFilter.java:40) (DelegatingPluginFilter.java:74) (IteratingFilterChain.java:42) (DelegatingPluginFilter.java:66) (ContextFilter.java:25) (DelegatingPluginFilter.java:74) (IteratingFilterChain.java:42) (DelegatingPluginFilter.java:66)
        	at com.atlassian.mywork.client.filter.ServingRequestsFilter.doFilter(ServingRequestsFilter.java:37)  <+3> (DelegatingPluginFilter.java:74) (IteratingFilterChain.java:42) (DelegatingPluginFilter.java:66)
        	at com.atlassian.plugins.cors.CorsFilter.doFilter(CorsFilter.java:65)  <+3> (DelegatingPluginFilter.java:74) (IteratingFilterChain.java:42) (DelegatingPluginFilter.java:66)
        	at com.atlassian.prettyurls.filter.PrettyUrlsDispatcherFilter.doFilter(PrettyUrlsDispatcherFilter.java:60)  <+3> (DelegatingPluginFilter.java:74) (IteratingFilterChain.java:42) (DelegatingPluginFilter.java:66)
        	at com.atlassian.prettyurls.filter.PrettyUrlsSiteMeshFilter.doFilter(PrettyUrlsSiteMeshFilter.java:92)  <+3> (DelegatingPluginFilter.java:74) (IteratingFilterChain.java:42) (DelegatingPluginFilter.java:66)
        	at com.atlassian.prettyurls.filter.PrettyUrlsMatcherFilter.doFilter(PrettyUrlsMatcherFilter.java:56)  <+3> (DelegatingPluginFilter.java:74) (IteratingFilterChain.java:42) (DelegatingPluginFilter.java:66)
        	at com.atlassian.labs.botkiller.BotKillerFilter.doFilter(BotKillerFilter.java:36)  <+18> (DelegatingPluginFilter.java:74) (IteratingFilterChain.java:42) (ServletFilterModuleContainerFilter.java:77) (ServletFilterModuleContainerFilter.java:63) (ApplicationFilterChain.java:243) (ApplicationFilterChain.java:210) (AccessLogFilter.java:103) (AccessLogFilter.java:87) (ApplicationFilterChain.java:243) (ApplicationFilterChain.java:210) (XsrfTokenAdditionRequestFilter.java:54) (ApplicationFilterChain.java:243) (ApplicationFilterChain.java:210) (ChainedFilterStepRunner.java:87) (ApplicationFilterChain.java:243) (ApplicationFilterChain.java:210) (IteratingFilterChain.java:46) (DelegatingPluginFilter.java:66)
        	at com.atlassian.prettyurls.filter.PrettyUrlsCombinedMatchDispatcherFilter.doFilter(PrettyUrlsCombinedMatchDispatcherFilter.java:61)  <+22> (DelegatingPluginFilter.java:74) (IteratingFilterChain.java:42) (ServletFilterModuleContainerFilter.java:77) (ServletFilterModuleContainerFilter.java:63) (ApplicationFilterChain.java:243) (ApplicationFilterChain.java:210) (SecurityFilter.java:234) (ApplicationFilterChain.java:243) (ApplicationFilterChain.java:210) (TrustedApplicationsFilter.java:100) (ApplicationFilterChain.java:243) (ApplicationFilterChain.java:210) (BaseLoginFilter.java:169) (JiraLoginFilter.java:70) (ApplicationFilterChain.java:243) (ApplicationFilterChain.java:210) (IteratingFilterChain.java:46) (DelegatingPluginFilter.java:66) (OAuthFilter.java:61) (DelegatingPluginFilter.java:74) (IteratingFilterChain.java:42) (DelegatingPluginFilter.java:66)
        	at com.atlassian.plugins.rest.module.servlet.RestSeraphFilter.doFilter(RestSeraphFilter.java:40)  <+3> (DelegatingPluginFilter.java:74) (IteratingFilterChain.java:42) (DelegatingPluginFilter.java:66)
        	at com.atlassian.prettyurls.filter.PrettyUrlsCombinedMatchDispatcherFilter.doFilter(PrettyUrlsCombinedMatchDispatcherFilter.java:61)  <+9> (DelegatingPluginFilter.java:74) (IteratingFilterChain.java:42) (ServletFilterModuleContainerFilter.java:77) (ServletFilterModuleContainerFilter.java:63) (ApplicationFilterChain.java:243) (ApplicationFilterChain.java:210) (AbstractJohnsonFilter.java:71) (ApplicationFilterChain.java:243) (ApplicationFilterChain.java:210)
        	at org.tuckey.web.filters.urlrewrite.RuleChain.handleRewrite(RuleChain.java:176)
        	at org.tuckey.web.filters.urlrewrite.RuleChain.doRules(RuleChain.java:145)
        	at org.tuckey.web.filters.urlrewrite.UrlRewriter.processRequest(UrlRewriter.java:92)  <+10> (UrlRewriteFilter.java:394) (ApplicationFilterChain.java:243) (ApplicationFilterChain.java:210) (GzipFilter.java:74) (GzipFilter.java:51) (JiraGzipFilter.java:55) (ApplicationFilterChain.java:243) (ApplicationFilterChain.java:210) (IteratingFilterChain.java:46) (DelegatingPluginFilter.java:66)
        	at com.atlassian.prettyurls.filter.PrettyUrlsCombinedMatchDispatcherFilter.doFilter(PrettyUrlsCombinedMatchDispatcherFilter.java:61)  <+40> (DelegatingPluginFilter.java:74) (IteratingFilterChain.java:42) (ServletFilterModuleContainerFilter.java:77) (ServletFilterModuleContainerFilter.java:63) (ApplicationFilterChain.java:243) (ApplicationFilterChain.java:210) (ChainedFilterStepRunner.java:87) (ApplicationFilterChain.java:243) (ApplicationFilterChain.java:210) (AbstractCachingFilter.java:33) (AbstractHttpFilter.java:31) (ApplicationFilterChain.java:243) (ApplicationFilterChain.java:210) (AbstractEncodingFilter.java:41) (AbstractHttpFilter.java:31) (PathMatchingEncodingFilter.java:45) (AbstractHttpFilter.java:31) (ApplicationFilterChain.java:243) (ApplicationFilterChain.java:210) (JiraStartupChecklistFilter.java:78) (ApplicationFilterChain.java:243) (ApplicationFilterChain.java:210) (MultipartBoundaryCheckFilter.java:41) (ApplicationFilterChain.java:243) (ApplicationFilterChain.java:210) (ChainedFilterStepRunner.java:87) (JiraFirstFilter.java:57) (ApplicationFilterChain.java:243) (ApplicationFilterChain.java:210) (StandardWrapperValve.java:222) (StandardContextValve.java:123) (AuthenticatorBase.java:502) (StandardHostValve.java:171) (ErrorReportValve.java:100) (StandardEngineValve.java:118) (AccessLogValve.java:953) (CoyoteAdapter.java:408) (AbstractHttp11Processor.java:1041) (AbstractProtocol.java:603) (JIoEndpoint.java:312)
        	at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
        	at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
        	at java.lang.Thread.run(Unknown Source)
        Caused by: java.lang.IllegalArgumentException: Comparison method violates its general contract!
        	at java.util.ComparableTimSort.mergeLo(Unknown Source)
        	at java.util.ComparableTimSort.mergeAt(Unknown Source)
        	at java.util.ComparableTimSort.mergeForceCollapse(Unknown Source)
        	at java.util.ComparableTimSort.sort(Unknown Source)
        	at java.util.ComparableTimSort.sort(Unknown Source)
        	at com.mxgraph.layout.hierarchical.stage.mxCoordinateAssignment.rankMedianPosition(Unknown Source)
        	at com.mxgraph.layout.hierarchical.stage.mxCoordinateAssignment.medianPos(Unknown Source)
        	at com.mxgraph.layout.hierarchical.stage.mxCoordinateAssignment.execute(Unknown Source)
        	at com.mxgraph.layout.hierarchical.mxHierarchicalLayout.placementStage(Unknown Source)
        	at com.mxgraph.layout.hierarchical.mxHierarchicalLayout.run(Unknown Source)
        	at com.mxgraph.layout.hierarchical.mxHierarchicalLayout.execute(Unknown Source)
        	at com.sysbliss.jira.plugins.workflow.jgraph.JGraphxJWDLayoutProcessor.actuallyCalculateLayout(JGraphxJWDLayoutProcessor.java:98)
        	at com.sysbliss.jira.plugins.workflow.jgraph.JGraphxJWDLayoutProcessor.calculateLayout(JGraphxJWDLayoutProcessor.java:71)
        	at com.sysbliss.jira.plugins.workflow.manager.WorkflowLayoutManagerImpl.getLayoutForWorkflow(WorkflowLayoutManagerImpl.java:162)
        	at com.sysbliss.jira.plugins.workflow.manager.WorkflowLayoutManagerImpl.getOldLayout(WorkflowLayoutManagerImpl.java:346)
        

            [JRASERVER-38333] Workflow Import Fails Due to Violation of Comparator Contract

            Hi mcobby,

            Could you please clarify what you mean by

            will we be able to upgrade renderer on it's own or be forced into a full upgrade to 6.3?

            Thanks in advance.

            Regards,

            Oswaldo Hernández.
            JIRA Bugmaster.
            [Atlassian].

            Oswaldo Hernandez (Inactive) added a comment - Hi mcobby , Could you please clarify what you mean by will we be able to upgrade renderer on it's own or be forced into a full upgrade to 6.3? Thanks in advance. Regards, Oswaldo Hernández. JIRA Bugmaster. [Atlassian] .

            MatthewC added a comment -

            We get this bug in only one workflow and are in progress of upgrading to 6.2.7
            Question: When 6.3 is released, will we be able to upgrade renderer on it's own or be forced into a full upgrade to 6.3?

            MatthewC added a comment - We get this bug in only one workflow and are in progress of upgrading to 6.2.7 Question: When 6.3 is released, will we be able to upgrade renderer on it's own or be forced into a full upgrade to 6.3?

            This error appears due to the bug inside the 3rd party library that is used in JIRA 6.2 to render workflow diagrams. The workaround is to run JIRA 6.2 using Java 6. Or to use Text Mode for workflow viewing/editing.

            All usages of that library were removed in JIRA 6.3 currently scheduled to be released by the end of June. So 6.3 is not affected by this bug.

            Due to the fact that: a) 6.3 will be available soon, b) there is a workaround, c) problem doesn't appear to be very common, I suggest we close this as "Won't fix".

            The bad news is that we discovered 2 more bugs while trying to import the workflow XML attached to this issue: JRA-38398 and JRA-38399. Both of them will be fixed in 6.2.7

            Roman Tekhov (Inactive) added a comment - This error appears due to the bug inside the 3rd party library that is used in JIRA 6.2 to render workflow diagrams. The workaround is to run JIRA 6.2 using Java 6. Or to use Text Mode for workflow viewing/editing. All usages of that library were removed in JIRA 6.3 currently scheduled to be released by the end of June. So 6.3 is not affected by this bug. Due to the fact that: a) 6.3 will be available soon, b) there is a workaround, c) problem doesn't appear to be very common, I suggest we close this as "Won't fix". The bad news is that we discovered 2 more bugs while trying to import the workflow XML attached to this issue: JRA-38398 and JRA-38399 . Both of them will be fixed in 6.2.7

            Hello darren.campbell2,

            My JIRA 6.2.5 that are used for testing is using version 6.2.0.2 of Workflow Designer Plugin.

            Hope this could clarify it.

            Best Regards,
            Julian.

            Julian (Inactive) added a comment - Hello darren.campbell2 , My JIRA 6.2.5 that are used for testing is using version 6.2.0.2 of Workflow Designer Plugin. Hope this could clarify it. Best Regards, Julian.

            Which version of the designer plugin was tested (6.2.0.1 or 6.2.0.2) with JIRA 6.2.5?

            Darren Campbell added a comment - Which version of the designer plugin was tested (6.2.0.1 or 6.2.0.2) with JIRA 6.2.5?

            The steps and workflow xml are the same as in JRA-32072 but the error is different, in this case we have an incorrectly implemented Comparator implementation that will break under Java 7 as it enforces the contract of the interface more rigorously.

            Oswaldo Hernandez (Inactive) added a comment - The steps and workflow xml are the same as in JRA-32072 but the error is different, in this case we have an incorrectly implemented Comparator implementation that will break under Java 7 as it enforces the contract of the interface more rigorously.

              Unassigned Unassigned
              ohernandez@atlassian.com Oswaldo Hernandez (Inactive)
              Affected customers:
              2 This affects my team
              Watchers:
              6 Start watching this issue

                Created:
                Updated:
                Resolved: