Uploaded image for project: 'Jackrabbit Content Repository'
  1. Jackrabbit Content Repository
  2. JCR-3521

IllegalArgumentException thrown on a box running java7 with a sorted query

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.5.3
    • 2.6.1, 2.7
    • indexing
    • None
    • JDK 7

    Description

      Today we were running into this nice exception on a box running java7 with a sorted query (by lastModified DESC):

      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
      org.apache.jackrabbit.core.query.lucene.join.QueryEngine.sort(QueryEngine.j
      ava:625)
      at
      org.apache.jackrabbit.core.query.lucene.join.QueryEngine.execute(QueryEngin
      e.java:484)
      at
      org.apache.jackrabbit.core.query.lucene.join.QueryEngine.execute(QueryEngin
      e.java:126)
      at
      org.apache.jackrabbit.core.query.lucene.join.QueryEngine.execute(QueryEngin
      e.java:115)
      at
      org.apache.jackrabbit.core.query.QueryObjectModelImpl$2.perform(QueryObject
      ModelImpl.java:129)
      at
      org.apache.jackrabbit.core.query.QueryObjectModelImpl$2.perform(QueryObject
      ModelImpl.java:124)
      at
      org.apache.jackrabbit.core.session.SessionState.perform(SessionState.java:2
      16)
      at
      org.apache.jackrabbit.core.query.QueryObjectModelImpl.execute(QueryObjectMo
      delImpl.java:123)

      Attachments

        1. JCR-3521.patch
          4 kB
          Chetan Mehrotra
        2. JCR-3521-2.patch
          4 kB
          Chetan Mehrotra

        Activity

          People

            Unassigned Unassigned
            chetanm Chetan Mehrotra
            Votes:
            1 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: