Comparison method violates its general contract

Still need help?

The Atlassian Community is here for you.

Ask the community

Symptoms

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

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.

Last modified on Jul 31, 2018

Was this helpful?

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