Comparison method violates its general contract

Platform Notice: Data Center Only - This article only applies to Atlassian products on the Data Center platform.

Note that this KB was created for the Data Center version of the product. Data Center KBs 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

Symptoms

You're using Oracle JDK 1.7. The following appears in the atlassian-fisheye.log:

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 javax.servlet.ServletException: javax.servlet.ServletException: javax.el.ELException: java.lang.IllegalArgumentException: Comparison method violates its general contract! at com.opensymphony.webwork.dispatcher.DispatcherUtils.serviceAction(DispatcherUtils.java:285) at com.opensymphony.webwork.dispatcher.ServletDispatcher.service(ServletDispatcher.java:111) at javax.servlet.http.HttpServlet.service(HttpServlet.java:848) at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:669) at org.eclipse.jetty.servlet.ServletHandler$Chain.doFilter(ServletHandler.java:1526) at com.atlassian.plugin.servlet.filter.IteratingFilterChain.doFilter(IteratingFilterChain.java:46) at com.atlassian.plugin.servlet.filter.DelegatingPluginFilter$1.doFilter(DelegatingPluginFilter.java:66) at com.atlassian.applinks.core.rest.context.ContextFilter.doFilter(ContextFilter.java:25) at com.atlassian.plugin.servlet.filter.DelegatingPluginFilter.doFilter(DelegatingPluginFilter.java:74) at com.atlassian.plugin.servlet.filter.IteratingFilterChain.doFilter(IteratingFilterChain.java:42) at com.atlassian.plugin.servlet.filter.ServletFilterModuleContainerFilter.doFilter(ServletFilterModuleContainerFilter.java:77) at com.atlassian.plugin.servlet.filter.ServletFilterModuleContainerFilter.doFilter(ServletFilterModuleContainerFilter.java:63) Caused by: javax.servlet.ServletException: javax.el.ELException: java.lang.IllegalArgumentException: Comparison method violates its general contract! at org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:944) at org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:879) at org.apache.jsp.WEB_002dINF.jsp.crucible.review.monolithic.review_jsp._jspService(review_jsp.java:154) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:111) Caused by: javax.el.ELException: java.lang.IllegalArgumentException: Comparison method violates its general contract! at javax.el.BeanELResolver.getValue(BeanELResolver.java:310) at javax.el.CompositeELResolver.getValue(CompositeELResolver.java:188) at com.sun.el.parser.AstValue.getValue(AstValue.java:120) at com.sun.el.parser.AstValue.getValue(AstValue.java:167) at com.sun.el.ValueExpressionImpl.getValue(ValueExpressionImpl.java:224) at org.apache.jasper.runtime.PageContextImpl.evaluateExpression(PageContextImpl.java:1009) at org.apache.jsp.tag.web.review.reviewPage_tag.doTag(reviewPage_tag.java:578) at org.apache.jsp.WEB_002dINF.jsp.crucible.review.monolithic.review_jsp._jspx_meth_rev_reviewPage_0(review_jsp.java:172) at org.apache.jsp.WEB_002dINF.jsp.crucible.review.monolithic.review_jsp._jspService(review_jsp.java:147) ... 191 more Caused by: java.lang.IllegalArgumentException: Comparison method violates its general contract! at java.util.TimSort.mergeHi(TimSort.java:868) at java.util.TimSort.mergeAt(TimSort.java:485) at java.util.TimSort.mergeForceCollapse(TimSort.java:426) at java.util.TimSort.sort(TimSort.java:223) at java.util.TimSort.sort(TimSort.java:173) at java.util.Arrays.sort(Arrays.java:659) at java.util.Collections.sort(Collections.java:217) at com.cenqua.crucible.view.FRXNavList.buildNavList(FRXNavList.java:185) at com.cenqua.crucible.view.FRXNavList.<init>(FRXNavList.java:176) at com.atlassian.crucible.actions.ReviewBaseAction.getFrxNavList(ReviewBaseAction.java:342) at com.atlassian.crucible.actions.ReviewBaseAction.getSortedFrxs(ReviewBaseAction.java:335) at com.atlassian.crucible.actions.ReviewBaseAction.getEmptyFRXs(ReviewBaseAction.java:319) at sun.reflect.GeneratedMethodAccessor1167.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:601) at javax.el.BeanELResolver.getValue(BeanELResolver.java:305) ... 199 more

Cause

This error is a bug in Oracle JDK 1.7:

http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=7075600

Resolution

Install JDK 1.6. To to this, update the java.exe in your PATH to point to Oracle JDK 1.6's bin directory and update your JAVA_HOME to 1.6 directory, and restart Fisheye/Crucible.

Updated on April 8, 2025

Still need help?

The Atlassian Community is here for you.