Uploaded image for project: 'Wicket'
  1. Wicket
  2. WICKET-4955

SessionData violates comparison contract

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 6.4.0
    • 6.5.0
    • None
    • java 7

    Description

      AbstractRequestLogger.getLiveSessions sorts the SessionData objects, this sort 'sometimes' (most likely load/concurrency) results in a contract violation:

      Caused by: org.apache.wicket.WicketRuntimeException: Error calling method: public final java.lang.Integer org.apache.wicket.proxy.$Proxy200.getLiveSessions() on object: org.apache.wicket.proxy.LazyInitProxyFactory$JdkHandler@438532d0
      at org.apache.wicket.core.util.lang.PropertyResolver$MethodGetAndSet.getValue(PropertyResolver.java:1148)
      at org.apache.wicket.core.util.lang.PropertyResolver$ObjectAndGetSetter.getValue(PropertyResolver.java:649)
      at org.apache.wicket.core.util.lang.PropertyResolver.getValue(PropertyResolver.java:103)
      at org.apache.wicket.model.AbstractPropertyModel.getObject(AbstractPropertyModel.java:86)
      at org.apache.wicket.Component.getDefaultModelObject(Component.java:1615)
      ... 75 more
      Caused by: java.lang.IllegalArgumentException: Comparison method violates its general contract!
      at java.util.ComparableTimSort.mergeHi(ComparableTimSort.java:835)
      at java.util.ComparableTimSort.mergeAt(ComparableTimSort.java:453)
      at java.util.ComparableTimSort.mergeForceCollapse(ComparableTimSort.java:392)
      at java.util.ComparableTimSort.sort(ComparableTimSort.java:191)
      at java.util.ComparableTimSort.sort(ComparableTimSort.java:146)
      at java.util.Arrays.sort(Arrays.java:472)
      at org.apache.wicket.protocol.http.AbstractRequestLogger.getLiveSessions(AbstractRequestLogger.java:135)
      at nl.topicus.cobra.monitoring.BaseApplicationInfo.getLiveSessions(BaseApplicationInfo.java:103)
      at sun.reflect.GeneratedMethodAccessor256.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:601)
      at org.apache.wicket.proxy.LazyInitProxyFactory$JdkHandler.invoke(LazyInitProxyFactory.java:434)
      at org.apache.wicket.proxy.$Proxy200.getLiveSessions(Unknown Source)
      at sun.reflect.GeneratedMethodAccessor255.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:601)
      at org.apache.wicket.core.util.lang.PropertyResolver$MethodGetAndSet.getValue(PropertyResolver.java:1144)
      ... 79 more

      Attachments

        Activity

          People

            papegaaij Emond Papegaaij
            boschman Sverre Boschman
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: