Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8123036

FX 8 b102: TableView sorting throws ClassCastException

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Cannot Reproduce
    • Icon: P4 P4
    • 8
    • 8
    • javafx
    • b102, Win 7/64

      Second sorting click on a column in 'Ensemble8 example TableView' and in other apps throws:

      Exception in thread "JavaFX Application Thread" java.lang.ClassCastException: ensemble.samples.contr
      ols.table.tableview.Person cannot be cast to java.lang.Comparable
              at com.sun.javafx.collections.SortHelper.mergeSort(SortHelper.java:213)
              at com.sun.javafx.collections.SortHelper.sort(SortHelper.java:80)
              at com.sun.javafx.collections.SortHelper.sort(SortHelper.java:63)
              at com.sun.javafx.collections.ObservableListWrapper.sort(ObservableListWrapper.java:215)
              at javafx.collections.FXCollections.sort(FXCollections.java:670)
              at javafx.scene.control.TableView$3.call(TableView.java:367)
              at javafx.scene.control.TableView$3.call(TableView.java:336)
              at javafx.scene.control.TableView.sort(TableView.java:1330)
              at javafx.scene.control.TableView.doSort(TableView.java:1360)
              at javafx.scene.control.TableView.access$100(TableView.java:259)
              at javafx.scene.control.TableView$4.onChanged(TableView.java:432)
              at com.sun.javafx.collections.ListListenerHelper$Generic.fireValueChangedEvent(ListListenerHelper.java:315)
              at com.sun.javafx.collections.ListListenerHelper.fireValueChangedEvent(ListListenerHelper.java:72)
              at javafx.collections.ObservableListBase.fireChange(ObservableListBase.java:233)
              at javafx.collections.ListChangeBuilder.commit(ListChangeBuilder.java:482)
              at javafx.collections.ListChangeBuilder.endChange(ListChangeBuilder.java:541)
              at javafx.collections.ObservableListBase.endChange(ObservableListBase.java:205)
              at javafx.collections.ModifiableObservableListBase.remove(ModifiableObservableListBase.java:183)
              at javafx.collections.ModifiableObservableListBase.remove(ModifiableObservableListBase.java:171)
              at com.sun.javafx.scene.control.skin.TableColumnHeader.sortColumn(TableColumnHeader.java:727)
              at com.sun.javafx.scene.control.skin.TableColumnHeader.access$600(TableColumnHeader.java:74)

              at com.sun.javafx.scene.control.skin.TableColumnHeader$7.handle(TableColumnHeader.java:248)
              at com.sun.javafx.scene.control.skin.TableColumnHeader$7.handle(TableColumnHeader.java:236)
              at com.sun.javafx.event.CompositeEventHandler.dispatchBubblingEvent(CompositeEventHandler.java:86)
              at com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(EventHandlerManager.java:238)
              at com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(EventHandlerManager.java:191)
              at com.sun.javafx.event.CompositeEventDispatcher.dispatchBubblingEvent(CompositeEventDispatcher.java:59)
              at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:58)
              at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
              at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
              at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
              at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
              at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
              at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
              at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
              at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
              at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
              at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
              at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
              at com.sun.javafx.event.EventUtil.fireEventImpl(EventUtil.java:74)
              at com.sun.javafx.event.EventUtil.fireEvent(EventUtil.java:54)
              at javafx.event.Event.fireEvent(Event.java:203)
              at javafx.scene.Scene$MouseHandler.process(Scene.java:3591)
              at javafx.scene.Scene$MouseHandler.process(Scene.java:3385)
              at javafx.scene.Scene$MouseHandler.access$1900(Scene.java:3336)
              at javafx.scene.Scene.impl_processMouseEvent(Scene.java:1618)
              at javafx.scene.Scene$ScenePeerListener.mouseEvent(Scene.java:2395)
              at com.sun.javafx.tk.quantum.GlassViewEventHandler$MouseEventNotification.run(GlassViewEventHandler.java:312)
              at com.sun.javafx.tk.quantum.GlassViewEventHandler$MouseEventNotification.run(GlassViewEventHandler.java:237)
              at java.security.AccessController.doPrivileged(Native Method)
              at com.sun.javafx.tk.quantum.GlassViewEventHandler.handleMouseEvent(GlassViewEventHandler.java:354)
              at com.sun.glass.ui.View.handleMouseEvent(View.java:514)
              at com.sun.glass.ui.View.notifyMouse(View.java:877)
              at com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
              at com.sun.glass.ui.win.WinApplication.access$300(WinApplication.java:39)
              at com.sun.glass.ui.win.WinApplication$3$1.run(WinApplication.java:101)
              at java.lang.Thread.run(Thread.java:724)

            jgiles Jonathan Giles
            alammersdjfx August Lammersdorf (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported: